WO2022228455A1 - Communication method and related apparatus - Google Patents

Communication method and related apparatus Download PDF

Info

Publication number
WO2022228455A1
WO2022228455A1 PCT/CN2022/089520 CN2022089520W WO2022228455A1 WO 2022228455 A1 WO2022228455 A1 WO 2022228455A1 CN 2022089520 W CN2022089520 W CN 2022089520W WO 2022228455 A1 WO2022228455 A1 WO 2022228455A1
Authority
WO
WIPO (PCT)
Prior art keywords
security context
key
terminal device
authentication
access
Prior art date
Application number
PCT/CN2022/089520
Other languages
French (fr)
Chinese (zh)
Inventor
李�赫
吴�荣
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022228455A1 publication Critical patent/WO2022228455A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0433Key management protocols

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a communication method and related apparatus.
  • AKMA authentication and key management
  • UE user equipment
  • AF application function
  • AKMA application authentication and key management
  • UDM Unified Data Management
  • the authentication vector acquisition request message carries the Permanent identity identifier (subscriber permanent identifier, SUPI) or subscription concealed identifier (subscription concealed identifier, SUCI)
  • the authentication vector acquisition request message is used to trigger the primary authentication (Primary authentication) between the UE and the network side (core network). )process.
  • the AKMA anchor key Kakma is generated based on the intermediate key Kausf
  • the AKMA key temporary identity identifier (AKMA-Key Identifier, A-KID) is generated based on the intermediate key Kausf.
  • A-KID AKMA-Key Identifier
  • other keys can also be derived, for example, the key Kaf used by the application server AF.
  • the above-mentioned key derived based on the intermediate key Kausf is referred to as a security context.
  • the validity time of Kausf, and the validity time of various keys in the security context may not be consistent.
  • the security context is derived based on the intermediate key Kausf#1.
  • the Kaf#1 is invalid, and the AF and the UE cannot continue to use the Kaf#1.
  • Kausf#1 is still in the valid time, and the new Kaf derived from this Kausf#1 is consistent with Kaf#1 and still cannot be used. Therefore, Kausf needs to be updated, and a new Kaf#2 is generated based on the new Kausf#2.
  • the security context needs to be updated, otherwise it cannot continue to be used. Therefore, the complexity of the key update is relatively large, which affects the performance of the device.
  • an embodiment of the present application proposes a communication method, including:
  • the access and mobility management function AMF generates a second security context, the second security context is inconsistent with the first security context, and the first security context is the security context currently used by the access and mobility management function; the The ingress and mobility management functions determine whether to activate the second security context.
  • the first security context is a security context corresponding to the first intermediate key, and the first intermediate key is Kausf.
  • the first security context is the currently used security context.
  • the security context may also be a security context corresponding to Kamf.
  • the AMF After the AMF receives the request message from other network elements, the AMF generates the second security context.
  • the other network elements include but are not limited to: Authentication Management Function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF.
  • the AMF can then determine whether to activate the second security context. Specifically, the AMF can use the second security context.
  • the AMF may also update the first security context, and the updated security context is the second security context.
  • the security context in this embodiment of the present application includes materials used for security functions, such as keys, algorithms, and counters.
  • the security context can be divided into: native security context and 5G security context.
  • the native security context refers to the security context generated through the main authentication process.
  • the 5G security context refers to the security context for the 5G system.
  • 5G security context includes but is not limited to 5G NAS security context, 5G AS security context and 5G AKMA security context.
  • the 5G NAS security context is used for security protection between UE and AMF
  • the AS security context is used for security protection between UE and base station.
  • the 5G AKMA security context includes keys (or security materials, or security keys) such as Kakma, A-KID, Kaf, etc.
  • the 5G AKMA security context is generated on the AUSF side after the main authentication process and sent to the AAnF, and on the UE side before the AKMA service is initiated.
  • the AMF does not blindly activate the security context, and after generating a new security context, the AMF determines whether to activate it. This reduces the complexity of key update and improves device performance.
  • the access and mobility management function determining whether to activate the second security context includes: the access and mobility management function reporting to all The terminal device sends a second authentication request message containing a second key identifier, and the second authentication request message is used to trigger a second authentication (also referred to as the second key identifier) between the terminal device and the network.
  • the access and mobility management function determines whether it is necessary to activate the second security context generated in the second authentication process; In the case of two security contexts, the access and mobility management function sends a second non-access stratum security mode command NAS SMC message to the terminal device, and the second NAS SMC message includes the first key identifier;
  • the first key identifier is the key identifier of the first security context currently used by the access and mobility management function. The first key identifier does not match the second key identifier.
  • activation may also be replaced by update.
  • Deactivating the second security context may mean not updating the second security context; or not using the second security context after generating the second security context; or not generating the second security context, which is not limited here.
  • the first security context can continue to be used without activating the second security context.
  • the AMF initiates the second main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for an authentication vector; the UDM generates the authentication vector, and according to the selected The main authentication method determines whether to send the generated authentication vector or the processed authentication vector to the AUSF.
  • the AMF obtains the authentication vector from the AUSF, the AMF sends a second authentication request message to the UE.
  • the second authentication request message The second key identifier is included, and the second authentication request message is used to trigger the second authentication between the UE and the network (also referred to as the second primary authentication procedure).
  • the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here. For the specific process, please refer to the description in Section 6.1.3 of the standard TS 33.501 version 17.1.0.
  • the AMF sends the first key identifier to the UE through a second NAS SMC message ("NAS Security Mode Command" message). That is, the second NAS SMC message carries the first key identifier (eg, ngKSI#1). Specifically, the AMF puts the encryption algorithm and/or the integrity protection algorithm used by the first key identifier into the second NAS SMC message as the selected security algorithm.
  • the second NAS SMC message uses K NASint-1 corresponding to the first key identifier for integrity protection and/or K NASenc-1 for confidentiality protection.
  • the access and mobility management function sends the second authentication request including the second key identifier to the terminal device Before the message, the method further includes:
  • the access and mobility management function sends a first authentication request message containing the first key identifier to the terminal device, and the first authentication request message is used to trigger an exchange between the terminal device and the network.
  • the first authentication between; after the first authentication is successful, send a first NAS SMC message to the terminal device to activate the first security context generated in the first authentication process, the The first NAS SMC message includes the first key identifier.
  • the AMF sends a first authentication request message to the UE, where the first authentication request message includes a first key identifier, and the first authentication request message is used to trigger the first authentication ( Also known as the first primary authentication process).
  • the first key identifier is ngKSI#1
  • the first key identifier corresponds to the first intermediate key.
  • the intermediate key is Kausf as an example for description. Then the first intermediate key is Kausf#1.
  • the AMF After the AMF receives the registration request message, the AMF initiates the main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for the authentication vector; the UDM generates the authentication vector, and determines to send the generated authentication vector according to the selected primary authentication method.
  • the authentication vector or the processed authentication vector is sent to the AUSF.
  • the AMF After the AMF obtains the authentication vector from the AUSF, the AMF sends the first authentication request message to the UE, and the first authentication request message includes the first key identifier.
  • the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here.
  • the specific process please refer to the description in Section 6.1.3 of Standard TS 33.501 Version 17.1.0.
  • the AMF sends a first authentication request message to the UE, where the first authentication request message includes a first key identifier, and the first authentication request message is used to trigger the first authentication ( Also known as the first primary authentication process).
  • the access and mobility management function sends the first authentication request including the first key identifier to the terminal device Before the message, the method further includes:
  • the access and mobility management function receives a registration request message from the terminal device.
  • the UE sends a registration request message to the AMF, and the registration request message is forwarded by the network device.
  • the registration request message carries the UE's Subscription Concealed Identifier (SUCI).
  • SUCI Subscription Concealed Identifier
  • the registration request message may be "Registration Request”.
  • the registration request message triggers the first authentication, that is, the initial authentication of the terminal device.
  • a first security context is generated in the first authentication, and the first security context is activated.
  • the AMF does not need to determine whether to activate the first security context.
  • the computing burden of the device is reduced, and the key complexity is reduced.
  • the access and mobility management function determines whether the second security context generated in the second authentication process needs to be activated, including:
  • the access and mobility management function determines not to update the non-access stratum NAS key and/or the access stratum AS key.
  • the access and mobility management function determines to activate the second security context. Specifically, when the AMF determines to update the 5G NAS security context or the 5G AS security context, for example, the NAS COUNT is about to be overturned. The AMF determines to activate the second security context.
  • the access and mobility management function determines to update the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device, the access and mobility management function determines to activate the first 2.
  • Security context
  • the access and mobility management function determines that the second authentication is triggered by the first network element, then the access and mobility management function does not activate the second security context, and the first network element includes the following: Either: Authentication Management Function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF. That is, after the AMF receives the message for requesting to update the key from the first network element, the AMF does not activate the second security context.
  • the access and mobility management function determines that the second authentication only needs to authenticate the terminal device, and the access and mobility management function does not activate the second security context;
  • the access and mobility management function determines that the second authentication is triggered by the terminal device, and the access and mobility management function does not activate the second security context.
  • the AMF determines not to activate the second security context according to the local policy.
  • An exemplary scenario is as follows: when the operator configures the following scenarios, the UE authentication is triggered and the second security context is not activated. open connection); AMF data is migrated, that is, migrated from AMF#1 to AMF#2.
  • Whether to activate the second security context is determined through various means, which improves the implementation flexibility of the solution.
  • the method further includes:
  • the access and mobility management function determines that activation of the second security context is required, the access and mobility management function sends the second key identifier to the terminal device.
  • the AMF determines to initiate the main authentication process, the AMF requests the AUSF to authenticate the UE, the AUSF requests the authentication vector from the UDM, the UDM sends the authentication vector to the AUSF, and the AUSF sends the authentication vector to the AMF after processing.
  • the AMF generates a second key identifier after receiving the processed authentication vector, and sends the second key identifier to the UE along with the processed authentication vector.
  • the AMF sends the second key identifier to the UE through an "Authentication Request" message.
  • the second key identifier may be ngKSI#2.
  • the method further includes:
  • the access and mobility management function determines that the second security context needs to be activated, the access and mobility management function sends first indication information to the terminal device, where the first indication information is related to The second network element is associated, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element;
  • the second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  • the first indication information comes from AAnf.
  • the AAnF sends a second key request message to the AUSF, where the second key request message carries the first indication information.
  • the AUSF sends the first indication information to the AMF.
  • the AMF sends the first indication information to the UE.
  • the first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element.
  • the second network element includes any of the following but not limited to NEF, AAnF, ECS, EES or AF.
  • the first indication information may be identification information (AF_ID) of the AF.
  • the method further includes:
  • the access and mobility management function determines that the second security context needs to be activated, the access and mobility management function activates the non-access stratum NAS key of the second intermediate key, the first The second security context corresponds to the second intermediate key;
  • the access and mobility management function does not activate the access stratum AS key of the second intermediate key.
  • the AMF determines whether to update the AS key. If the primary authentication triggers the process because the NAS key needs to be updated, for example, the NAS counter value is about to roll over. In order to save the complexity of the UE, the AMF may determine not to update the AS key. Then, when the AMF activates the second security context, it does not activate the AS key corresponding to the second key identifier. That is, the second security context activated by the AMF does not include the AS key, and the AMF only activates the NAS key corresponding to the second key identifier. For example, the AMF does not activate the AS key corresponding to ngKSI#2, and the AS key includes but is not limited to: the key K gNB .
  • AMF does not generate K gNB corresponding to ngKSI#2 (AMF does not generate new K gNB #2, and old K gNB #1 corresponds to ngKSI#1), or after AMF generates K gNB #2, it does not send the K gNB #2 gNB #2 to network equipment (eg base station).
  • AMF does not generate new K gNB #2, and old K gNB #1 corresponds to ngKSI#1
  • AMF does not send the K gNB #2 gNB #2 to network equipment (eg base station).
  • the access and mobility management function sends the second authentication request including the second key identifier to the terminal device Before the message, the method further includes:
  • the access and mobility management function receives a third authentication request message sent by the first network element, wherein the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message The message is used to trigger the second authentication between the terminal device and the network;
  • the first network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  • the third authentication request message instructs the AMF to determine whether to activate the second security context. Specifically, the third authentication request message is used to request the AMF to trigger the main authentication process.
  • the third authentication request message carries the permanent identity information of the UE.
  • the third authentication request message carries indication information, where the indication information is used to indicate a reason value that needs to trigger the main authentication process.
  • the AMF may determine, according to the third authentication request message or the indication information carried in the third authentication request message, that the primary authentication process is to update the AKMA-related key, and the AMF determines not to activate the second security context.
  • the third authentication request message may be "initial primary authentication Request".
  • the AMF determines whether the second security context needs to be activated according to the indication information. If the AMF determines that the NAS COUNT is about to be rolled over, that is, the rollover of the NAS COUNT requires the activation of the second security context, the AMF determines that the second security context is to be activated.
  • the third authentication request message carries indication information, where the indication information is used to indicate a reason value that needs to trigger the main authentication process.
  • the first network element is AAnF.
  • the AAnF may directly send a third authentication request message to the AMF, where the third authentication request message carries the permanent identification information of the UE, and optionally carries the AF ID. Before the AAnF sends this message, the AAnF needs to determine the AMFs that can serve the UE. The AAnF determines the AMF serving the UE from the UDM according to the UE's permanent identity information.
  • the access and mobility management function sends the second NAS SMC message to the terminal device, including:
  • the access and mobility management function selects a security algorithm to perform integrity protection and confidentiality protection on the second NAS SMC message sent by the access and mobility management function to the terminal device; If the security algorithm selected by the mobility management function is the same as the security algorithm corresponding to the first security context, the access and mobility management function determines not to activate the second security context; The terminal device sends the second NAS SMC message, where the second NAS SMC message includes the first key identifier. The AMF determines whether to activate the second security context according to whether the selected security algorithm (the security algorithm for processing the second NAS SMC message) is the same as the security algorithm corresponding to the currently used first security context.
  • the AMF sends a second NAS SMC message to the UE, where the second NAS SMC message includes the first key identifier.
  • the NAS key identified by the first key identifier is the key currently being used by the AMF and the UE. Through the first key identifier, the UE is notified to not activate the second security context.
  • the method further includes:
  • the access and mobility management function sends a second non-access stratum security mode command NAS SMC message to the terminal device, the second NAS SMC message includes second indication information, and the second indication information indicates the
  • the terminal device generates Kamf#2, and activates the second security context corresponding to Kamf#2, where Kamf#2 is the updated Kamf.
  • the AMF determines that the second security context does not need to be activated.
  • the second NAS SMC message includes second indication information (Kamf change), which indicates that the UE needs to generate a new Kamf, which is called Kamf#2 (the original used by the UE The Kamf is called Kamf#1).
  • the AMF carries the first key identifier in the second NAS SMC message,
  • the primary authentication process does not occur, but the AMF generates Kamf#2 and the second key identifier, and the AMF determines that the second security context does not need to be activated.
  • the AMF sends the second indication information to the UE, and the second indication information informs the UE that a new Kamf needs to be generated, which is called Kamf#2. If the AMF obtains the second key identifier, the second NAS SMC message carries the first key identifier and the second indication information.
  • the second NAS SMC message further includes third indication information, where the third indication information instructs the terminal device to continue using the first security
  • the NAS security context in the context and the AS security context in the first security context instructs the terminal device to continue using the first security
  • the NAS security context in the context and the AS security context in the first security context instructs the terminal device to continue using the first security
  • the second NAS SMC message may also carry a third indication information.
  • the third indication information is used to inform the UE that the currently used NAS security context and AS security context do not need to be updated.
  • the currently used NAS security context may also be referred to as the NAS security context in the first security context
  • the currently used AS security context may also be referred to as the AS security context in the first security context.
  • the NAS security context may be a 5G NAS security context
  • the AS security context may be a 5G AS security context.
  • the specific form of the third indication information is not specifically limited in this embodiment. It may be bit indication information, or enumeration type information, or it may be indicated by whether it appears or not. For example, a third indication appears in the second NAS SMC message. The information does not update the currently used 5G NAS security context and 5G AS security context. If it does not appear in the second NAS SMC message, it indicates that the UE needs to update the currently used 5G NAS security context and 5G AS security context.
  • the AMF determines that the second security context does not need to be activated.
  • the second NAS SMC message includes second indication information (Kamf change indicator), and the second indication information indicates that the UE needs to generate a new Kamf, which is called Kamf#2 (the original Kamf of the UE).
  • the Kamf used is called Kamf#1).
  • the AMF carries the first key identifier in the second NAS SMC message, and optionally, the second NAS SMC message also carries third indication information.
  • the primary authentication process does not occur, but the AMF generates Kamf#2 and the second key identifier, and the AMF determines that the second security context does not need to be activated.
  • the AMF sends the second indication information to the UE, and the second indication information informs the UE that a new Kamf needs to be generated, which is called Kamf#2. If the AMF obtains the second key identifier, the second NAS SMC message carries the first key identifier and the second indication information, or the second NAS SMC message carries the second key identifier and the third indication information and second indication information.
  • the second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, KNASint #2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 , or K N3IWF#2 .
  • an embodiment of the present application proposes a communication method, including:
  • the terminal device receives a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, and the second NAS SMC message carries the key identifier from the AMF; when the When the key identifier is the same as the first key identifier of the first security context being used by the terminal device, the terminal device determines not to activate the second security context, which is the same as the first security context. Inconsistent context.
  • the security context in this embodiment of the present application includes materials used for security functions, such as keys, algorithms, and counters.
  • the security context can be divided into: native security context and 5G security context.
  • the native security context refers to the security context generated through the main authentication process.
  • the 5G security context refers to the security context for the 5G system.
  • 5G security context includes but is not limited to 5G NAS security context, 5G AS security context and 5G AKMA security context.
  • 5G NAS security context is used for security protection between UE and AMF
  • AS security context is used for security protection between UE and base station.
  • the 5G AKMA security context includes keys (or security materials, or security keys) such as Kakma, A-KID, Kaf, etc.
  • the 5G AKMA security context is generated on the AUSF side after the main authentication process and sent to the AAnF, and on the UE side before the AKMA service is initiated.
  • the UE does not blindly activate the security context, and after generating a new security context, the UE determines whether to activate it. This reduces the complexity of key update and improves device performance.
  • the terminal device determining not to activate the second security context includes: the terminal device determining not to activate the NAS in the second security context The security context and/or the AS security context in the second security context.
  • the UE may not activate part of the NAS security context in the second security context and/or the AS security context in the second security context to improve the implementation flexibility of the solution.
  • the method further includes: the terminal device verifies the password from the AMF Whether the security algorithm corresponding to the key identifier is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the security algorithm selected by the access and mobility management function; When the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, the terminal device determines not to update the first security context.
  • the UE After the UE receives the second NAS SMC message, if the second NAS SMC message is encrypted and protected, the UE decrypts and protects the message using the key currently being used by the UE.
  • the UE After the UE receives the second NAS SMC message, the UE performs integrity protection verification on the message using the key currently being used by the UE. And verify whether the security algorithm carried in the second NAS SMC message is the same as the security algorithm carried by the UE in the registration request message, and the security algorithm includes: the integrity protection algorithm and the encryption algorithm of the UE. After all verifications are passed, the UE determines the key to be used subsequently according to the first key identifier.
  • the different schemes are described below:
  • the terminal device when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is the same as the security algorithm corresponding to the first intermediate key, the terminal device continues to use the first security algorithm context, the terminal device does not perform any processing, wherein the first security context corresponds to the first intermediate key;
  • the terminal device uses the second intermediate key to generate the second security context, and the terminal device activates the second security context;
  • the terminal device when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is different from the security algorithm corresponding to the first intermediate key, then the terminal device according to the first intermediate key The key generates a third security context, and the terminal device activates the third security context.
  • the UE when the key identifier from the AMF is the first key identifier, the UE needs to use the key corresponding to the first key identifier, that is, the UE needs to use the first security context and the first intermediate key .
  • the UE can continue to use the original intermediate key (the first intermediate key) and the first security context.
  • the UE may reactivate the first intermediate key and the first security context, which is not limited here.
  • the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify the second NAS SMC message. Whether the security algorithm corresponding to the key identifier is the same as the security algorithm currently being used by the UE. If all are the same, and the UE verifies that the integrity protection of the NAS SMC is correct, the UE can continue to use the current 5G NAS security context without performing any operations. That is, with the current key and security algorithm, the NAS COUNT does not need to be reset to 0 either.
  • the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify that the second NAS SMC message contains the same key identifier. Whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm currently being used by the UE. If only the latter is different (that is, the key identifiers are the same, but the security algorithms are inconsistent), the UE needs to use the Kamf#1 corresponding to the Kausf#1 identified by ngKSI#1, and use the new security algorithm carried in the second NAS SMC message to generate the first Three security contexts.
  • the third security context may be a new 5G NAS security context (corresponding to the first intermediate key), specifically, a new K NAS-int and a new K NASenc are generated, and the NAS COUNT is reset to 0.
  • the UE verifies the integrity protection of the second NAS SMC message using the newly generated K NAS-int . It can be understood that, because the second NAS SMC message carries ngKSI#1, only the first intermediate key corresponding to ngKSI#1 can be used to further derive the subkey. So just generate a new NAS key and that's it.
  • the UE performs an activation operation on the key identified by the first key identifier, which may include at least one of the following steps: generating Kseaf#1 according to the Kausf#1 identified by the key identifier #1, generating Kseaf#1, Use Kseaf#1 to generate Kamf#1, then use Kamf#1 and the selected security algorithm carried in the second NAS SMC message to generate K NASint#1 and K NASenc#1 , and encrypt the K NASint#1 and K NASenc#1 algorithms and integrity protection algorithms are used for specific functions, but the NAS COUNT remains the same.
  • the UE only compares whether the key identifier from the AMF carried in the second NAS SMC message is the same as the key identifier corresponding to the key currently being used. If the integrity protection check of the SMC message is successful, no operation is performed and the current 5G NAS security context continues to be used.
  • the UE further checks whether the third indication information is received. If the UE receives the third indication information, the UE only generates a new Kamf (generates Kamf#2), and does not update the 5G NAS and/or 5G AS security context.
  • the terminal device will continue to use the first security context, that is, only the Kamf#2 needs to be generated , and no other processing will be performed. That is to say, the terminal device can continue to use the 5G NAS security context and 5G AS security context generated based on Kausf#1.
  • the terminal device only needs to generate Kamf#2, and no other processing is required.
  • the AMF when the access and mobility management function determines that the second security context needs to be activated, the AMF sends the NAS SMC#2 to the UE,
  • the NAS SMC#2 also includes first indication information.
  • the first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element;
  • the second network element includes Any of the following: Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF.
  • the first indication information comes from AAnf.
  • the AAnF sends a second key request message to the AUSF, where the second key request message carries the first indication information.
  • the AUSF sends the first indication information to the AMF.
  • the AMF sends the first indication information to the UE.
  • the first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element.
  • the second network element includes any of the following but not limited to NEF, AAnF, ECS, EES or AF.
  • the first indication information may be identification information (AF_ID) of the AF.
  • an embodiment of the present application provides a communication device, including:
  • a processing module configured to generate a second security context, where the second security context is inconsistent with the first security context, and the first security context is the security context currently used by the access and mobility management function;
  • the processing module is further configured to determine whether to activate the second security context.
  • a transceiver module configured to send a second authentication request message containing a second key identifier to the terminal device, where the second authentication request message is used to trigger a second authentication between the terminal device and the network ;
  • the processing module is further configured to determine whether the second security context generated in the second authentication process needs to be activated after the second authentication is successful;
  • the transceiver module is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device without activating the second security context, where the second NAS SMC message includes the first NAS SMC message. a key identifier; wherein the first key identifier is the key identifier of the first security context currently used by the access and mobility management function.
  • the transceiver module is further configured to send a first authentication request message containing the first key identifier to the terminal device, where the first authentication request message is used to trigger the connection between the terminal device and the network the first authentication;
  • the transceiver module is further configured to, after the first authentication succeeds, send a first NAS SMC message to the terminal device to activate the first security context generated in the first authentication process, so the The first NAS SMC message includes the first key identifier.
  • the transceiver module is further configured to receive a registration request message from the terminal device.
  • the processing module is further configured to determine not to activate the second security context when it is determined not to update the non-access stratum NAS key and/or the access stratum AS key,
  • the processing module is further configured to determine to activate the second security context when it is determined that the non-access stratum NAS counter rolls over,
  • the processing module is further configured to determine to activate the second security context when it is determined to update the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device;
  • the processing module is further configured to not activate the second security context when it is determined that the second authentication is triggered by a first network element, and the first network element includes any one of the following: an authentication management function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF;
  • the processing module is further configured to not activate the second security context when it is determined that the second authentication only needs to authenticate the terminal device;
  • the processing module is further configured to not activate the second security context when it is determined that the second authentication is triggered by the terminal device.
  • the transceiver module is further configured to send the second key identifier to the terminal device after it is determined that the second security context is activated.
  • the transceiver module is further configured to, after determining to activate the second security context, send first indication information to the terminal device, where the first indication information is associated with the second network element, and the first indication information indicates The terminal device updates the communication key between the terminal device and the second network element;
  • the second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  • the transceiver module is further configured to activate, by the access and mobility management function, the non-access stratum NAS key of the second intermediate key after determining to activate the second security context, the second security context corresponding to the second intermediate key;
  • the access and mobility management function does not activate the access stratum AS key of the second intermediate key.
  • the transceiver module is further configured to receive a third authentication request message sent by the first network element, wherein the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message for triggering the second authentication between the terminal device and the network;
  • the first network element includes any one of the following: AUSF, NEF, AAnF, ECS, EES or AF.
  • the processing module is further configured to select a security algorithm to perform integrity protection and confidentiality protection on the second NAS SMC message sent by the access and mobility management function to the terminal device;
  • the processing module is further configured to determine that the second security context is not activated when the security algorithm selected by the access and mobility management function is the same as the security algorithm corresponding to the first security context;
  • the transceiver module is further configured to send the second NAS SMC message to the terminal device, where the second NAS SMC message includes the first key identifier.
  • the transceiver module is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device, where the second NAS SMC message includes second indication information, and the second indication information indicates the terminal
  • the device generates Kamf#2, and activates the second security context corresponding to Kamf#2, which is the updated Kamf.
  • the second NAS SMC message further includes third indication information, where the third indication information instructs the terminal device to continue to use the NAS security context in the first security context and the AS security context in the first security context .
  • the second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, K NASint#2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 or K N3IWF#2 .
  • an embodiment of the present application provides a communication device, including:
  • transceiver module for receiving a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, where the second NAS SMC message carries the key identifier from the AMF;
  • a processing module configured to determine that the second security context is not activated when the key identifier is the same as the first key identifier of the first security context being used by the terminal device, and the second security context is the same as the first security context.
  • the first security context described above is inconsistent.
  • the processing module is further configured to determine not to activate the NAS security context in the second security context and/or the AS security context in the second security context.
  • the processing module is further configured to verify whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the same a security algorithm selected for the access and mobility management function;
  • the processing module is further configured to determine not to update the first security context when the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context.
  • the transceiver module is further configured to receive first indication information sent by the access and mobility management function, where the first indication information is associated with a second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element;
  • the second network element includes any one of the following: a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  • an embodiment of the present application provides a communication device, which can implement the functions performed by the terminal device and the network device in the methods involved in the first and second aspects above.
  • the communication device includes a processor, a memory, a receiver connected to the processor and a transmitter connected to the processor; the memory is used for storing program codes and transmitting the program codes to the processor; the processor is used for Drive the receiver and the transmitter to execute the methods in the first and second aspects according to the instructions in the program code; the receiver and the transmitter are respectively connected to the processor to execute the methods in the above aspects. Operation of equipment and network equipment. Specifically, the transmitter can perform the operation of sending, and the receiver can perform the operation of receiving.
  • the receiver and the transmitter can be a radio frequency circuit, and the radio frequency circuit can receive and send messages through an antenna; the receiver and the transmitter can also be a communication interface, and the processor and the communication interface are connected through a bus, and the processing The server implements receiving or sending messages through this communication interface.
  • an embodiment of the present application provides a communication apparatus, where the communication apparatus may include entities such as network equipment or chips, or the communication apparatus may include entities such as terminal equipment or chips, and the communication apparatus includes: a processor and a memory; The memory is used to store instructions; the processor is used to execute the instructions in the memory, so that the communication device performs the method according to any one of the aforementioned first or second aspects.
  • embodiments of the present application provide a computer-readable storage medium that stores one or more computer-executable instructions.
  • the processor executes the first aspect or the second method described above. Any of the possible implementations of the aspect.
  • an embodiment of the present application provides a computer program product (or a computer program) that stores one or more computer-executable instructions, and when the computer-executable instructions are executed by the processor, the processor executes the aforementioned first aspect or any possible implementation manner of the second aspect.
  • the present application provides a chip system, where the chip system includes a processor for supporting a computer device to implement the functions involved in the above aspects.
  • the chip system further includes a memory for storing necessary program instructions and data of the computer device.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the present application provides a communication system, where the communication system includes the communication apparatus in the fourth and fifth aspects above.
  • FIG. 1 is a schematic diagram of a network architecture of a communication system
  • FIG. 2 is a schematic diagram of a hardware structure of a communication device in an embodiment of the present application.
  • FIG. 3 is a schematic diagram of an access flow of a UE through forwarding
  • Fig. 4 is the generation flow schematic diagram of key Kaf
  • FIG. 5 is a schematic flowchart of the NAS SMC involved in the embodiment of the application.
  • FIG. 6 is a schematic flowchart of a communication method proposed by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an application scenario proposed by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another application scenario proposed by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another application scenario proposed by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of an embodiment of a communication device in an embodiment of the present application.
  • FIG. 11 is a schematic diagram of an embodiment of a communication apparatus in an embodiment of the present application.
  • At least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
  • WCDMA Wideband Code Division Multiple Access
  • GPRS general packet radio service
  • LTE Long Term Evolution
  • FDD frequency division duplex
  • TDD LTE time division duplex
  • UMTS universal mobile telecommunication system
  • WiMAX world wide interoperability for microwave access
  • the part of various communication systems that is operated by an operator may be referred to as an operator network.
  • the operator network also known as the public land mobile network (PLMN) network, is a network established and operated by the government or government-approved operators for the purpose of providing land mobile communication services to the public.
  • a mobile network operator (MNO) is a public network that provides users with mobile broadband access services.
  • the operator network or PLMN network described in the embodiments of this application may be a network that meets the requirements of the 3rd generation partnership project (3rd generation partnership project, 3GPP) standard, which is referred to as a 3GPP network for short.
  • 3rd generation partnership project 3rd generation partnership project
  • 3GPP networks are operated by operators, including but not limited to fifth-generation (5th-generation, 5G) networks (referred to as 5G networks), fourth-generation (4th-generation, 4G) networks (referred to as 4G networks) Or the third-generation mobile communication technology (3rd-generation, 3G) network (referred to as 3G network). Also includes future 6G networks.
  • 5G networks fifth-generation (5th-generation, 5G) networks
  • 4G networks fourth-generation, 4G networks
  • 3G network third-generation mobile communication technology
  • 3G network third-generation mobile communication technology
  • 3G network third-generation mobile communication technology
  • FIG. 1 is a schematic diagram of a network architecture of a communication system.
  • the network architecture may include: a terminal device (also referred to as a user equipment part, an operator network part, and a data network (DN) part) .
  • DN data network
  • the terminal equipment part includes a terminal equipment 110, and the terminal equipment 110 may also be referred to as user equipment (user equipment, UE).
  • the terminal device 110 involved in the embodiments of the present application can communicate with a device in the (radio) access network ((R)AN) 140 through the access network device in the (R)AN) 140 . or multiple core networks (core networks, CN) to communicate.
  • Terminal equipment 110 may also be referred to as an access terminal, terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless network device, user agent or user device, and the like.
  • the terminal device 110 can be deployed on land, including indoor or outdoor, hand-held or vehicle-mounted; can also be deployed on water (such as ships, etc.); and can also be deployed in the air (such as planes, balloons, satellites, etc.).
  • the terminal device 110 may be a cellular phone (cellular phone), a cordless phone, a session initiation protocol (SIP) phone, a smart phone (smart phone), a mobile phone (mobile phone), a wireless local loop (WLL) ) station, a personal digital assistant (PDA), which can be a handheld device with wireless communication capabilities, a computing device or other device connected to a wireless modem, an in-vehicle device, a wearable device, a drone device, or the Internet of Things,
  • 5G fifth generation
  • PLMN public land mobile network
  • the terminal, etc., where the relay user equipment may be, for example, a 5G residential gateway (RG).
  • the terminal device 110 may be a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control (industrial control), a wireless terminal in self driving, remote Wireless terminal in medical (remote medical), wireless terminal in smart grid (smart grid), wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home (smart home) wireless terminals, etc.
  • This embodiment of the present application does not limit this.
  • the terminal device 110 includes an unmanned aerial vehicle and an unmanned aerial vehicle remote controller as an example for description.
  • drones involved in the embodiments of the present application may also include: a vehicle that can travel autonomously, or a vehicle that travels based on the control instructions of a remote controller; a ship that can travel autonomously , or ships sailing based on the control commands of the remote control.
  • the operator network may include unified data management (UDM) 134, authentication server function (AUSF) 136, access and mobility management function (AMF) 137, session management Function (session management function, SMF) 138, user plane function (user plane function, UPF) 139 and (R)AN 140 and so on.
  • UDM unified data management
  • AUSF authentication server function
  • AMF access and mobility management function
  • SMF session management Function
  • user plane function user plane function
  • UPF user plane function
  • the data network DN 120 which may also be referred to as a protocol data network (PDN), is usually a network outside the operator's network, such as a third-party network.
  • the operator network can access multiple data networks DN 120, and multiple services can be deployed on the data network DN 120, which can provide services such as data and/or voice for the terminal device 110.
  • the data network DN 120 can be a private network of a smart factory, the sensors installed in the workshop of the smart factory can be terminal devices 110, and the control server of the sensor is deployed in the data network DN 120, and the control server can provide services for the sensor.
  • the sensor can communicate with the control server, obtain instructions from the control server, and transmit the collected sensor data to the control server based on the instructions.
  • the data network DN 120 can be an internal office network of a company, and the mobile phones or computers of employees of the company can be terminal devices 110, and the mobile phones or computers of employees can access information, data resources, etc. on the internal office network of the company.
  • the terminal device 110 may establish a connection with the operator's network through an interface (eg, N1, etc.) provided by the operator's network, and use services such as data and/or voice provided by the operator's network.
  • the terminal device 110 can also access the data network DN 120 through the operator network, and use the operator services deployed on the data network DN 120, and/or services provided by third parties.
  • the above-mentioned third party may be a service provider other than the operator network and the terminal device 110 , and may provide other data and/or voice services for the terminal device 110 .
  • the specific expression form of the above third party can be specifically determined based on the actual application scenario, which is not limited here.
  • the (R)AN 140 can be regarded as a sub-network of the operator's network, and is an implementation system between the service node and the terminal device 110 in the operator's network.
  • the terminal device 110 To access the operator network, the terminal device 110 first passes through the (R)AN 140, and then can be connected to the service node of the operator network through the (R)AN 140.
  • the access network device (RAN device) in this embodiment of the application is a device that provides wireless communication functions for the terminal device 110, and may also be referred to as a network device.
  • the RAN device includes but is not limited to: next-generation base stations in the 5G system Node (next generation node base station, gNB), evolved node B (evolved node B, eNB) in long term evolution (long term evolution, LTE), radio network controller (radio network controller, RNC), node B (node B) B, NB), base station controller (BSC), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved nodeB, or home node B, HNB), base band unit (base band unit) , BBU), transmission point (transmitting and receiving point, TRP), transmitting point (transmitting point, TP), small base station equipment (pico), mobile switching center, or network equipment in future networks, etc.
  • next-generation base stations in the 5G system Node node base station, gNB
  • evolved node B evolved node B
  • eNB evolved node B
  • long term evolution long term evolution, LTE
  • radio network controller radio
  • the names of devices with access network device functions may be different.
  • the above-mentioned apparatuses for providing wireless communication functions for the terminal device 110 are collectively referred to as access network devices or simply referred to as RAN or AN. It should be understood that the specific type of the access network device is not limited herein.
  • the Access and Mobility Management Function AMF (also referred to as AMF network element, AMF network function or AMF network function entity) 137 is a control plane network function provided by the operator's network and is responsible for the connection of the terminal device 110 to the operator's network. Access control and mobility management, including functions such as mobility status management, assigning user temporary identities, authenticating and authorizing users.
  • the session management function SMF (also referred to as SMF network element, SMF network function or SMF network function entity) 138 is a control plane network function provided by the operator network, responsible for managing the protocol data unit (PDU) of the terminal device 110 ) session.
  • the PDU session is a channel for transmitting PDUs, and the terminal device needs to transfer PDUs to and from the data network DN 120 through the PDU session.
  • the PDU session is established, maintained and deleted by the SMF network function 138.
  • SMF network functions 138 include session management (eg session establishment, modification and release, including tunnel maintenance between user plane functions UPF 139 and (R)AN 140), selection and control of UPF network functions 139, service and session continuity ( Service and session continuity, SSC) mode selection, roaming and other session-related functions.
  • session management eg session establishment, modification and release, including tunnel maintenance between user plane functions UPF 139 and (R)AN 140
  • selection and control of UPF network functions 139 selection and control of UPF network functions 139
  • service and session continuity Service and session continuity, SSC) mode selection, roaming and other session-related functions.
  • the user plane function UPF (may also be referred to as UPF network element, UPF network function or UPF network function entity) 139 is a gateway provided by the operator, and is a gateway for the operator network to communicate with the data network DN 120.
  • the UPF network function 139 includes user plane-related functions such as data packet routing and transmission, data packet detection, service usage reporting, quality of service (QoS) processing, legal interception, uplink data packet detection, and downlink data packet storage.
  • QoS quality of service
  • the unified data management network element UDM (also referred to as UDM network element, UDM network function or UDM network function entity) 134 is a control plane function provided by the operator, and is responsible for storing the permanent identity (subscriber permanent identity) of the subscriber in the operator's network.
  • identifier, SUPI the permanent identity (subscriber permanent identity) of the subscriber in the operator's network.
  • SUPI the publicly used subscription identifier (generic public subscription identifier, GPSI) of the contracting user, credential (credential) and other information.
  • the SUPI will be encrypted first in the transmission process, and the encrypted SUPI is called a hidden user subscription identifier (SUCI).
  • This information stored by UDM 134 can be used for authentication and authorization of terminal device 110 to access the operator's network.
  • the above-mentioned subscribers of the operator's network may specifically be users who use the services provided by the operator's network, such as users using "China Telecom” mobile phone SIM cards, or users using “China Mobile” mobile phone SIM cards, etc.
  • the above-mentioned credential of the signing user may be: a long-term key stored in the mobile phone core card or a small file stored with information related to encryption of the mobile phone core card, etc., for authentication and/or authorization.
  • permanent identifiers, credentials, security contexts, authentication data (cookies), and tokens are equivalent to verification/authentication, and authorization-related information are not differentiated and limited in the embodiments of the present application for convenience of description.
  • the authentication management function (authentication server function, AUSF) (also referred to as AUSF network element, AUSF network function or AUSF network function entity) 136 is a control plane function provided by the operator, usually used for main authentication, that is, the terminal device 110 Authentication between the (subscriber) and the operator network.
  • AUSF authentication server function
  • AUSF network element also referred to as AUSF network function or AUSF network function entity
  • AUSF network element also referred to as AUSF network element, AUSF network function or AUSF network function entity
  • AUSF network function entity is a control plane function provided by the operator, usually used for main authentication, that is, the terminal device 110 Authentication between the (subscriber) and the operator network.
  • the AUSF 136 After the AUSF 136 receives the authentication request initiated by the subscribed user, it can authenticate and/or authorize the subscribed user through the authentication information and/or authorization information stored in the UDM network function 134, or generate the authentication and/or
  • an AKMA Anchor Key is generated for the Authentication and Key Management for Application (AKMA) Anchor Function, AAnF) 130
  • the key Kakma this key management key is also called the AKMA intermediate key, and is responsible for generating the key Kaf and the validity time of Kaf used by the AF 135 for the application function (AF) 135.
  • the Network Exposure Function (NEF) 131 acts as an intermediate network element for the external application function (application Function, AF) 135 and the authentication and key management for Application (AKMA) anchor function within the core network.
  • Application Function application Function
  • AKMA authentication and key management for Application
  • the Network Repository Function (NRF) 132 is used for network function (Network Function, NF) registration, management, or state detection, and realizes the automatic management of all NFs. When each NF starts, it must register with the NRF. Only registration can provide services, and registration information includes NF type, address, or service list.
  • Network Function Network Function
  • PCF Policy control function
  • AF 135 Quality of Service (Quality of Service, QoS) parameters
  • QoS Quality of Service
  • the application function AF 135 interacts with the 3rd Generation Partnership Project (3GPP) core network to provide application layer services. For example: provide data routing on the application layer and provide the ability to access the network.
  • AF 135 can interact with NEF 131 and can interact with PCF 133.
  • the AF135 needs to interact with the AAnF 130 to obtain the AF intermediate key (Kaf) and the valid time of the Kaf.
  • the location of AF 135 can be inside the 5G core network or outside the 5G core network. If the AF is inside the 5G core network, it can directly interact with the PCF 133. If the AF 135 is outside the 5G core network, the NEF 131 acts as an intermediate node to forward the interactive content between the AF 135 and the PCF 133. Such as forwarding through NEF.
  • AKMA anchor function AAnF 130, AAnF 130 will interact with AUSF 136 to obtain the AKMA intermediate key (Kakma), and is responsible for generating the valid time of the key Kaf and Kaf used by AF 135 for AF 135.
  • Nausf, Nudm, Namf, Nsmf, Nnrf, Nnef, Naanf, Naf, N1, N2, N3, N4, and N6 are interface serial numbers.
  • these interface serial numbers refer to the meanings defined in the 3GPP standard protocol, which will not be repeated here.
  • the terminal device 110 is used as an example for the UE, and the interface names between various network functions in FIG. 1 are only an example.
  • the interface names of the system architecture Other names may also be used, which are not specifically limited in this embodiment of the present application.
  • the mobility management network function is the AMF network function 137 as an example for description. It may also be other network functions with the above-mentioned AMF network function 137 in the future communication system. Alternatively, the mobility management network function in this application may also be a mobility management network element (Mobility Management Entity, MME) in LTE, or the like. Further, the AMF network function 137 is referred to as AMF for short, and the terminal device 110 is referred to as UE, that is, the AMF described later in the embodiments of the present application can be replaced by a mobility management network function, and the UE can be replaced by a terminal device. .
  • MME Mobility Management Entity
  • a method for generating a key identifier provided by this application can be applied to various communication systems, for example, it can be the Internet of Things (Internet of Things, IoT), the narrowband Internet of Things (NB-IoT), Long term evolution (LTE), it can also be the fifth generation (5G) communication system, it can also be a hybrid architecture of LTE and 5G, it can also be a 5G new radio (NR) system and it will appear in the future communication development. new communication systems, etc.
  • the 5G communication system of the present application may include at least one of a non-standalone (NSA) 5G communication system and an independent (standalone, SA) 5G communication system.
  • the communication system may also be a public land mobile network (PLMN) network, a device-to-device (D2D) network, a machine-to-machine (M2M) network, or other networks.
  • PLMN public land mobile network
  • D2D device-to-device
  • M2M machine-to-machine
  • embodiments of the present application may also be applicable to other future-oriented communication technologies, such as 6G and the like.
  • the network architecture and service scenarios described in this application are for the purpose of illustrating the technical solutions of this application more clearly, and do not constitute a limitation on the technical solutions provided by this application.
  • the appearance of each network function involved in this application may be changed, and the technical solutions provided in this application are also applicable to similar technical problems.
  • FIG. 2 is a schematic diagram of a hardware structure of a communication device according to an embodiment of the present application.
  • the communication apparatus may be a possible implementation manner of the network device or the terminal device in the embodiment of the present application.
  • the communication apparatus includes at least a processor 204 , a memory 203 , and a transceiver 202 , and the memory 203 is further configured to store instructions 2031 and data 2032 .
  • the communication device may further include an antenna 206 , an I/O (input/output, Input/Output) interface 210 and a bus 212 .
  • the transceiver 202 further includes a transmitter 2021 and a receiver 2022.
  • the processor 204 , the transceiver 202 , the memory 203 and the I/O interface 210 are communicatively connected to each other through the bus 212 , and the antenna 206 is connected to the transceiver 202 .
  • the processor 204 can be a general-purpose processor, such as, but not limited to, a central processing unit (Central Processing Unit, CPU), or can be a special-purpose processor, such as, but not limited to, a digital signal processor (Digital Signal Processor, DSP), application Application Specific Integrated Circuit (ASIC) and Field Programmable Gate Array (FPGA), etc.
  • the processor 204 may also be a neural network processing unit (NPU).
  • the processor 204 may also be a combination of multiple processors.
  • the processor 204 may be configured to execute the relevant steps of the method for generating the key identifier in the subsequent method embodiments.
  • the processor 204 may be a processor specially designed to perform the above steps and/or operations, or may be a processor that performs the above steps and/or operations by reading and executing the instructions 2031 stored in the memory 203, the processor 204 Data 2032 may be required in performing the steps and/or operations described above.
  • the transceiver 202 includes a transmitter 2021 and a receiver 2022 .
  • the transmitter 2021 is used to transmit signals through the antenna 206 .
  • the receiver 2022 is used to receive signals through at least one of the antennas 206 .
  • the transmitter 2021 may be specifically configured to be executed by at least one antenna among the antennas 206.
  • the method for generating the key identifier in the subsequent method embodiments is applied to a network device or terminal device, the operation performed by the receiving module or the sending module in the network device or terminal device.
  • the transceiver 202 is configured to support the communication device to perform the aforementioned receiving function and sending function.
  • a processor with processing capabilities is considered processor 204 .
  • the receiver 2022 may also be called an input port, a receiving circuit, and the like, and the transmitter 2021 may be called a transmitter or a transmitting circuit, and the like.
  • the processor 204 may be configured to execute the instructions stored in the memory 203 to control the transceiver 202 to receive messages and/or send messages, so as to complete the function of the communication device in the method embodiment of the present application.
  • the function of the transceiver 202 may be implemented by a transceiver circuit or a dedicated chip for transceiver.
  • receiving a message by the transceiver 202 may be understood as an input message by the transceiver 202
  • sending a message by the transceiver 202 may be understood as an output message by the transceiver 202 .
  • the memory 203 may be various types of storage media, such as random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), non-volatile RAM (Non-Volatile RAM, NVRAM), and Programmable ROM (Programmable ROM, PROM), Erasable PROM (Erasable PROM, EPROM), Electrically Erasable PROM (Electrically Erasable PROM, EEPROM), Flash memory, optical memory and registers, etc.
  • the memory 203 is specifically used to store the instructions 2031 and the data 2032, and the processor 204 can perform the steps and/or operations described in the method embodiments of the present application by reading and executing the instructions 2031 stored in the memory 203. Data 2032 may be required during the operations and/or steps of a method embodiment.
  • the communication apparatus may further include an I/O interface 210, and the I/O interface 210 is used for receiving instructions and/or data from peripheral devices, and outputting instructions and/or data to peripheral devices.
  • I/O interface 210 is used for receiving instructions and/or data from peripheral devices, and outputting instructions and/or data to peripheral devices.
  • UE or USIM
  • UDM or Authentication Credential Respository and Processing Function (ARPF) or Unified Data Repoitory (UDR)
  • ARPF Authentication Credential Respository and Processing Function
  • UDR Unified Data Repoitory
  • the UDM or ARPF On the network device side, the UDM or ARPF generates the key CK and the key IK based on the UE's long-term key K.
  • the authentication methods selected by UDM are different, and the methods of generating the intermediate key Kausf are different.
  • the authentication method selected by the UDM is 5G authentication and key agreement (5G Authentication and Key Agreement, 5G AKA)
  • the UDM or ARPF generates the intermediate key Kausf according to the key CK and the key IK.
  • UDM sends the generated intermediate key Kausf to AUSF.
  • UDM When the authentication method selected by UDM is the Improved Extensible Authentication Protocol Method for 3rd Generation Authentication and Key Agreement (EAP-AKA'), the UDM or ARPF will use the key CK and key IK, generate key CK' and key IK'.
  • the UDM sends the generated key CK' and key IK' to the AUSF.
  • the AUSF generates the intermediate key Kausf based on the key CK' and the key IK'.
  • Security contexts include, but are not limited to: Kseaf, Kamf, Kaf, Kakma, K NASint , K NASenc , K gNB , K RRCint , K RRCenc or K N3IWF .
  • AUSF generates the key Kseaf based on the intermediate key Kausf, and sends the key Kseaf to SEAF.
  • SEAF generates the key Kamf based on the key Kseaf and sends the key Kamf to the AMF.
  • the AMF generates a non-access stratum (NAS) key and an access stratum (access stratum, AS) intermediate key K gNB according to the key Kamf .
  • the AMF delivers the K gNB to the base station, and the base station further generates the AS security context according to the K gNB , such as K RRCint and K RRCenc.
  • the USIM On the terminal device side, first, the USIM generates the key CK and the key IK based on the UE's long-term key K. The USIM sends the key CK and the key IK to the UE.
  • the UE Similar to the network side, there are differences in the way of generating the intermediate key Kausf under different authentication methods.
  • the authentication method used is 5G AKA
  • the UE When the authentication method used is 5G AKA, the UE generates the intermediate key Kausf according to the key CK and the key IK.
  • the authentication method used is EAP-AKA'
  • the UE When the authentication method used is EAP-AKA', the UE generates the key CK' and the key IK' according to the key CK and the key IK.
  • the UE generates the intermediate key Kausf according to the key CK' and the key IK'.
  • the UE generates the key Kseaf according to the intermediate key Kausf.
  • the UE generates the key Kamf according to the key Kseaf.
  • the UE generates the NAS key and K gNB according to the key Kamf .
  • the UE further generates K RRCint and K RRCenc according to K gNB .
  • FIG. 3 is a schematic diagram of an access flow of a UE through forwarding. Take Figure 3 as an example to illustrate the AKMA process, specifically:
  • a primary authentication (Primary authentication) process is performed between the UE and the core network.
  • the main authentication process needs to use an authentication vector (authentication vector, AV), and the authentication vector is used to transfer the verification parameters of the main authentication process in the main authentication process.
  • the AUSF obtains the authentication vector.
  • the main authentication process is also called an authentication process, which is not limited here.
  • the AUSF sends an authentication vector acquisition request message to the UDM.
  • the AUSF sends an authentication vector acquisition request message to the UDM, where the authentication vector acquisition request message is, for example, "Numd_UEAuthentication Get Request".
  • the authentication vector acquisition request message is used to request an authentication vector from the UDM.
  • the authentication vector acquisition request message carries SUPI or SUCI. Specifically, when the message sent by the AMF to the AUSF carries SUPI, the authentication vector acquisition request message carries SUPI; when the message sent by the AMF to the AUSF carries SUCI, the authentication vector acquisition request message carries SUCI.
  • SUCI can be understood as an encrypted form of SUPI.
  • the specific generation method of SUCI can refer to 3GPP standard TS 33.501.
  • the part of SUPI other than the mobile country code (MCC) can be encrypted and calculated by the universal subscriber identity module (USIM) or mobile equipment (ME) to obtain the SUCI encryption part.
  • MCC mobile country code
  • USIM universal subscriber identity module
  • ME mobile equipment
  • SUCI also includes routing identifier RID, MCC, MNC and other contents.
  • the AUSF receives the authentication vector acquisition response message sent by the UDM.
  • step 303 after the UDM receives the authentication vector acquisition request message in step 302, the UDM determines the corresponding authentication vector.
  • the UDM sends an authentication vector acquisition response message to the AUSF, where the authentication vector acquisition response message carries the authentication vector.
  • the authentication vector acquisition response message is, for example: "Num_UEAuthentication_Get Response".
  • the UDM determines whether the UE corresponding to the main authentication process supports the AKMA service based on the user subscription data corresponding to the SUPI.
  • the authentication vector acquisition response message carries the AKMA service indication information, and the AKMA service indication information is "AKMA Indication".
  • the AKMA service indication information is used to indicate that the AUSF needs to generate the AKMA anchor key Kakma for this UE. It can also be understood as: the AKMA service indication information is used to indicate that the UE supports the AKMA service.
  • the authentication vector acquisition request message does not carry the AKMA service indication information.
  • the UE generates an AKMA anchor key Kakma based on the AUSF intermediate key.
  • step 304a after the UE's primary authentication process is successfully completed, the UE generates an AKMA anchor key (Kakma) based on the same intermediate key (Kausf) used by the AUSF.
  • the UE generates an AKMA anchor key (Kakma) based on the same intermediate key (Kausf) used by the AUSF.
  • the UE generates an authentication and key management-key temporary identity identifier A-KID.
  • step 304b after the UE's main authentication process is successfully completed, before the UE initiates the AKMA service, the UE generates authentication and key management-key temporary identity (AKMA) based on the same intermediate key (Kausf) used by the AUSF. -Key Identifier, A-KID).
  • the A-KID is used to identify the UE's AKMA anchor key Kakma.
  • the UE before the UE initiates the AKMA service, the UE generates an A-KID based on the same intermediate key (Kausf) used by the AUSF. Specifically, the UE generates the key management-key temporary identifier (AKMA Temporary UE Identifier, A-TID) part in the A-KID based on the same intermediate key (Kausf) used by the AUSF.
  • AKMA Temporary UE Identifier, A-TID key management-key temporary identifier
  • the A-KID is generated based on the routing identifier RID.
  • A-KID format is "username@exmaple”.
  • the "username” part includes the routing identifier, and the Authentication and Key Management-Key Temporary Identifier (AKMA Temporary UE Identifier, A-TID).
  • the "example” part includes home network identifiers such as: mobile country code (MCC) and mobile network code (MNC).
  • MCC mobile country code
  • MNC mobile network code
  • A-TID is a temporary identification based on Kausf.
  • step 304a and step 304b is not limited.
  • the AUSF generates the AKMA anchor key Kakma based on the AUSF intermediate key.
  • Step 305a is similar to the aforementioned step 304a, and will not be repeated here.
  • the difference from 304a is that after the AUSF receives the authentication vector acquisition response message, if the message carries the AKMA service indication information, the AUSF uses the Kausf acquired by the AUSF to generate Kakma and A-KID. If the authentication vector acquisition response message does not carry the AKMA service indication information, the AUSF may not generate Kakma and A-KID.
  • the AUSF generates an authentication and key management-key temporary identity identifier A-KID.
  • step 305b when in step 303, the authentication vector acquisition response message sent by the UDM carries the AKMA identification information, the AUSF determines that an A-KID needs to be generated based on the AKMA identification information.
  • the AUSF sends an AKMA anchor key registration request message to the AAnF.
  • step 306 after the AUSF selects an AAnF, the AUSF sends an AKMA anchor key registration request message to the AAnF.
  • the AKMA anchor key registration request message is for example: "Naanf_AKMA_AnchorKey_Register Request”. Specifically, the AKMA anchor key registration request message carries SUPI, A-KID and Kakma.
  • the AUSF receives the AKMA anchor key registration response message sent by the AAnF.
  • the AAnF sends an AKMA anchor key registration response message to the AUSF based on the AKMA anchor key registration request message in step 306.
  • the AKMA anchor key registration response message is for example: "Naanf_AKMA_AnchorKey_Register Response”.
  • AUSF deletes Kakma and A-KID.
  • step 308 after the AUSF receives the AKMA anchor key registration response message sent from the AAnF, the AUSF deletes the Kakma and the A-KID.
  • RIDs are included in SUCI.
  • the current standard specifies that RID is used for AMF to look up AUSF and AUSF to look up UDM.
  • the RID is used to generate the A-KID.
  • RID is also used to select AAnF.
  • the RID is stored in the USIM.
  • the 5G UE uses the 5G USIM, the 5G UE obtains the RID to be used from the 5G USIM.
  • the value of the RID can be a non-default value or a default value.
  • the RID is included in the context of the UE. It can be understood that after the AMF obtains the RID from the SUCI, the RID is stored in the AMF.
  • the key Kaf is a key derived based on the intermediate key Kausf, which is included in the security context.
  • Figure 4 is a schematic diagram of the generation process of the key Kaf, specifically:
  • the main authentication process is performed and Kakma is generated.
  • Step 401 is the main authentication process and generates Kakma.
  • steps please refer to each step shown in FIG. 3 above, which will not be repeated here.
  • the UE sends an A-KID to the AF.
  • step 402 the UE sends an "Application Session Establishment Request" message to the AF.
  • the A-KID is carried in the message.
  • AAnF searches for the corresponding Kakma according to the A-KID, and the A-KID of the Kakma is consistent with the A-KID in the message.
  • the AF sends the A-KID and the AF_ID to the AAnF.
  • the AF sends a "Naanf_AKMA_ApplicationKey_Get_Request” message to the AAnF.
  • the message carries A-KID and AF identification information (AF_ID).
  • the A-KID comes from the aforementioned "Application Session Establishment Request” message.
  • the AF_ID is used to generate Kaf.
  • AAnF determines Kakma according to the A-KID, and uses Kakma to generate Kaf.
  • the AAnF determines the Kakma according to the A-KID. Then use Kakma to generate Kaf. And determine the validity time of Kaf (also known as expiration time).
  • AAnF sends Kaf to AF.
  • step 405 the AAnF sends a "Naanf_AKMA_ApplicationKey_Get Response" message to the AF, where the message carries the generated Kaf and the expiration time of the Kaf.
  • the AF returns a response message to the UE.
  • step 406 the AF replies a response message to the UE, and the response message may be an "Application Session Establishment Response" message.
  • Kakma is generated using Kausf after the main authentication is completed. So without a new Kausf being generated, there will be no new Kakma being generated. So it can be understood that the effective time of Kakma is consistent with that of Kausf.
  • the update time of Kausf depends on the frequency of the main authentication, and the time of the main authentication depends on the network configuration or trigger conditions. Therefore, the validity time of Kausf (also known as expiration time, validity period or life time) is uncertain. The validity time of Kakma generated based on this Kausf is also uncertain.
  • Kaf is generated based on the Kakma (and AF_ID).
  • the valid time of this Kaf is set by AAnF, so the valid time of this Kaf may not be consistent with the valid time of Kausf.
  • Kaf has a separate validity period
  • Kaf expires.
  • the Kaf needs to be updated, otherwise there is a possibility that there is no key available between the UE and the AF.
  • Kakma Because the generation of Kaf needs to use Kakma, so if Kakma is not updated, then Kakma will generate the same Kaf. Therefore, when Kaf expires, if a new Kausf is generated, AAnF can generate a new Kaf for AF. But if no new Kausf is generated, AAnF will only generate expired Kaf again. At this time, if the UE and the AF continue to use the expired Kaf, it becomes meaningless to set the validity period of the Kaf, which is inconsistent with the original design of the validity period. For example: use Kakma#1 to generate Kaf#1, and generate Kakma#1 based on Kausf#1.
  • Kaf#1 When Kaf#1 expires, AF and UE need to use a new Kaf (Kaf#2).
  • Kausf When Kausf is not updated, that is, Kausf is still Kausf#1, the Kaf generated based on Kausf#1 is still Kaf#1. Therefore, the UE and AF cannot continue to use the Kaf.
  • Kausf is generated in AUSF during the main authentication process, or sent to AUSF after UDM is generated.
  • the UE can generate the same Kausf obtained by AUSF using the same method as AUSF or UDM. It is currently discussed how to ensure that the UE and the AUSF hold the same Kausf. The conclusion of the discussion is that the AUSF saves the new Kausf after determining that the authentication is successful, and the UE side saves the new Kausf after receiving the Non-access stratum security mode common (NAS SMC) message.
  • NAS SMC Non-access stratum security mode common
  • the main authentication process occurs first, followed by the NAS SMC process.
  • the NAS SMC process needs to be forced to occur after the main authentication process, and the idle time between the main authentication process and the NAS SMC process should be as small as possible.
  • the NAS SMC process can be used to activate the native security context, which refers to the security context generated through the main authentication process.
  • the security context includes keys, algorithms, counters, and other materials used for security functions.
  • the 5G security context refers to the security context for the 5G system. 5G security context includes but is not limited to 5G NAS security context, 5G AS security context and 5G AKMA security context.
  • the 5G NAS security context is used for security protection between UE and AMF, and the AS security context is used for security protection between UE and base station.
  • the 5G AKMA security context includes keys (or security materials, or security keys) such as Kakma, A-KID, Kaf, etc.
  • the 5G AKMA security context is generated on the AUSF side after the main authentication process and sent to the AAnF, and on the UE side before the AKMA service is initiated. Specifically, a new Kausf is generated in the main authentication process, and other new keys (eg, NAS keys) are generated based on the new Kausf. If the new key is to be activated, it must be activated through the NAS SMC process.
  • the activation key means that the UE and AMF start to use the key for security protection.
  • FIG. 5 is a schematic flowchart of a NAS SMC involved in an embodiment of the present application.
  • the NAS SMC process includes:
  • step 501 the AMF starts an integrity protection process.
  • the AMF sends a NAS SMC message to the UE.
  • the AMF In step 502, the AMF generates a 5G key identifier (Key Set Identifier in 5G, ngKSI) in the main authentication process, and the 5G key identifier is used to identify the 5G security context.
  • the 5G key identifier carried in the NAS SMC message is used to inform the UE which set of keys to use for security protection in the future.
  • the AMF sends a NAS SMC message to the UE, the NAS SMC message carries the 5G key identifier (Key Set Identifier in 5G, ngKSI), and the NAS SMC message also includes other information, such as: the selected encryption algorithm and/or the selected complete Security algorithm, security algorithm for replay, etc.
  • Security algorithm includes: encryption algorithm and integrity protection algorithm, which will not be described here.
  • step 503 the AMF starts the decryption process of the uplink.
  • step 504 the UE verifies the integrity of the NAS SMC message, specifically, the UE also verifies whether the uplink encryption, downlink decryption and integrity protection are successfully activated.
  • the UE sends a NAS SMC completion response to the AMF.
  • step 505 after the UE completes the verification of the NAS SMC message, the UE sends a NAS SMC completion response to the AMF.
  • the NAS SMC Completion Response may be a NAS message.
  • step 506 the AMF starts the downlink encryption process.
  • NAS SMC did not necessarily happen after the main authentication process.
  • the UE and AMF continue to use the old key. That is to say, even if a new partial native key is generated after the main authentication process, AMF does not continue to generate the complete native key because there is no NAS SMC process.
  • some native keys can be understood as keys other than NAS keys and AS keys, such as Kausf, Kseaf, Kamf.
  • the complete native key means that the NAS key and the AS key are further generated.
  • the AMF and/or the UE will further generate the NAS key only after going through the NAS SMC process; the base station and/or the UE will further generate the AS key only after going through the AS SMC process.
  • the currently used key is not necessarily the key generated by the previous main authentication process, because there may not be a NAS SMC process after the previous main authentication process. Therefore, the key currently used in the NAS message is not directly related to whether the main authentication process occurs, but is related to whether the NAS SMC process occurs.
  • the current key used to protect NAS messages is related to which ngKSI is carried in the NAS SMC process. For example, three primary authentications have occurred, and the key after the first primary authentication is currently used. The NAS SMC did not occur in the second primary authentication, but the NAS SMC occurred after the third primary authentication. If the NAS SMC after the third primary authentication carries the ng-KSI generated by the second primary authentication, the activated key is the second set of primary authentication-related keys.
  • FIG. 6 is a schematic flowchart of a communication method proposed by an embodiment of the present application, including:
  • the UE sends a registration request message to the AMF.
  • the UE sends a registration request message to the AMF, and the registration request message is forwarded by the network device.
  • the registration request message carries the UE's Subscription Concealed Identifier (SUCI).
  • the registration request message may be "Registration Request”.
  • the AMF sends the first key identifier to the UE.
  • the AMF After the AMF receives the registration request message, the AMF initiates the main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for the authentication vector; the UDM generates the authentication vector, and determines to send the generated authentication vector according to the selected primary authentication method.
  • the authentication vector or the processed authentication vector is sent to the AUSF.
  • the AMF After the AMF obtains the authentication vector from the AUSF, the AMF sends the first authentication request message to the UE, and the first authentication request message includes the first key identifier.
  • the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here.
  • the specific process please refer to the description in Section 6.1.3 of Standard TS 33.501 Version 17.1.0.
  • the AMF sends a first authentication request message to the UE, where the first authentication request message includes a first key identifier, and the first authentication request message is used to trigger the first authentication ( Also known as the first primary authentication process).
  • the first key identifier is ngKSI#1, and the first key identifier corresponds to the first intermediate key.
  • the intermediate key is Kausf as an example for description. Then the first intermediate key is Kausf#1.
  • the UE interacts with the AMF to complete the first primary authentication process.
  • the UE receives the first authentication request message (including the first key identifier), and the UE receives the authentication vector. Then the UE starts to authenticate the network side; after verifying that the network side is true, the UE will reply a message to the AMF to continue the main authentication process, and finally complete the two-way authentication from the UE to the AMF and the AUSF.
  • the specific main authentication process standard TS 33.501 version 17.1.0 is described in Section 6.1.3, which will not be repeated here. Since the main authentication process is related to the first intermediate key and the first key identifier, the main authentication process is called the first main authentication process.
  • the AUSF stores the first intermediate key corresponding to the first key identifier.
  • AUSF stores Kasuf#1.
  • Kausf#1 is stored. It should be noted that the AUSF will not receive the first key identifier, therefore, the AUSF finally only stores the correspondence between Kausf#1 and the permanent identifier of the UE.
  • the AMF initiates the NAS SMC process.
  • the specific NAS SMC process is the same as the process shown in the aforementioned Figure 5, and will not be repeated here.
  • the NAS SMC process related to the first main authentication process is referred to as NAS SMC process #1.
  • the AMF sends the first NAS SMC message to the UE, and the first NAS SMC message carries the first key identifier.
  • the AMF uses the NAS integrity protection key corresponding to the first key identifier to perform integrity protection verification on the first NAS SMC message.
  • the UE uses the NAS integrity protection key corresponding to the first key identifier to perform integrity protection verification on the first NAS SMC message. If the verification is successful, the UE performs confidentiality protection and integrity protection on the message by using the NAS encryption key and the NAS integrity protection key corresponding to the first key identifier. The UE side completes the activation process of the NAS key corresponding to the first key identifier. The UE replies with a "NAS Security Mode Complete" message to the AMF. The AMF uses the NAS integrity protection key and the NAS encryption key corresponding to the first key identifier to decrypt and verify the integrity of the message ("NAS Security Mode Complete" message). If the verification is successful, the AMF side completes the activation process of the NAS key corresponding to the first key identifier.
  • the AMF uses the NAS integrity protection key corresponding to ngKSI#1 to perform integrity protection on the first NAS SMC message.
  • the AMF triggers the second main authentication process.
  • the second main authentication process belongs to the re-authentication process.
  • the triggering conditions of the second main authentication process include but are not limited to: AMF according to local policies Triggered, or the NAS counter (count) needs to be rolled over, or other network functions (or network elements) are triggered.
  • the network function includes but is not limited to: AUSF or AAnF.
  • the AMF may determine whether to activate the second security context through the triggering cause of the primary authentication process.
  • the main authentication process There are various ways to trigger the main authentication process, including but not limited to:
  • the main authentication process is only used to authenticate the UE.
  • the AMF periodically authenticates the UE according to local policies and operator configuration.
  • the triggering reason for the main authentication process is to update the 5G NAS security context or the 5G AS security context.
  • NAS COUNT is about to flip.
  • the main authentication process is triggered by requests from other functional network elements.
  • the AMF receives a message for requesting key update from network elements such as AUSF, NEF, AAnF, ECS, and EES.
  • the main authentication process is initiated.
  • the main authentication process is triggered by the terminal device.
  • the terminal device carries indication information through the registration request message, which is used to indicate that a certain key needs to be updated.
  • steps 605 to 607b are optional. Steps 605 to 607b are to illustrate the method of triggering the AMF to generate the second security context.
  • the AMF may also generate a second security context. For example, the AMF may generate a new Kamf through Kamf#1 in the first security context, and the Kamf is called Kamf#2. Kamf#2 represents the second security context as an intermediate key.
  • AMF can further generate new 5G NAS keys and new 5G AS keys according to Kamf#2. For example, a new Kamf is generated through the horizontal Kamf deduction method in Section A.13 of the standard 33.501. In this case, the AMF may or may not generate a new second key identifier.
  • the purpose of generating the second key identifier is to combine the existing technology, a Kamf should be in a one-to-one correspondence with a key identifier, and the newly generated Kamf should have a new key identifier, the new key identifier. character is used to identify the newly generated Kamf. This situation usually occurs in the context of AMF changes. If the second key identifier is not generated, it may happen that the AMF does not change, that is, the Kamf generated by the current AMF continues to be used by itself.
  • the AMF sends the second key identifier to the UE.
  • the AMF initiates the second main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for the authentication vector; the UDM generates the authentication vector, and according to the selected main authentication The method determines whether to send the generated authentication vector or the processed authentication vector to the AUSF.
  • the AMF obtains the authentication vector from the AUSF, the AMF sends a second authentication request message to the UE, and the second authentication request message includes the second authentication request message.
  • the key identifier, the second authentication request message is used to trigger the second authentication between the UE and the network (also referred to as the second main authentication process).
  • the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here.
  • the specific process please refer to the description in Section 6.1.3 of Standard TS 33.501 Version 17.1.0.
  • the second key identifier is ngKSI#2, and the second key identifier corresponds to the second intermediate key.
  • the intermediate key is Kausf as an example for description. Then the second intermediate key is Kausf#2.
  • the AMF sends the second key identifier to the UE through an "Authentication Request" message.
  • the second key identifier may be ngKSI#2.
  • the UE and the AMF interact to complete the second primary authentication process.
  • the UE, AMF and AUSF continue to complete the second primary authentication process.
  • the specific main authentication process is similar to the foregoing step 603, and will not be repeated here.
  • the AUSF stores the intermediate key corresponding to the second key identifier.
  • the intermediate key corresponding to the second key identifier is called the second intermediate key. key.
  • the second intermediate key may be Kausf#2. Specifically, after the AUSF verifies that the UE is authentic, Kausf#1 is stored. It should be noted that the AUSF will not receive the second key identifier, so the AUSF finally only stores the correspondence between Kausf#2 and the permanent identifier of the UE.
  • the AMF determines whether to activate the second security context.
  • the AMF determines whether to activate the security context corresponding to the second intermediate key.
  • the security context of the intermediate key corresponding to the second intermediate key is referred to as the second security context.
  • the second security context includes but is not limited to: the 5G NAS security context and/or the 5G AS security context generated based on the intermediate key. Therefore, the AMF determines whether to activate the second security context, which refers to whether to activate the 5G NAS security context and/or the 5G AS security context generated based on the intermediate key.
  • the AMF determines whether to activate the second security context.
  • the second security context does not need to be activated. That is, there is no need to further use the 5G NAS key and 5G AS key generated based on Kausf#2, or the UE and AMF do not need to further generate the 5G NAS key and 5G AS key generated based on Kausf#2.
  • An exemplary scenario is as follows: when the operator configures the following scenarios, the UE authentication is triggered and the second security context is not activated. open connection); AMF data is migrated, that is, migrated from AMF#1 to AMF#2.
  • the AMF determines that the second security context needs to be activated. For example, the AMF determines that the primary authentication procedure is triggered because the NAS COUNT rolls over, or because the base station requests a new key. For example, when the NAS COUNT is about to be overturned, the AMF will trigger the main authentication process to generate a new 5G NAS security context, and activate the generated 5G NAS security context through the NAS SMC process.
  • the main authentication process occurs, and the main authentication process is triggered by the request of other functional network elements. For example, when the main authentication procedure is requested by the AUSF for updating the Kakma-based, the AMF determines that the second security context does not need to be activated. For another example, if the main authentication process is triggered by the SMF and the UDM in order to synchronize the UE state, the AMF determines that the second security context does not need to be activated. For another example, if the initial registration request message sent by the terminal device is the main authentication process triggered by the AMF because the 5G security context of the UE cannot be found, the AMF determines not to activate the second security context.
  • the second security context does not need to be activated by default.
  • the main authentication process occurs, and when the AMF cannot clearly activate the second security context, the AMF may activate the second security context by default. For example, when the AMF cannot determine whether to activate the second security context, the AMF activates the second security context by default. Or AMF may continue to use the first security context by default. For example, when the AMF cannot determine whether to activate the second security context, the AMF continues to use the first security context by default. It should be noted that the AMF may make a judgment according to at least one of the above conditions. When multiple conditions appear at the same time, comprehensive consideration is required. Specifically, for example, if a triggering condition that requires activation of the second security context occurs, the AMF must activate the second security context. For example, when the AMF is authenticated by the local policy and finds that the NAS COUNT is about to be rolled over, the AMF determines that the second security context needs to be activated according to the about to roll over of the NAS COUNT.
  • the main authentication process occurs, and the main authentication process is triggered by the terminal device. Then the AMF needs to determine whether the NAS key or the AS key needs to be updated. If the update is not required, the second security context may not be activated; if the update is required, the second security context is activated; in the case of uncertainty The second security context is activated by default.
  • the primary authentication process does not occur, and the AMF receives a request message for updating the key of the first network element, and the AMF triggers the second authentication according to the request message for updating the key.
  • the first network element includes any one of the following but is not limited to: AAnF, an edge configuration server (Elastic Compute Service, ECS), an edge enabling server EES, or a mobile edge computing MEC functional network element. Then, after the AMF generates the second security context, it is determined not to activate the second security context.
  • step 608 when the AMF determines that the second security context needs to be activated, the process proceeds to step 609; when the AMF determines that the second security context does not need to be activated, the process proceeds to step 612.
  • the AMF sends the second key identifier to the UE. In the case that the main authentication process does not occur, the AMF sends the first key identifier and the second indication information to the UE.
  • the AMF determines to activate the second security context, in the NAS SMC process #2, the AMF sends the second key identifier to the UE.
  • the AMF is triggered according to the primary authentication because the NAS key needs to be replaced, so it is determined to update the current key. Therefore, AMF generates Kseaf#2 according to Kausf#2. Use Kseaf#2 to generate Kamf#2. AMF selects an encryption algorithm and an integrity protection algorithm, and further generates K NASint#2 and K NASenc#2 . Optionally, the AMF may further generate K gNB #2, and send K gNB #2 to a network device (eg, a base station) through an N2 message.
  • a network device eg, a base station
  • the AMF sends the second key identifier to the UE through a second NAS SMC message ("NAS Security Mode Command" message). That is, the second key identifier (eg ngKSI#2) is carried in the second NAS SMC message.
  • the second key identifier eg ngKSI#2
  • the UE After receiving the key identifier, the UE determines the key to be used subsequently according to the key identifier.
  • the UE needs to use the key material corresponding to the second key identifier, that is, the UE needs to use the 5G NAS key generated based on the second intermediate key.
  • the UE generates Kseaf#2 according to Kausf#2.
  • Kamf#2 and the selected security algorithm carried in the NAS SMC to generate K NASint#2 and K NASenc#2 .
  • the UE uses K NASint#2 to verify the integrity protection of the NAS SMC.
  • the UE also needs to verify whether the security algorithm carried in the second NAS SMC message is the same as that carried in the registration request message by the UE. After the verification is passed, the UE starts to use K NASint#2 and K NASenc#2 to perform integrity protection and encryption protection on the subsequently sent NAS messages, and perform integrity protection verification and decryption on the subsequently received NAS messages.
  • the UE stores the second intermediate key corresponding to the second key identifier.
  • the UE After the UE receives the NAS SMC message, the UE stores the second key identifier, and the UE stores the second intermediate key corresponding to the second key identifier.
  • the UE stores ngKSI#2 and Kausf#2 (Kausf#2 corresponds to ngKSI#2).
  • the activation operation is as follows: create a security function function, and put the updated key into the security function for use.
  • the UE deletes or stops the security function used before.
  • the UE replies with a NAS SMP message ("NAS Security Mode complete” message) to the AMF.
  • AMF does not activate the new AS key.
  • Step 611 is an optional step.
  • AMF determines whether to update the AS key. If the primary authentication triggers the process because the NAS key needs to be updated, for example, the NAS counter value is about to roll over. In order to save the complexity of the UE, the AMF may determine not to update the AS key. Then, when the AMF activates the second security context, it does not activate the AS key corresponding to the second key identifier. That is, the second security context activated by the AMF does not include the AS key, and the AMF only activates the NAS key corresponding to the second key identifier. For example, the AMF does not activate the AS key corresponding to ngKSI#2, and the AS key includes but is not limited to: the key K gNB .
  • AMF does not generate K gNB corresponding to ngKSI#2 (AMF does not generate new K gNB #2, and old K gNB #1 corresponds to ngKSI#1), or after AMF generates K gNB #2, it does not send the K gNB #2 gNB #2 to network equipment (eg base station).
  • AMF does not generate new K gNB #2, and old K gNB #1 corresponds to ngKSI#1
  • AMF does not send the K gNB #2 gNB #2 to network equipment (eg base station).
  • the AMF sends the first key identifier to the UE.
  • the AMF sends the second key identifier and the third indication information to the UE.
  • the second NAS SMC message may also carry a third indication information.
  • the third indication information is used to inform the UE that the currently used NAS security context and AS security context do not need to be updated.
  • the currently used NAS security context may also be referred to as the NAS security context in the first security context
  • the currently used AS security context may also be referred to as the AS security context in the first security context.
  • the NAS security context may be a 5G NAS security context
  • the AS security context may be a 5G AS security context.
  • the specific form of the third indication information is not specifically limited in this embodiment. It may be bit indication information, or enumeration type information, or it may be indicated by whether it appears or not. For example, a third indication appears in the second NAS SMC message. The information does not update the currently used 5G NAS security context and 5G AS security context. If it does not appear in the second NAS SMC message, it indicates that the UE needs to update the currently used 5G NAS security context and 5G AS security context.
  • the AMF sends a second NAS SMC message to the UE, where the second NAS SMC message includes the first key identifier.
  • the NAS key identified by the first key identifier is the key currently being used by the AMF and the UE.
  • the AMF preliminarily determines that the current key does not need to be updated according to the triggering cause of the primary authentication. Further, the AMF may select a security algorithm, the security algorithm includes: an encryption algorithm and an integrity protection algorithm, and compare whether the security algorithm is the same as the currently used security algorithm identified by the current first key identifier. If it is the same, it is finalized to do nothing, i.e. not update the key. If different, the key needs to be updated through the NAS SMC process #2 to activate the second security context. Exemplarily, the AMF sends the first key identifier to the UE through a second NAS SMC message ("NAS Security Mode Command" message).
  • NAS Security Mode Command NAS Security Mode Command
  • the second NAS SMC message carries the first key identifier (eg, ngKSI#1). Specifically, the AMF puts the encryption algorithm and/or the integrity protection algorithm used by the first key identifier into the second NAS SMC message as the selected security algorithm.
  • the second NAS SMC message uses K NASint-1 corresponding to the first key identifier for integrity protection and/or K NASenc-1 for confidentiality protection.
  • the AMF determines that the second security context does not need to be activated.
  • the second NAS SMC message includes second indication information (Kamf change), which indicates that the UE needs to generate a new Kamf, which is called Kamf#2 (the original used by the UE The Kamf is called Kamf#1).
  • the AMF carries the first key identifier in the second NAS SMC message, and optionally, the second NAS SMC message also carries third indication information.
  • the primary authentication process does not occur, but the AMF generates Kamf#2 and the second key identifier, and the AMF determines that the second security context does not need to be activated.
  • the AMF sends the second indication information to the UE, and the second indication information informs the UE that a new Kamf needs to be generated, which is called Kamf#2. If the AMF obtains the second key identifier, the second NAS SMC message carries the first key identifier and the second indication information, or the second NAS SMC message carries the second key identifier and the third indication information and second indication information.
  • the UE After the UE receives the second NAS SMC message, if the second NAS SMC message is encrypted and protected, the UE decrypts and protects the message using the key currently being used by the UE.
  • the UE After the UE receives the second NAS SMC message, the UE performs integrity protection verification on the message using the key currently being used by the UE. And verify whether the security algorithm carried in the second NAS SMC message is the same as the security algorithm carried by the UE in the registration request message, and the security algorithm includes: the integrity protection algorithm and the encryption algorithm of the UE. After all verifications are passed, the UE determines the key to be used subsequently according to the first key identifier.
  • the different schemes are described below:
  • the terminal device when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is the same as the security algorithm corresponding to the first intermediate key, the terminal device continues to use the first security algorithm context, the terminal device does not perform any processing, wherein the first security context corresponds to the first intermediate key;
  • the terminal device uses the second intermediate key to generate the second security context, and the terminal device activates the second security context;
  • the terminal device when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is different from the security algorithm corresponding to the first intermediate key, then the terminal device according to the first intermediate key The key generates a third security context, and the terminal device activates the third security context.
  • the UE when the key identifier from the AMF is the first key identifier, the UE needs to use the key corresponding to the first key identifier, that is, the UE needs to use the first security context and the first intermediate key .
  • the UE can continue to use the original intermediate key (the first intermediate key) and the first security context.
  • the UE may reactivate the first intermediate key and the first security context, which is not limited here.
  • the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify the second NAS SMC message. Whether the security algorithm corresponding to the key identifier is the same as the security algorithm currently being used by the UE. If all are the same, and the UE verifies that the integrity protection of the NAS SMC is correct, the UE may continue to use the current 5G NAS security context without updating the first security context. That is, with the current key and security algorithm, the NAS COUNT does not need to be reset to 0 either.
  • the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify that the second NAS SMC message contains the same key identifier. Whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm currently being used by the UE. If only the latter is different (that is, the key identifiers are the same, but the security algorithms are inconsistent), the UE needs to use the Kamf#1 corresponding to the Kausf#1 identified by ngKSI#1, and use the new security algorithm carried in the second NAS SMC message to generate the first Three security contexts.
  • the third security context may be a new 5G NAS security context (corresponding to the first intermediate key), specifically, a new K NAS-int and a new K NASenc are generated, and the NAS COUNT is reset to 0.
  • the UE verifies the integrity protection of the second NAS SMC message using the newly generated K NAS-int . It can be understood that, because the second NAS SMC message carries ngKSI#1, only the first intermediate key corresponding to ngKSI#1 can be used to further derive the subkey. So just generate a new NAS key and that's it.
  • the UE may activate the key identified by the first key identifier according to the description in step 610, which may include at least one of the following steps: generating the key identified by the key identifier #1 according to Kausf#1 , generate Kseaf#1, use Kseaf#1 to generate Kamf#1, and then use Kamf#1 and the selected security algorithm carried in the second NAS SMC message to generate K NASint#1 and K NASenc#1 , K NASint#1, K NASint#1 , K NASenc#1 encryption algorithm and integrity protection algorithm are used for specific functions, but the NAS COUNT remains unchanged.
  • the UE only compares whether the key identifier from the AMF carried in the second NAS SMC message is the same as the key identifier corresponding to the key currently being used. If the integrity protection check of the SMC message is successful, the first security context will not be updated, and the current 5G NAS security context will continue to be used.
  • the UE further checks whether the third indication information is received. If the UE receives the third indication information, the UE only generates a new Kamf (generates Kamf#2), and does not update the 5G NAS and/or 5G AS security context.
  • the terminal device will continue to use the first security context, that is, only the Kamf#2 needs to be generated , and no other processing will be performed. That is to say, the terminal device can continue to use the 5G NAS security context and 5G AS security context generated based on Kausf#1.
  • the terminal device only needs to generate Kamf#2, and no other processing is required.
  • FIG. 7 is a schematic diagram of an application scenario proposed by an embodiment of the present application, including:
  • the UE sends a registration request message to the AMF.
  • the AMF sends the first key identifier to the UE.
  • the UE interacts with the AMF to complete the first primary authentication process.
  • Steps 701-704 are the same as the aforementioned steps 601-604, and are not repeated here.
  • the AUSF stores Kausf#1, and generates Kakma#1 according to the Kausf#1.
  • AUSF#1 AUSF storing Kausf#1 in step 705.
  • the UE After the NAS SMC process #1 ends, the UE generates Kakma#1 according to Kausf#1.
  • the UE After the UE generates Kakma#1, the UE sends an A-KID to the AF, and the A-KID corresponds to Kakma#1, so the A-KID is called A-KID#1.
  • the A-KID#1 is used to generate a corresponding Kaf, which is called Kaf#1.
  • the AF sends a first key request message to AAnF, where the first key request message carries A-KID#1.
  • the AF determines that Kaf#1 is about to expire, the AF sends a first key request message to the AAnF, where the first key request message carries A-KID#1.
  • the AF when the AF has the identification information of the UE, the AF carries the identification information of the UE in the first key request message.
  • the identification information of the UE may be GPSI; when the AF is an AF within the operator, the identification information of the UE may be SUPI.
  • the A-KID#1 is obtained when the UE accesses the AF for the first time, and the AF stores the A-KID#1.
  • the AAnF determines whether A-KID#1 exists according to the first key request message.
  • the AAnF determines whether A-KID#1 exists according to the first key request message. When the first key request message carries A-KID#1, the AAnF checks whether the same A-KID as the A-KID#1 exists locally.
  • the AAnF further determines whether Kakma#2 exists, and Kakma#2 is the updated Kakma.
  • Kakma#1 is relative to the key generated by the first intermediate key (Kausf#1), so Kakma#2 is the updated Kakma, which is generated by the second intermediate key (Kausf#2).
  • step 710 If A-KID#1 exists, go to step 710 .
  • the AAnF determines whether there is Kakma#2 by using the identification information of the UE carried in the first key request message. If so, go to step 717 (steps 710-716b are not executed). If not, a failure message code is returned in the response message (in step 717, steps 710-716b are not performed), indicating that Kakma could not be found.
  • the first key request request message may be a "Naanf_AKMA_ApplicationKey_Get request" message.
  • the AAnF sends a second key request message to the AUSF, where the second key request message carries the permanent identification information of the UE.
  • the second key request message carries the first indication information.
  • the first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element.
  • the second network element includes any of the following but not limited to NEF, AAnF, ECS, EES or AF.
  • the first indication information may be identification information of the AF.
  • the AAnF Before the AAnF sends the second key request message, the AAnF selects the AUSF.
  • the AAnF can determine the AUSF that provides the server for the UE in various ways. The following are respectively explained:
  • the AAnF determines the AUSF that serves the UE from the UDM according to the permanent identification information (SUPI) of the UE corresponding to the A-KID#1.
  • This AUSF is called AUSF#1.
  • the UDM determines an AUSF according to the identification information of the UE, and Kausf#1 is stored in the AUSF. Since the AUSF receives the indication information sent by the UDM that the UE supports the AKMA service (that is, the foregoing steps 302-303 have been performed between AUSF#1 and the UDM), the AUSF confirms that the UE supports the AKMA service.
  • the AKMA service indication information may be "AKMA Indication (AKMA Ind)" or "AKMA ID", which is not limited.
  • the AAnF requests the NRF to acquire an AUSF according to the RID in A-KID#1, and the AUSF can provide services for the UE.
  • the AUSF may be AUSF#1, or may be another AUSF (eg, AUSF#2). If the AUSF is AUSF#2, since the AUSF#2 has not received the indication information that the UE supports the AKMA service, the AUSF#2 cannot confirm whether the UE supports the AKMA service.
  • the foregoing steps 302-303 need to be passed between AUSF#2 and the UDM, so that AUSF#2 obtains the AKMA service indication information of the UE.
  • the second key request message is used to instruct the AMF to determine not to activate the second security context.
  • the second key request message carries indication information, where the indication information is used to instruct the AMF to determine not to activate the second security context.
  • the second key request message carries the identification information of the AF, where the identification information of the AF is used to indicate that the AMF does not activate the second security context.
  • the identification information of the UE may be SUPI or SUCI, and the identification information of the AF may be AF_ID.
  • the identification information of the UE is used to notify the AUSF to determine the data related to the UE (for example, Kausf#1 and the AKMA service indication information of the UE).
  • the identification information of the AF is also used to inform the AUSF of which AF's key needs to be updated.
  • the second key request message may not include the first indication information, and the first indication information may be sent to the UE in other ways, which is not limited here.
  • the AAnF may directly send a third authentication request message to the AMF, where the third authentication request message carries the permanent identification information of the UE, and optionally carries the AF ID. Before the AAnF sends this message, the AAnF needs to determine the AMFs that can serve the UE. The AAnF determines the AMF serving the UE from the UDM according to the UE's permanent identity information. When the AAnF directly sends the user third authentication request message to the AMF, steps 711 and 712 are not executed.
  • the AUSF determines an AMF serving the UE.
  • the AUSF determines the AMF serving the UE from the UDM according to the UE's permanent identity information.
  • the AUSF Before the AUSF determines the AMF serving the UE, the AUSF first determines that the UE supports the AKMA service.
  • the AAnF may determine that the UE supports the AKMA service in various ways. The following are respectively explained:
  • the AUSF After determining AUSF #1 for the first method of selecting AUSF in step 710 . Since the AUSF receives the indication information sent by the UDM that the UE supports the AKMA service (that is, the foregoing steps 302-303 have been performed between AUSF#1 and the UDM), the AUSF confirms that the UE supports the AKMA service.
  • the AKMA service indication information may be "AKMA Indication (AKMA Ind)" or "AKMA ID", which is not limited.
  • AUSF#2 After determining the AUSF for the second method of selecting AUSF in step 710, if the AUSF is not AUSF#1, since the AUSF#2 has not received the indication information that the UE supports the AKMA service, the AUSF#2 It cannot be confirmed whether the UE supports the AKMA service. Then AUSF#2 needs to request the UDM whether the UE supports the AKMA service. This process may be that AUSF#2 sends a request message to the UDM, the request message is used to request the UDM whether the U supports AKMA, and the message carries the permanent identifier SUPI of the user. The UDM can directly reply a response message indicating support or non-support, or carry AKMA indication information in the response message.
  • AUSF#2 determines whether the UE supports the AKMA service according to the response message or the indication information in the response message. For example, if the response message is a success message or carries AKMA indication information, it is determined that the UE supports the AKMA service. In another possible implementation manner, the foregoing steps 302-303 need to be passed between AUSF#2 and the UDM, so that AUSF#2 obtains the AKMA service indication information of the UE. This process may occur in the second main authentication process, or may be issued before step 712 . If it occurs before step 712, it means that the AUSF needs to determine that the UE can support the AKMA service, and then proceed to step 712, that is, request to trigger the main authentication process. If this process occurs in the step-master authentication process, after receiving the authentication response message, the AUSF should first check whether the message carries AKMA indication information, and if so, continue the process. If not carried, terminate the process.
  • the purpose of determining whether the UE supports AKMA is to prevent an AAnF from randomly carrying SUPI to initiate a key update process. Because the main authentication process affects the current service of the UE, certain deterministic checks are required.
  • the AUSF After the AUSF determines the AMF serving the UE, the AUSF replies to the AAnF with a response message corresponding to the second key request message.
  • the AUSF sends a third authentication request message to the AMF, and after receiving the third authentication request message, the AMF sends a response message to the AUSF.
  • the third authentication request message instructs the AMF to determine whether to activate the second security context. Specifically, the third authentication request message is used to request the AMF to trigger the main authentication process.
  • the third authentication request message carries the permanent identity information of the UE.
  • the third authentication request message carries indication information, where the indication information is used to indicate a reason value that needs to trigger the main authentication process.
  • the AMF may determine, according to the third authentication request message or the indication information carried in the third authentication request message, that the primary authentication process is to update the AKMA-related key, and the AMF determines not to activate the second security context.
  • the third authentication request message may be "initial primary authentication Request".
  • the AMF determines whether the second security context needs to be activated according to the indication information. If the AMF determines that the NAS COUNT is about to be rolled over, that is, the rollover of the NAS COUNT requires the activation of the second security context, the AMF determines that the second security context is to be activated.
  • the final purpose of the third authentication request message is to request to update Kakma, that is, to request to obtain Kakma#2.
  • the indication information carried in the third authentication request message is the identification information of the AF, and the AMF may determine not to activate the second security context according to the indication of the identification information of the AF. That is, the indication information is used for the AMF to judge that the second security context is not activated.
  • the AUSF obtains the authentication vector from the UDM, and the specific manner is the same as the foregoing steps 302-303, which will not be repeated here.
  • the AUSF may also instruct the AMF to determine whether to activate the second security context through other messages, which is not limited here.
  • the third authentication request message is just an example.
  • the AMF After receiving the third authentication request message, the AMF triggers the second main authentication process.
  • the AMF receives the third authentication request message sent by the AUSF.
  • the AMF may also receive a third authentication request message sent by the first network element, where the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message is used to trigger the second authentication request message between the UE and the network. Authentication.
  • the first network element includes any one of but not limited to: AUSF, NEF, AAnF, ECS, EES or AF.
  • the AMF sends the second key identifier to the UE.
  • Step 715 is a part of step 713. Specifically, the AMF determines to initiate the main authentication process, the AMF requests the AUSF to authenticate the UE, the AUSF requests the authentication vector from the UDM, the UDM sends the authentication vector to the AUSF, and the AUSF authenticates the UE. The vector is processed and sent to the AMF. The AMF generates a second key identifier after receiving the processed authentication vector, and sends the second key identifier to the UE along with the processed authentication vector.
  • the AMF sends the second key identifier to the UE through an "Authentication Request" message.
  • the second key identifier may be ngKSI#2.
  • the UE interacts with the AMF to complete the second primary authentication process (the AUSF obtains the second key identifier).
  • the UE, AMF and AUSF continue to complete the second primary authentication process.
  • step 716a and step 720 are executed respectively. It should be noted that the execution order of step 716a and step 720 is not limited here.
  • the AUSF stores the intermediate key corresponding to the second key identifier, and the second intermediate key is Kausf#2.
  • the AUSF generates Kakma#2 and A-KID#2 based on the second intermediate key.
  • the AUSF sends the UE's Permanent Identity Information (SUPI), A-KID#2 and Kakma#2 to the AAnF.
  • SUPI Permanent Identity Information
  • A-KID#2 A-KID#2
  • Kakma#2 Kakma#2
  • AAnF uses Kakma#2 to generate Kaf#2.
  • the AAnF sends a first key request response message to the AF, where the first key request message carries the expiration time of A-KID#2, Kaf#2, and Kaf#2.
  • the AAnF sends a first key request response message to the AF, where the first key request response message may be a "Naanf_AKMA_ApplicationKey_Get response" message.
  • the first key request message carries the expiration time of A-KID#2, Kaf#2 and Kaf#2.
  • AF stores A-KID#2 and Kaf#2.
  • the AMF determines whether to activate the second security context.
  • the AMF may be determined in step 712 , and may be determined at any time between steps 712 and 721 . For example, it is determined in step 720 .
  • Step 720 can be understood as an action immediately before sending 721 . For details, please refer to the description in step 712.
  • the AMF determines not to activate the second security context after comprehensive judgment according to the third authentication request message from the AUSF.
  • the AMF sends the first key identifier to the UE.
  • the AMF sends the first key identifier to the UE through a NAS SMC message ("NAS Security Mode Command" message). That is, the NAS SMC message carries the first key identifier (eg, ngKSI#1).
  • NAS SMC message carries the first key identifier (eg, ngKSI#1).
  • the AMF may also send indication information for updating Kakma to the UE, where the indication information for updating Kakma is used to instruct the UE to generate Kakma#2 and A-KID#2.
  • the indication information for updating the Kakma may be the identification information (AF_ID) of the AF, or may be an indication information.
  • the identification information of the AF can also be used to instruct the UE to generate a new Kaf, that is, Kaf#2 (the UE generates Kaf#2 according to the AF_ID).
  • the UE stores the Kausf#2 corresponding to the second key identifier.
  • NAS SMP message "NAS Security Mode complete" message
  • the NAS SMP message uses the integrity protection key and encryption key corresponding to the second key identifier (ngKSI#2) to perform confidentiality protection and integrity protection.
  • the UE generates Kakma#2 and Kaf#2 based on Kausf#2, and updates the key corresponding to the identification information of the AF to Kaf#2.
  • the UE generates Kakma#2 and Kaf#2 according to the indication information for updating the Kakma.
  • the UE sends a first activation request message to the AF, where the first activation request message carries A-KID#2, and the first activation request message instructs the AF to activate Kaf#2.
  • the UE After the UE generates a new Kaf (ie, Kaf#2), the UE initiates the activation process of the Kaf#2. Specifically, the UE sends a first activation request message to the AF, where the first activation request message carries A-KID#2, and the first activation request message instructs the AF to activate Kaf#2.
  • the UE determines which AF to send the first activation request message with according to the AF ID carried by the NAS SMC, that is, initiates the Kaf update process.
  • the first activation request message carries A-KID#2.
  • the time interval between step 724 and step 723 may be as small as possible to ensure the normal operation of the AF.
  • the first activation request message may be an "application session reestablishment request" message.
  • the AF sends a first activation response message to the UE.
  • the AF determines whether the Kaf#2 corresponding to the A-KID#2 has been stored locally according to the A-KID#2, and if so, activates the Kaf#2.
  • the activation operation is as follows: create a security function function, and put the updated key into the security function for use. AF removes or stops the safety function used before (put the safety function of Kaf#1).
  • the AF After the activation is successful, the AF sends a first activation response message to the UE.
  • the first activation response message may be an "application session reestablishment response" message.
  • FIG. 8 is a schematic diagram of another application scenario proposed by the embodiment of the present application.
  • the AF itself activates Kaf#2, and the local Kaf#2 of the UE is instructed to activate by the AF.
  • the application scenarios include:
  • the UE sends a registration request message to the AMF.
  • the AMF sends the first key identifier to the UE.
  • the UE interacts with the AMF to complete the first primary authentication process.
  • the AF sends a first key request message to the AAnF, where the first key request message carries the A-KID#1.
  • the AAnF determines whether A-KID#1 exists according to the first key request message.
  • the AAnF sends a second key request message to the AUSF, where the second key request message carries the permanent identification information of the UE.
  • the AUSF determines the AMF that serves the UE.
  • the AUSF sends a third authentication request message to the AMF, and after receiving the third authentication request message, the AMF sends a response message to the AUSF.
  • the AMF sends the second key identifier to the UE.
  • the UE and the AMF interact to complete the second primary authentication process (the AUSF obtains the second key identifier).
  • AAnF uses Kakma#2 to generate Kaf#2.
  • the AAnF sends a first key request response message to the AF, where the first key request message carries the expiration time of A-KID#2, Kaf#2, and Kaf#2.
  • the AMF determines whether to activate the second security context.
  • the NAS SMC process #2 carries the first key identifier.
  • the UE stores the Kausf#2 corresponding to the second key identifier.
  • Steps 801-822 are the same as the aforementioned steps 701-722, and are not repeated here.
  • the AF sends a second activation request message to the UE, where the second activation request message carries A-KID#2, and the second activation request message instructs the UE to generate a new Kaf.
  • the UE If the UE has not generated A-KID#2, the UE generates Kakma#2 and A-KID#2 based on Kausf#2. If the UE has generated A-KID#2, the UE compares the locally generated A-KID# 2 is the same as the A-KID#2 from the AF, if it is the same, the key corresponding to the identification information of the AF is updated to Kaf#2.
  • the AF sends a second activation response message to the UE.
  • the AF After the AF activates Kaf#2 successfully, the AF sends a second activation response message to the UE.
  • the activation operation is as follows: create a security function function, and put the updated key into the security function for use. AF removes or stops the safe function used before (put the safe function of Kaf#1).
  • an embodiment of the present application further proposes an application scenario, please refer to FIG. 9
  • FIG. 9 is a schematic diagram of another application scenario proposed by an embodiment of the present application.
  • the AMF does not initiate the NAS SMC process, so that the UE does not store the new intermediate key for a long time.
  • the application scenarios include:
  • the UE sends a registration request message to the AMF.
  • the AMF sends the first key identifier to the UE.
  • the UE interacts with the AMF to complete the first primary authentication process.
  • the AF sends a first key request message to AAnF, where the first key request message carries A-KID#1.
  • the AAnF determines whether A-KID#1 exists according to the first key request message.
  • the AAnF sends a second key request message to the AUSF, where the second key request message carries the permanent identification information of the UE.
  • the AUSF determines the AMF that serves the UE.
  • the AUSF sends a third authentication request message to the AMF, and after receiving the third authentication request message, the AMF sends a response message to the AUSF.
  • the AMF sends the second key identifier to the UE.
  • the UE interacts with the AMF to complete the second primary authentication process (the AUSF obtains the second key identifier).
  • AAnF uses Kakma#2 to generate Kaf#2.
  • the AAnF sends a first key request response message to the AF, where the first key request message carries the expiration time of A-KID#2, Kaf#2, and Kaf#2.
  • Steps 901-919 are the same as the aforementioned steps 701-719, and are not repeated here.
  • the AMF determines not to initiate the NAS SMC process.
  • AMF determines not to initiate the NAS SMC process to ensure that the existing key structure is not affected and the complexity of key update is reduced.
  • the AMF Since the AMF does not initiate the NAS SMC process, the AMF does not send the NAS SMC message to the UE. Therefore, the UE only caches Kausf#2. Specifically, the Kausf#2 is stored in the cache area of the UE, and the Kausf#2 is not stored in the long-term storage area of the UE.
  • the AF sends a second activation request message to the UE, where the second activation request message carries A-KID#2, and the second activation request message instructs the AF to generate a new Kaf.
  • the AF After the AF receives the new Kaf (ie, Kaf#2), the AF initiates the activation process of the Kaf#2. Specifically, the AF sends a second activation request message to the UE, where the second activation request message carries A-KID#2, and the activation request message instructs the UE to generate Kaf#2.
  • the time interval between step 922 and step 919 may be as small as possible to ensure the normal operation of the AF.
  • the second activation request message may be an "application session reestablishment request" message.
  • the UE generates Kakma#2 and A-KID#2 based on Kausf#2. If the A-KID#2 locally generated by the UE is the same as the A-KID#2 from the AF, the key corresponding to the identification information of the AF is updated for Kaf#2.
  • the AF sends a second activation response message to the UE.
  • the AF After the AF activates Kaf#2 successfully, the AF sends a second activation response message to the UE.
  • the activation operation is as follows: create a security function function, and put the updated key into the security function for use. AF removes or stops the safe function used before (put the safe function of Kaf#1).
  • the communication apparatus includes corresponding hardware structures and/or software modules for executing each function.
  • the present application can be implemented in hardware or in the form of a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
  • the communication device may be divided into functional modules according to the foregoing method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one transceiver module.
  • the above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
  • FIG. 10 is a schematic diagram of an embodiment of the communication device in the embodiment of the present application.
  • the communication apparatus can be deployed in a network device or a chip or a chip system, and the communication apparatus 1000 includes:
  • a processing module 1001 configured to generate a second security context, where the second security context is inconsistent with the first security context, and the first security context is the security context currently used by the access and mobility management function;
  • the processing module 1001 is further configured to determine whether to activate the second security context.
  • the transceiver module 1002 is configured to send a second authentication request message including a second key identifier to the terminal device, where the second authentication request message is used to trigger a second authentication between the terminal device and the network. right;
  • the processing module 1001 is further configured to, after the second authentication succeeds, determine whether to activate the second security context generated in the second authentication process;
  • the transceiver module 1002 is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device without activating the second security context, where the second NAS SMC message includes a first key identifier; wherein the first key identifier is the key identifier of the first security context currently used by the access and mobility management function.
  • the transceiver module 1002 is further configured to send a first authentication request message including the first key identifier to the terminal device, where the first authentication request message is used to trigger the communication between the terminal device and the network. the first authentication between
  • the transceiver module 1002 is further configured to, after the first authentication succeeds, send a first NAS SMC message to the terminal device to activate the first security context generated in the first authentication process,
  • the first NAS SMC message includes the first key identifier.
  • the transceiver module 1002 is further configured to receive a registration request message from the terminal device.
  • the processing module 1001 is further configured to determine not to activate the second security context when it is determined not to update the non-access stratum NAS key and/or the access stratum AS key,
  • the processing module 1001 is further configured to determine to activate the second security context when it is determined that the non-access stratum NAS counter rolls over,
  • the processing module 1001 is further configured to determine to activate the second security context when it is determined to update the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device;
  • the processing module 1001 is further configured to not activate the second security context when it is determined that the second authentication is triggered by a first network element, and the first network element includes any one of the following: an authentication management function AUSF , Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF;
  • the processing module 1001 is further configured to not activate the second security context when it is determined that the second authentication only needs to authenticate the terminal device;
  • the processing module 1001 is further configured to not activate the second security context when it is determined that the second authentication is triggered by the terminal device.
  • the transceiver module 1002 is further configured to send the second key identifier to the terminal device after it is determined that the second security context is activated.
  • the transceiver module 1002 is further configured to, after determining to activate the second security context, send first indication information to the terminal device, where the first indication information is associated with a second network element, and the first indication information instructing the terminal device to update the communication key between the terminal device and the second network element;
  • the second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  • the transceiver module 1002 is further configured to activate, by the access and mobility management function, a non-access stratum NAS key of a second intermediate key after determining to activate the second security context, the second security context corresponding to the second intermediate key;
  • the access and mobility management function does not activate the access stratum AS key of the second intermediate key.
  • the transceiver module 1002 is further configured to receive a third authentication request message sent by the first network element, wherein the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message The message is used to trigger the second authentication between the terminal device and the network;
  • the first network element includes any one of the following: AUSF, NEF, AAnF, ECS, EES or AF.
  • the processing module 1001 is further configured to select a security algorithm to perform integrity protection and confidentiality protection on the second NAS SMC message sent by the access and mobility management function to the terminal device;
  • the processing module 1001 is further configured to determine not to activate the second security context when the security algorithm selected by the access and mobility management function is the same as the security algorithm corresponding to the first security context;
  • the transceiver module 1002 is further configured to send the second NAS SMC message to the terminal device, where the second NAS SMC message includes the first key identifier.
  • the transceiver module 1002 is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device, where the second NAS SMC message includes second indication information, and the second indication information indicates the The terminal device generates Kamf#2, and activates the second security context corresponding to Kamf#2, where Kamf#2 is the updated Kamf.
  • the second NAS SMC message further includes third indication information, where the third indication information instructs the terminal device to continue to use the NAS security context in the first security context and the AS security context in the first security context .
  • the second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, K NASint#2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 or K N3IWF#2 .
  • FIG. 11 is a schematic diagram of an embodiment of a communication device according to an embodiment of the present application.
  • the communication apparatus can be deployed in a terminal device or a chip or a chip system, and the communication apparatus 1100 includes:
  • a transceiver module 1101 configured to receive a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, where the second NAS SMC message carries the key identifier from the AMF;
  • the processing module 1102 is configured to determine not to activate the second security context when the key identifier is the same as the first key identifier of the first security context being used by the terminal device, and the second security context is the same as the first security context.
  • the first security contexts are inconsistent.
  • the processing module 1102 is further configured to determine not to activate the NAS security context in the second security context and/or the AS security context in the second security context.
  • the processing module 1102 is further configured to verify whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the same.
  • algorithm is the security algorithm selected by the access and mobility management function;
  • the processing module 1102 is further configured to determine not to update the first security context when the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context.
  • the transceiver module 1101 is further configured to receive first indication information sent by the access and mobility management function, where the first indication information is associated with a second network element, and the first indication information indicates the terminal device updating the communication key between the terminal device and the second network element;
  • the second network element includes any one of the following: a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  • the communication device in the foregoing embodiment may be a network device, or may be a chip applied in the network device, or other combined devices or components that can implement the functions of the foregoing network device.
  • the transceiver module may be a transceiver, the transceiver may include an antenna and a radio frequency circuit, etc., and the processing module may be a processor, such as a baseband chip.
  • the transceiver module may be a radio frequency unit, and the processing module may be a processor.
  • the transceiver module may be an input port of the chip system, the transceiver module may be an output interface of the chip system, and the processing module may be a processor of the chip system, such as a central processing unit (CPU) .
  • CPU central processing unit
  • the communication device in the above-mentioned embodiment may be a terminal device, or a chip applied in the terminal device or other combined devices, components, etc. that can realize the functions of the above-mentioned terminal device.
  • the transceiver module may be a transceiver, the transceiver may include an antenna and a radio frequency circuit, and the like, and the processing module may be a processor, such as a baseband chip.
  • the transceiver module may be a radio frequency unit, and the processing module may be a processor.
  • the transceiver module may be an input port of the chip system, the transceiver module may be an output interface of the chip system, and the processing module may be a processor of the chip system, such as a central processing unit.
  • An embodiment of the present application further provides a processing apparatus, where the processing apparatus includes a processor and an interface; the processor is configured to execute the finite field encoding or decoding method according to any of the foregoing method embodiments.
  • the above-mentioned processing device may be a chip, and the processor may be implemented by hardware or software.
  • the processor When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, The processor may be a general-purpose processor, and is implemented by reading software codes stored in a memory, which may be integrated in the processor, or located outside the processor, and exists independently.
  • the hardware processing circuit can be composed of discrete hardware components or an integrated circuit. In order to reduce power consumption and reduce size, it is usually implemented in the form of integrated circuits.
  • the hardware processing circuit may include ASIC (application-specific integrated circuit, application-specific integrated circuit), or PLD (programmable logic device, programmable logic device); wherein, PLD may include FPGA (field programmable gate array, field programmable gate array) , CPLD (complex programmable logic device, complex programmable logic device) and so on.
  • These hardware processing circuits can be a single semiconductor chip packaged separately (such as packaged into an ASIC); they can also be integrated with other circuits (such as CPU, DSP) and packaged into a semiconductor chip, for example, can be formed on a silicon substrate
  • a variety of hardware circuits and CPUs are individually packaged into a chip, which is also called SoC, or circuits and CPUs for implementing FPGA functions can also be formed on a silicon substrate and individually enclosed into a single chip. Also known as SoPC (system on a programmable chip, programmable system on a chip).
  • the present application also provides a communication system, which includes at least one or more of a sender, a receiver, and an intermediate node.
  • An embodiment of the present application further provides a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to control a network device to execute any one of the implementations shown in the foregoing method embodiments.
  • An embodiment of the present application also provides a computer program product, the computer program product includes computer program code, and when the computer program code runs on a computer, the computer can execute any one of the implementations shown in the foregoing method embodiments.
  • An embodiment of the present application further provides a chip system, including a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the chip executes any one of the implementations shown in the foregoing method embodiments. Way.
  • Embodiments of the present application further provide a chip system, including a processor, where the processor is configured to call and run a computer program, so that the chip executes any one of the implementations shown in the foregoing method embodiments.
  • the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be A physical unit, which can be located in one place or distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website, computer, communication device, computing equipment or data center to another website site, computer, communication device, computing device, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) transmission.
  • wire eg, coaxial cable, fiber optic, digital subscriber line (DSL)
  • wireless eg, infrared, wireless, microwave, etc.
  • the computer-readable storage medium can be any available medium that can be stored by a computer, or a data storage device such as a communication device, a data center, or the like that includes one or more available media integrated.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the apparatus embodiments described above are only illustrative.
  • the division of units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.

Abstract

Embodiments of the present application disclose a communication method and a related apparatus, the method comprising: an access and mobility management function generates a second security context, the second security context being inconsistent with a first security context, and the first security context being security context currently used by the access and mobility management function; and the access and mobility management function determines whether to activate the second security context. In the embodiments of the present application, when a terminal device only needs to perform authentication, neither the terminal device side nor the network side need to update a new security context, the complexity of key update is reduced and device performance is improved.

Description

一种通信方法以及相关装置A communication method and related device
本申请要求于2021年04月28日提交中国国家知识产权局、申请号为202110469602.1、发明名称为“一种通信方法以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number of 202110469602.1 and the invention titled "a communication method and related device", which was filed with the State Intellectual Property Office of China on April 28, 2021, the entire contents of which are incorporated herein by reference Applying.
技术领域technical field
本申请涉及通信技术领域,尤其涉及一种通信方法以及相关装置。The present application relates to the field of communication technologies, and in particular, to a communication method and related apparatus.
背景技术Background technique
随着网络技术的快速的发展,网络安全成为日益突出的问题。随着第五代移动通信(the 5th generation,5G)的发展,目前用户设备(user equipment,UE)与应用服务器(application function,AF)之间可以采用应用的认证和密钥管理(authentication and key management for application,AKMA)流程。在AKMA流程中,鉴权管理功能(authentication server function,AUSF)向统一数据管理功能(Unified Data Management,UDM)发送鉴权向量获取请求消息(Numd_UEAuthentication Get Request),该鉴权向量获取请求消息中携带永久身份标识(subscriber permanent identifier,SUPI)或签约隐藏标识符(subscription concealed identifier,SUCI),该鉴权向量获取请求消息用于触发UE与网络侧(核心网)之间的主鉴权(Primary authentication)流程。With the rapid development of network technology, network security has become an increasingly prominent problem. With the development of the 5th generation (5G) mobile communication, application authentication and key management (authentication and key management) can be used between user equipment (UE) and application server (application function, AF). management for application, AKMA) process. In the AKMA process, the authentication server function (AUSF) sends an authentication vector acquisition request message (Numd_UEAuthentication Get Request) to the Unified Data Management (UDM), and the authentication vector acquisition request message carries the Permanent identity identifier (subscriber permanent identifier, SUPI) or subscription concealed identifier (subscription concealed identifier, SUCI), the authentication vector acquisition request message is used to trigger the primary authentication (Primary authentication) between the UE and the network side (core network). )process.
在主鉴权流程后,基于中间密钥Kausf生成AKMA锚点密钥Kakma,基于中间密钥Kausf生成AKMA密钥临时身份标识(AKMA-Key Identifier,A-KID)。而基于该中间密钥Kausf派生出的Kakma,还可以继续派生出其它密钥,例如:应用服务器AF使用的密钥Kaf。本申请实施例中为了便于描述,将上述基于中间密钥Kausf派生出的密钥,称为安全上下文。After the main authentication process, the AKMA anchor key Kakma is generated based on the intermediate key Kausf, and the AKMA key temporary identity identifier (AKMA-Key Identifier, A-KID) is generated based on the intermediate key Kausf. On the basis of the Kakma derived from the intermediate key Kausf, other keys can also be derived, for example, the key Kaf used by the application server AF. For ease of description in the embodiments of the present application, the above-mentioned key derived based on the intermediate key Kausf is referred to as a security context.
Kausf的有效时间,与,安全上下文中各种密钥的有效时间可能不一致。例如:安全上下文基于中间密钥Kausf#1派生,该安全上下文中的Kaf#1有效时间到期后,该Kaf#1无效,AF与UE无法继续使用该Kaf#1。此时,Kausf#1依然处于有效时间内,则基于该Kausf#1派生的新的Kaf与Kaf#1一致,依然无法使用。因此需要更新Kausf,并基于新的Kausf#2,生成新的Kaf#2。但是生成新的Kausf#2后,安全上下文都需要更新,否则无法继续使用。因此,造成密钥更新的复杂度较大,影响设备性能。The validity time of Kausf, and the validity time of various keys in the security context may not be consistent. For example, the security context is derived based on the intermediate key Kausf#1. After the validity time of Kaf#1 in the security context expires, the Kaf#1 is invalid, and the AF and the UE cannot continue to use the Kaf#1. At this time, Kausf#1 is still in the valid time, and the new Kaf derived from this Kausf#1 is consistent with Kaf#1 and still cannot be used. Therefore, Kausf needs to be updated, and a new Kaf#2 is generated based on the new Kausf#2. However, after generating a new Kausf#2, the security context needs to be updated, otherwise it cannot continue to be used. Therefore, the complexity of the key update is relatively large, which affects the performance of the device.
发明内容SUMMARY OF THE INVENTION
第一方面,本申请实施例提出一种通信方法,包括:In a first aspect, an embodiment of the present application proposes a communication method, including:
接入和移动性管理功能AMF生成第二安全上下文,所述第二安全上下文与第一安全上下文不一致,所述第一安全上下文为接入和移动性管理功能当前使用的安全上下文;所述接入和移动性管理功能确定是否激活所述第二安全上下文。The access and mobility management function AMF generates a second security context, the second security context is inconsistent with the first security context, and the first security context is the security context currently used by the access and mobility management function; the The ingress and mobility management functions determine whether to activate the second security context.
具体的,该第一安全上下文为第一中间密钥对应的安全上下文,该第一中间密钥为Kausf。该第一安全上下文为当前使用的安全上下文。该安全上下文还可以是Kamf对应的安全上下文。当AMF收到来自其他网元的请求消息后,AMF生成第二安全上下文。该其它网元包括但不限于:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功 能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。则AMF能确定是否激活所述第二安全上下文。具体的,AMF可以使用该第二安全上下文。AMF也可以更新第一安全上下文,更新后的安全上下文为第二安全上下文。Specifically, the first security context is a security context corresponding to the first intermediate key, and the first intermediate key is Kausf. The first security context is the currently used security context. The security context may also be a security context corresponding to Kamf. After the AMF receives the request message from other network elements, the AMF generates the second security context. The other network elements include but are not limited to: Authentication Management Function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF. The AMF can then determine whether to activate the second security context. Specifically, the AMF can use the second security context. The AMF may also update the first security context, and the updated security context is the second security context.
其中,本申请任一实施例中,当第一安全上下文包括的密钥、算法、计数器等用于安全功能的材料中的一项或多项,与第二安全上下文包括的密钥、算法、计数器等用于安全功能的材料中的一项或多项不一致时,视为第一安全上下文与第二安全上下文不一致。本申请实施例中的安全上下文包括密钥、算法、计数器等用于安全功能的材料。其中,安全上下文可以分为:原生安全上下文和5G安全上下文。原生安全上下文是指通过主鉴权流程生成的安全上下文。5G安全上下文是指用于5G系统的安全上下文。5G安全上下文包括但不限于5G NAS安全上下文、5G AS安全上下文和5G AKMA安全上下文。5G NAS安全上下文用于UE和AMF之间的安全保护,AS安全上下文用于UE和基站之间的安全保护。5G AKMA安全上下文包括Kakma、A-KID、Kaf等密钥(或者安全材料,或者安全密钥)。5G AKMA安全上下文在主鉴权流程后AUSF侧生成,并发送给AAnF,UE侧则是在AKMA业务发起前再生成。Wherein, in any embodiment of the present application, when one or more of the materials used for the security function, such as the key, algorithm, and counter included in the first security context, are different from the key, algorithm, When one or more of the materials used for security functions such as counters are inconsistent, the first security context is deemed to be inconsistent with the second security context. The security context in this embodiment of the present application includes materials used for security functions, such as keys, algorithms, and counters. Among them, the security context can be divided into: native security context and 5G security context. The native security context refers to the security context generated through the main authentication process. The 5G security context refers to the security context for the 5G system. 5G security context includes but is not limited to 5G NAS security context, 5G AS security context and 5G AKMA security context. The 5G NAS security context is used for security protection between UE and AMF, and the AS security context is used for security protection between UE and base station. The 5G AKMA security context includes keys (or security materials, or security keys) such as Kakma, A-KID, Kaf, etc. The 5G AKMA security context is generated on the AUSF side after the main authentication process and sent to the AAnF, and on the UE side before the AKMA service is initiated.
当第一安全上下文包括:密钥、算法、计数器等用于安全功能的材料中的一项或多项,与第二安全上下文包括的密钥、算法、计数器等用于安全功能的材料中的一项或多项不一致时,视为第一安全上下文与第二安全上下文不一致。本申请实施例中,AMF并不盲目激活安全上下文,当生成新的安全上下文后,AMF确定是否激活。以此降低密钥更新复杂度,提升设备性能。When the first security context includes: one or more of materials used for security functions such as keys, algorithms, counters, etc., and the second security context includes keys, algorithms, counters and other materials used for security functions, When one or more items are inconsistent, the first security context is deemed to be inconsistent with the second security context. In this embodiment of the present application, the AMF does not blindly activate the security context, and after generating a new security context, the AMF determines whether to activate it. This reduces the complexity of key update and improves device performance.
结合第一方面,在第一方面的一种可能的实现方式中,所述接入和移动性管理功能确定是否激活所述第二安全上下文,包括:所述接入和移动性管理功能向所述终端设备发送包含第二密钥标识符的第二鉴权请求消息,所述第二鉴权请求消息用于触发所述终端设备和网络之间的第二鉴权(也称为第二主鉴权流程);在所述第二鉴权成功之后,所述接入和移动性管理功能确定是否需要激活所述第二鉴权过程中生成的第二安全上下文;在不需要激活所述第二安全上下文的情况下,所述接入和移动性管理功能向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第一密钥标识符;其中,所述第一密钥标识符为所述接入和移动性管理功能当前使用的第一安全上下文的密钥标识符。第一密钥标识符与第二密钥标识符不一致。With reference to the first aspect, in a possible implementation manner of the first aspect, the access and mobility management function determining whether to activate the second security context includes: the access and mobility management function reporting to all The terminal device sends a second authentication request message containing a second key identifier, and the second authentication request message is used to trigger a second authentication (also referred to as the second key identifier) between the terminal device and the network. authentication process); after the second authentication is successful, the access and mobility management function determines whether it is necessary to activate the second security context generated in the second authentication process; In the case of two security contexts, the access and mobility management function sends a second non-access stratum security mode command NAS SMC message to the terminal device, and the second NAS SMC message includes the first key identifier; The first key identifier is the key identifier of the first security context currently used by the access and mobility management function. The first key identifier does not match the second key identifier.
本申请实施例中,激活也可以替换为更新。不激活第二安全上下文可以是不更新第二安全上下文;也可以是生成该第二安全上下文后,不使用该第二安全上下文;还可以是不生成该第二安全上下文,此处不作限制。在不激活第二安全上下文的情况下,可以继续使用第一安全上下文。In this embodiment of the present application, activation may also be replaced by update. Deactivating the second security context may mean not updating the second security context; or not using the second security context after generating the second security context; or not generating the second security context, which is not limited here. The first security context can continue to be used without activating the second security context.
具体的,AMF触发第二主鉴权流程后,AMF发起第二主鉴权流程:AMF向AUSF请求对UE进行鉴权;AUSF向UDM请求鉴权向量;UDM生成鉴权向量,并根据选择的主鉴权方法确定发送生成的鉴权向量还是处理后的鉴权向量发送给AUSF,AMF获取来自AUSF的鉴权向量后,AMF向UE发送第二鉴权请求消息,该第二鉴权请求消息包括第二密钥标识符,该第二鉴权请求消息用于触发UE与网络的第二鉴权(也称为第二主鉴权流 程)。本申请实施例中,以密钥标识符是ngKSI为例进行说明,可以理解的是,该密钥标识符还可以是其它标识,此处不作限制。具体流程可以参考标准TS 33.501版本17.1.0中章节6.1.3的描述。AMF通过第二NAS SMC消息(“NAS Security Mode Command”消息)向UE发送该第一密钥标识符。即该第二NAS SMC消息中携带该第一密钥标识符(例如ngKSI#1)。具体地,AMF将第一密钥标识符使用的加密算法和/或完整性保护算法作为选择的安全算法放入到第二NAS SMC消息中。该第二NAS SMC消息使用第一密钥标识符对应的K NASint-1进行完整性保护和/或使用K NASenc-1进行机密性保护。 Specifically, after the AMF triggers the second main authentication process, the AMF initiates the second main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for an authentication vector; the UDM generates the authentication vector, and according to the selected The main authentication method determines whether to send the generated authentication vector or the processed authentication vector to the AUSF. After the AMF obtains the authentication vector from the AUSF, the AMF sends a second authentication request message to the UE. The second authentication request message The second key identifier is included, and the second authentication request message is used to trigger the second authentication between the UE and the network (also referred to as the second primary authentication procedure). In the embodiments of the present application, the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here. For the specific process, please refer to the description in Section 6.1.3 of the standard TS 33.501 version 17.1.0. The AMF sends the first key identifier to the UE through a second NAS SMC message ("NAS Security Mode Command" message). That is, the second NAS SMC message carries the first key identifier (eg, ngKSI#1). Specifically, the AMF puts the encryption algorithm and/or the integrity protection algorithm used by the first key identifier into the second NAS SMC message as the selected security algorithm. The second NAS SMC message uses K NASint-1 corresponding to the first key identifier for integrity protection and/or K NASenc-1 for confidentiality protection.
结合第一方面,在第一方面的一种可能的实现方式中,所述接入和移动性管理功能向所述终端设备发送包含所述第二密钥标识符的所述第二鉴权请求消息之前,所述方法还包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the access and mobility management function sends the second authentication request including the second key identifier to the terminal device Before the message, the method further includes:
所述接入和移动性管理功能向所述终端设备发送包含所述第一密钥标识符的第一鉴权请求消息,所述第一鉴权请求消息用于触发所述终端设备和网络之间的第一鉴权;在所述第一鉴权成功之后,向所述终端设备发送第一NAS SMC消息以激活在所述第一鉴权过程中生成的所述第一安全上下文,所述第一NAS SMC消息包括所述第一密钥标识符。具体的,AMF向UE发送第一鉴权请求消息,该第一鉴权请求消息包括第一密钥标识符,该第一鉴权请求消息用于触发UE与网络之间的第一鉴权(也称为第一主鉴权流程)。示例性的,该第一密钥标识符为ngKSI#1,该第一密钥标识符与第一中间密钥对应。本申请实施例中,以中间密钥为Kausf为例进行说明。则该第一中间密钥为Kausf#1。The access and mobility management function sends a first authentication request message containing the first key identifier to the terminal device, and the first authentication request message is used to trigger an exchange between the terminal device and the network. the first authentication between; after the first authentication is successful, send a first NAS SMC message to the terminal device to activate the first security context generated in the first authentication process, the The first NAS SMC message includes the first key identifier. Specifically, the AMF sends a first authentication request message to the UE, where the first authentication request message includes a first key identifier, and the first authentication request message is used to trigger the first authentication ( Also known as the first primary authentication process). Exemplarily, the first key identifier is ngKSI#1, and the first key identifier corresponds to the first intermediate key. In the embodiment of the present application, the intermediate key is Kausf as an example for description. Then the first intermediate key is Kausf#1.
AMF接收注册请求消息后,AMF发起主鉴权流程:AMF向AUSF请求对UE进行鉴权;AUSF向UDM请求鉴权向量;UDM生成鉴权向量,并根据选择的主鉴权方法确定发送生成的鉴权向量还是处理后的鉴权向量发送给AUSF,AMF获取来自AUSF的鉴权向量后,AMF向UE发送第一鉴权请求消息,该第一鉴权请求消息中包括第一密钥标识符。本申请实施例中,以密钥标识符是ngKSI为例进行说明,可以理解的是,该密钥标识符还可以是其它标识,此处不作限制。具体流程可以参考标准TS 33.501版本17.1.0中章节6.1.3的描述。After the AMF receives the registration request message, the AMF initiates the main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for the authentication vector; the UDM generates the authentication vector, and determines to send the generated authentication vector according to the selected primary authentication method. The authentication vector or the processed authentication vector is sent to the AUSF. After the AMF obtains the authentication vector from the AUSF, the AMF sends the first authentication request message to the UE, and the first authentication request message includes the first key identifier. . In the embodiments of the present application, the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here. For the specific process, please refer to the description in Section 6.1.3 of Standard TS 33.501 Version 17.1.0.
具体的,AMF向UE发送第一鉴权请求消息,该第一鉴权请求消息包括第一密钥标识符,该第一鉴权请求消息用于触发UE与网络之间的第一鉴权(也称为第一主鉴权流程)。Specifically, the AMF sends a first authentication request message to the UE, where the first authentication request message includes a first key identifier, and the first authentication request message is used to trigger the first authentication ( Also known as the first primary authentication process).
结合第一方面,在第一方面的一种可能的实现方式中,所述接入和移动性管理功能向所述终端设备发送包含所述第一密钥标识符的所述第一鉴权请求消息之前,所述方法还包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the access and mobility management function sends the first authentication request including the first key identifier to the terminal device Before the message, the method further includes:
所述接入和移动性管理功能接收来自所述终端设备的注册请求消息。UE向AMF发送注册请求消息,该注册请求消息通过网络设备转发。该注册请求消息中携带UE的用户隐藏标识(Subscription Concealed Identifier,SUCI)。可选的,该注册请求消息可以是“Registration Request”。该注册请求消息触发的是第一鉴权,即该终端设备的初次鉴权。第一鉴权中生成第一安全上下文,该第一安全上下文激活。AMF无需判断是否激活该第一安全上下文。降低了设备计算负担,降低了密钥复杂度。The access and mobility management function receives a registration request message from the terminal device. The UE sends a registration request message to the AMF, and the registration request message is forwarded by the network device. The registration request message carries the UE's Subscription Concealed Identifier (SUCI). Optionally, the registration request message may be "Registration Request". The registration request message triggers the first authentication, that is, the initial authentication of the terminal device. A first security context is generated in the first authentication, and the first security context is activated. The AMF does not need to determine whether to activate the first security context. The computing burden of the device is reduced, and the key complexity is reduced.
结合第一方面,在第一方面的一种可能的实现方式中,所述接入和移动性管理功能确 定是否需要激活所述第二鉴权过程中生成的所述第二安全上下文,包括:In conjunction with the first aspect, in a possible implementation manner of the first aspect, the access and mobility management function determines whether the second security context generated in the second authentication process needs to be activated, including:
所述接入和移动性管理功能确定不更新非接入层NAS密钥和/或接入层AS密钥时,所述接入和移动性管理功能确定不激活所述第二安全上下文。When the access and mobility management function determines not to update the non-access stratum NAS key and/or the access stratum AS key, the access and mobility management function determines not to activate the second security context.
或者,or,
所述接入和移动性管理功能确定非接入层NAS计数器(count)翻转时,所述接入和移动性管理功能确定激活所述第二安全上下文。具体的,AMF确定更新5G NAS安全上下文或者5G AS安全上下文时,比如,NAS COUNT即将翻转。AMF确定激活第二安全上下文。When the access and mobility management function determines that a non-access stratum NAS counter (count) rolls over, the access and mobility management function determines to activate the second security context. Specifically, when the AMF determines to update the 5G NAS security context or the 5G AS security context, for example, the NAS COUNT is about to be overturned. The AMF determines to activate the second security context.
或者,or,
所述接入和移动性管理功能确定更新所述终端设备的非接入层NAS密钥上下文和/或接入层AS密钥上下文时,所述接入和移动性管理功能确定激活所述第二安全上下文;When the access and mobility management function determines to update the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device, the access and mobility management function determines to activate the first 2. Security context;
或者,or,
所述接入和移动性管理功能确定所述第二鉴权由第一网元触发,则所述接入和移动性管理功能不激活所述第二安全上下文,所述第一网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。即AMF收到来自第一网元的用于请求更新密钥的消息后,AMF不激活第二安全上下文。The access and mobility management function determines that the second authentication is triggered by the first network element, then the access and mobility management function does not activate the second security context, and the first network element includes the following: Either: Authentication Management Function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF. That is, after the AMF receives the message for requesting to update the key from the first network element, the AMF does not activate the second security context.
或者,or,
所述接入和移动性管理功能确定所述第二鉴权仅需要对所述终端设备进行鉴权,则所述接入和移动性管理功能不激活所述第二安全上下文;The access and mobility management function determines that the second authentication only needs to authenticate the terminal device, and the access and mobility management function does not activate the second security context;
或者,or,
所述接入和移动性管理功能确定所述第二鉴权由所述终端设备触发,则所述接入和移动性管理功能不激活所述第二安全上下文。The access and mobility management function determines that the second authentication is triggered by the terminal device, and the access and mobility management function does not activate the second security context.
或者,AMF根据本地策略,确定不激活第二安全上下文。示例性的场景如下:运营商配置出现如下场景时,触发UE鉴权,且不激活第二安全上下文,该场景包括但不限于:UE断网(UE与为该UE提供通信服务的网络设备断开连接);AMF数据发生迁移,即从AMF#1迁移至AMF#2。Alternatively, the AMF determines not to activate the second security context according to the local policy. An exemplary scenario is as follows: when the operator configures the following scenarios, the UE authentication is triggered and the second security context is not activated. open connection); AMF data is migrated, that is, migrated from AMF#1 to AMF#2.
通过多种手段确定是否激活第二安全上下文,提升了方案的实现灵活性。Whether to activate the second security context is determined through various means, which improves the implementation flexibility of the solution.
结合第一方面,在第一方面的一种可能的实现方式中,所述方法还包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the method further includes:
在所述接入和移动性管理功能确定需要激活所述第二安全上下文的情况下,所述接入和移动性管理功能向所述终端设备发送所述第二密钥标识符。In the event that the access and mobility management function determines that activation of the second security context is required, the access and mobility management function sends the second key identifier to the terminal device.
具体的,AMF确定发起主鉴权流程,AMF向AUSF请求对UE进行鉴权,AUSF向UDM请求鉴权向量,UDM发送鉴权向量给AUSF,AUSF将鉴权向量经过处理发送给AMF。AMF在收到经过处理的鉴权向量后生成第二密钥标识符,并将第二密钥标识符随着经过处理的鉴权向量发送给UE。Specifically, the AMF determines to initiate the main authentication process, the AMF requests the AUSF to authenticate the UE, the AUSF requests the authentication vector from the UDM, the UDM sends the authentication vector to the AUSF, and the AUSF sends the authentication vector to the AMF after processing. The AMF generates a second key identifier after receiving the processed authentication vector, and sends the second key identifier to the UE along with the processed authentication vector.
示例性的,AMF通过“Authentication Request”消息向UE发送该第二密钥标识符。该第二密钥标识符可以是ngKSI#2。Exemplarily, the AMF sends the second key identifier to the UE through an "Authentication Request" message. The second key identifier may be ngKSI#2.
结合第一方面,在第一方面的一种可能的实现方式中,所述方法还包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the method further includes:
在所述接入和移动性管理功能确定需要激活所述第二安全上下文的情况下,所述接入和移动性管理功能向所述终端设备发送第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;In the case that the access and mobility management function determines that the second security context needs to be activated, the access and mobility management function sends first indication information to the terminal device, where the first indication information is related to The second network element is associated, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element;
所述第二网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
可选地,该第一指示信息来自AAnf。AAnF向AUSF发送第二密钥请求消息,该第二密钥请求消息携带第一指示信息。AUSF向AMF发送该第一指示信息。AMF向UE发送该第一指示信息。该第一指示信息与第二网元关联,第一指示信息指示终端设备更新终端设备与第二网元之间的通信密钥。第二网元包括以下任一个但不限于NEF、AAnF、ECS、EES或AF。示例性的,当第二网元为AF时,第一指示信息可以是AF的标识信息(AF_ID)。Optionally, the first indication information comes from AAnf. The AAnF sends a second key request message to the AUSF, where the second key request message carries the first indication information. The AUSF sends the first indication information to the AMF. The AMF sends the first indication information to the UE. The first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element. The second network element includes any of the following but not limited to NEF, AAnF, ECS, EES or AF. Exemplarily, when the second network element is an AF, the first indication information may be identification information (AF_ID) of the AF.
结合第一方面,在第一方面的一种可能的实现方式中,所述方法还包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the method further includes:
在所述接入和移动性管理功能确定需要激活所述第二安全上下文的情况下,所述接入和移动性管理功能激活第二中间密钥的非接入层NAS密钥,所述第二安全上下文对应所述第二中间密钥;If the access and mobility management function determines that the second security context needs to be activated, the access and mobility management function activates the non-access stratum NAS key of the second intermediate key, the first The second security context corresponds to the second intermediate key;
所述接入和移动性管理功能不激活所述第二中间密钥的接入层AS密钥。The access and mobility management function does not activate the access stratum AS key of the second intermediate key.
具体的,AMF确定是否要更新AS密钥。如果该主鉴权触发流程是因为NAS密钥需要更新,比如NAS计数器值即将翻转。为了节省UE的复杂度,AMF可以确定不更新AS密钥。则,AMF在激活该第二安全上下文时,不激活该第二密钥标识符对应的AS密钥。即AMF激活的该第二安全上下文中不包括AS密钥,AMF仅激活该第二密钥标识符对应的NAS密钥。例如:AMF不激活ngKSI#2对应的AS密钥,该AS密钥包括但不限于:密钥K gNB。具体的,AMF不生成ngKSI#2对应的K gNB(AMF不生成新的K gNB#2,旧的K gNB#1对应ngKSI#1),或者AMF生成K gNB#2后,并不发送该K gNB#2至网络设备(例如基站)。 Specifically, the AMF determines whether to update the AS key. If the primary authentication triggers the process because the NAS key needs to be updated, for example, the NAS counter value is about to roll over. In order to save the complexity of the UE, the AMF may determine not to update the AS key. Then, when the AMF activates the second security context, it does not activate the AS key corresponding to the second key identifier. That is, the second security context activated by the AMF does not include the AS key, and the AMF only activates the NAS key corresponding to the second key identifier. For example, the AMF does not activate the AS key corresponding to ngKSI#2, and the AS key includes but is not limited to: the key K gNB . Specifically, AMF does not generate K gNB corresponding to ngKSI#2 (AMF does not generate new K gNB #2, and old K gNB #1 corresponds to ngKSI#1), or after AMF generates K gNB #2, it does not send the K gNB #2 gNB #2 to network equipment (eg base station).
结合第一方面,在第一方面的一种可能的实现方式中,所述接入和移动性管理功能向所述终端设备发送包含所述第二密钥标识符的所述第二鉴权请求消息之前,所述方法还包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the access and mobility management function sends the second authentication request including the second key identifier to the terminal device Before the message, the method further includes:
所述接入和移动性管理功能接收第一网元发送的第三鉴权请求消息,其中,所述第三鉴权请求消息携带所述终端设备的永久标识信息,所述第三鉴权请求消息用于触发所述终端设备与网络之间的所述第二鉴权;The access and mobility management function receives a third authentication request message sent by the first network element, wherein the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message The message is used to trigger the second authentication between the terminal device and the network;
所述第一网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The first network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
可选地,该第三鉴权请求消息指示AMF确定是否激活第二安全上下文。具体的,该第三鉴权请求消息用于请求AMF触发主鉴权流程。该第三鉴权请求消息中携带UE的永久身份信息,可选地,该第三鉴权请求消息携带指示信息,该指示信息用于指示需要触发主鉴权流程的原因值。Optionally, the third authentication request message instructs the AMF to determine whether to activate the second security context. Specifically, the third authentication request message is used to request the AMF to trigger the main authentication process. The third authentication request message carries the permanent identity information of the UE. Optionally, the third authentication request message carries indication information, where the indication information is used to indicate a reason value that needs to trigger the main authentication process.
AMF可以根据该第三鉴权请求消息,或者根据该第三鉴权请求消息中携带的指示信息确定主鉴权流程是为了更新AKMA相关密钥,则AMF确定不激活第二安全上下文。该第三鉴权请求消息可以是“initial primary authentication Request”。可选地,或者,AMF根据该指示信息判断是否需要激活第二安全上下文。若AMF判断NAS COUNT即将翻转,即NAS COUNT翻转需要激活第二安全上下文,则AMF确定要激活第二安全上下文。The AMF may determine, according to the third authentication request message or the indication information carried in the third authentication request message, that the primary authentication process is to update the AKMA-related key, and the AMF determines not to activate the second security context. The third authentication request message may be "initial primary authentication Request". Optionally, or, the AMF determines whether the second security context needs to be activated according to the indication information. If the AMF determines that the NAS COUNT is about to be rolled over, that is, the rollover of the NAS COUNT requires the activation of the second security context, the AMF determines that the second security context is to be activated.
可选地,该第三鉴权请求消息携带指示信息,该指示信息用于指示需要触发主鉴权流程的原因值。Optionally, the third authentication request message carries indication information, where the indication information is used to indicate a reason value that needs to trigger the main authentication process.
示例性的,第一网元为AAnF。AAnF可以直接向AMF发送第三鉴权请求消息,第三鉴权请求消息携带UE的永久标识信息,可选地携带AF ID。在AAnF发送该消息前,AAnF要确定可以为UE服务的AMF。AAnF根据UE的永久标识信息从UDM中确定为该UE提供服务的AMF。Exemplarily, the first network element is AAnF. The AAnF may directly send a third authentication request message to the AMF, where the third authentication request message carries the permanent identification information of the UE, and optionally carries the AF ID. Before the AAnF sends this message, the AAnF needs to determine the AMFs that can serve the UE. The AAnF determines the AMF serving the UE from the UDM according to the UE's permanent identity information.
结合第一方面,在第一方面的一种可能的实现方式中,所述接入和移动性管理功能向所述终端设备发送所述第二NAS SMC消息,包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the access and mobility management function sends the second NAS SMC message to the terminal device, including:
所述接入和移动性管理功能选择安全算法对所述接入和移动性管理功能向所述终端设备发送的第二NAS SMC消息进行完整性保护和机密性保护;当所述接入和移动性管理功能选择的安全算法与所述第一安全上下文对应的安全算法相同,则所述接入和移动性管理功能确定不激活所述第二安全上下文;所述接入和移动性管理功能向所述终端设备发送所述第二NAS SMC消息,所述第二NAS SMC消息包括所述第一密钥标识符。AMF根据选择的安全算法(对第二NAS SMC消息进行处理的安全算法),与当前使用的第一安全上下文对应的安全算法是否相同,确定是否激活第二安全上下文。若不激活,则在NAS SMC流程#2中,AMF向UE发送第二NAS SMC消息,该第二NAS SMC消息包括第一密钥标识符。第一密钥标识符标识的NAS密钥是AMF和UE当前正在使用的密钥。通过第一密钥标识符,通知UE不激活第二安全上下文。The access and mobility management function selects a security algorithm to perform integrity protection and confidentiality protection on the second NAS SMC message sent by the access and mobility management function to the terminal device; If the security algorithm selected by the mobility management function is the same as the security algorithm corresponding to the first security context, the access and mobility management function determines not to activate the second security context; The terminal device sends the second NAS SMC message, where the second NAS SMC message includes the first key identifier. The AMF determines whether to activate the second security context according to whether the selected security algorithm (the security algorithm for processing the second NAS SMC message) is the same as the security algorithm corresponding to the currently used first security context. If not activated, in NAS SMC process #2, the AMF sends a second NAS SMC message to the UE, where the second NAS SMC message includes the first key identifier. The NAS key identified by the first key identifier is the key currently being used by the AMF and the UE. Through the first key identifier, the UE is notified to not activate the second security context.
结合第一方面,在第一方面的一种可能的实现方式中,所述接入和移动性管理功能确定激活所述第二安全上下文之后,所述方法还包括:With reference to the first aspect, in a possible implementation manner of the first aspect, after the access and mobility management function determines to activate the second security context, the method further includes:
所述接入和移动性管理功能向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第二指示信息,所述第二指示信息指示所述终端设备生成Kamf#2,并激活Kamf#2对应的所述第二安全上下文,所述Kamf#2为更新的Kamf。The access and mobility management function sends a second non-access stratum security mode command NAS SMC message to the terminal device, the second NAS SMC message includes second indication information, and the second indication information indicates the The terminal device generates Kamf#2, and activates the second security context corresponding to Kamf#2, where Kamf#2 is the updated Kamf.
在另一种实现方式中,没有发生主鉴权流程。AMF生成了Kamf#2,但是没有生成第二密钥标识符时,AMF确定不需要激活第二安全上下文。为了让UE与AMF之间的密钥同步,则第二NAS SMC消息中包括第二指示信息(Kamf change),第二指示信息指示UE需要生成新的Kamf,称为Kamf#2(UE原来使用的Kamf称为Kamf#1)。可选的,AMF在第二NAS SMC消息中携带第一密钥标识符,In another implementation, no primary authentication process occurs. When the AMF generates Kamf#2, but does not generate the second key identifier, the AMF determines that the second security context does not need to be activated. In order to synchronize the keys between the UE and the AMF, the second NAS SMC message includes second indication information (Kamf change), which indicates that the UE needs to generate a new Kamf, which is called Kamf#2 (the original used by the UE The Kamf is called Kamf#1). Optionally, the AMF carries the first key identifier in the second NAS SMC message,
在另一种实现方式中,没有发生主鉴权流程,但是AMF生成了Kamf#2和第二密钥标识符,AMF确定不需要激活第二安全上下文。为了让UE与AMF之间的密钥同步,则AMF向UE发送第二指示信息,第二指示信息告知UE需要生成新的Kamf,称为Kamf#2。若AMF获得了第二密钥标识符,则第二NAS SMC消息中携带第一密钥标识符和第二指示信 息。In another implementation, the primary authentication process does not occur, but the AMF generates Kamf#2 and the second key identifier, and the AMF determines that the second security context does not need to be activated. In order to synchronize the keys between the UE and the AMF, the AMF sends the second indication information to the UE, and the second indication information informs the UE that a new Kamf needs to be generated, which is called Kamf#2. If the AMF obtains the second key identifier, the second NAS SMC message carries the first key identifier and the second indication information.
结合第一方面,在第一方面的一种可能的实现方式中,所述第二NAS SMC消息还包括第三指示信息,所述第三指示信息指示所述终端设备继续使用所述第一安全上下文中的NAS安全上下文和所述第一安全上下文中的AS安全上下文。With reference to the first aspect, in a possible implementation manner of the first aspect, the second NAS SMC message further includes third indication information, where the third indication information instructs the terminal device to continue using the first security The NAS security context in the context and the AS security context in the first security context.
可选地,当主鉴权流程没有发生的情况下,若AMF向UE发送第一密钥标识符,则第二NAS SMC消息中还可以携带一个第三指示信息。具体地,第三指示信息用于告知UE不需要更新当前使用的NAS安全上下文和AS安全上下文。当前使用的NAS安全上下文也可以称为第一安全上下文中的NAS安全上下文,当前使用的AS安全上下文也可以称为第一安全上下文中的AS安全上下文。本申请实施例中NAS安全上下文可以是5G NAS安全上下文,AS安全上下文可以是5G AS安全上下文。Optionally, when the main authentication process does not occur, if the AMF sends the first key identifier to the UE, the second NAS SMC message may also carry a third indication information. Specifically, the third indication information is used to inform the UE that the currently used NAS security context and AS security context do not need to be updated. The currently used NAS security context may also be referred to as the NAS security context in the first security context, and the currently used AS security context may also be referred to as the AS security context in the first security context. In this embodiment of the present application, the NAS security context may be a 5G NAS security context, and the AS security context may be a 5G AS security context.
第三指示信息的具体形式本实施例不做具体限定,可以是比特位指示信息,也可以是枚举类型信息,还可以通过有没有出现进行指示,比如第二NAS SMC消息出现了第三指示信息则不更新当前使用的5G NAS安全上下文和5G AS安全上下文,第二NAS SMC消息中没有出现则指示UE需要更新当前使用的5G NAS安全上下文和5G AS安全上下文。The specific form of the third indication information is not specifically limited in this embodiment. It may be bit indication information, or enumeration type information, or it may be indicated by whether it appears or not. For example, a third indication appears in the second NAS SMC message. The information does not update the currently used 5G NAS security context and 5G AS security context. If it does not appear in the second NAS SMC message, it indicates that the UE needs to update the currently used 5G NAS security context and 5G AS security context.
在另一种实现方式中,没有发生主鉴权流程。AMF生成了Kamf#2,但是没有生成第二密钥标识符时,AMF确定不需要激活第二安全上下文。为了让UE与AMF之间的密钥同步,则第二NAS SMC消息中包括第二指示信息(Kamf change indicator),第二指示信息指示UE需要生成新的Kamf,称为Kamf#2(UE原来使用的Kamf称为Kamf#1)。可选的,AMF在第二NAS SMC消息中携带第一密钥标识符,可选的,第二NAS SMC消息还携带第三指示信息。In another implementation, no primary authentication process occurs. When the AMF generates Kamf#2, but does not generate the second key identifier, the AMF determines that the second security context does not need to be activated. In order to synchronize the keys between the UE and the AMF, the second NAS SMC message includes second indication information (Kamf change indicator), and the second indication information indicates that the UE needs to generate a new Kamf, which is called Kamf#2 (the original Kamf of the UE). The Kamf used is called Kamf#1). Optionally, the AMF carries the first key identifier in the second NAS SMC message, and optionally, the second NAS SMC message also carries third indication information.
在另一种实现方式中,没有发生主鉴权流程,但是AMF生成了Kamf#2和第二密钥标识符,AMF确定不需要激活第二安全上下文。为了让UE与AMF之间的密钥同步,则AMF向UE发送第二指示信息,第二指示信息告知UE需要生成新的Kamf,称为Kamf#2。若AMF获得了第二密钥标识符,则第二NAS SMC消息中携带第一密钥标识符和第二指示信息,或者第二NAS SMC消息中携带第二密钥标识符、第三指示信息和第二指示信息。In another implementation, the primary authentication process does not occur, but the AMF generates Kamf#2 and the second key identifier, and the AMF determines that the second security context does not need to be activated. In order to synchronize the keys between the UE and the AMF, the AMF sends the second indication information to the UE, and the second indication information informs the UE that a new Kamf needs to be generated, which is called Kamf#2. If the AMF obtains the second key identifier, the second NAS SMC message carries the first key identifier and the second indication information, or the second NAS SMC message carries the second key identifier and the third indication information and second indication information.
结合第一方面,在第一方面的一种可能的实现方式中,所述第二安全上下文包括以下一项或多项:Kseaf#2、Kamf#2、Kaf#2、Kakma#2、K NASint#2、K NASenc#2、K gNB#2、K RRCint#2、K RRCenc#2或者K N3IWF#2With reference to the first aspect, in a possible implementation manner of the first aspect, the second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, KNASint #2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 , or K N3IWF#2 .
第二方面,本申请实施例提出一种通信方法,包括:In a second aspect, an embodiment of the present application proposes a communication method, including:
所述终端设备接收来自接入和移动性管理功能AMF的第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息携带来自所述来自AMF的密钥标识符;当所述密钥标识符与所述终端设备正在使用的第一安全上下文的第一密钥标识符相同时,所述终端设备确定不激活第二安全上下文,所述第二安全上下文与所述第一安全上下文不一致。The terminal device receives a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, and the second NAS SMC message carries the key identifier from the AMF; when the When the key identifier is the same as the first key identifier of the first security context being used by the terminal device, the terminal device determines not to activate the second security context, which is the same as the first security context. Inconsistent context.
本申请实施例中的安全上下文包括密钥、算法、计数器等用于安全功能的材料。其中,安全上下文可以分为:原生安全上下文和5G安全上下文。原生安全上下文是指通过主鉴权流程生成的安全上下文。5G安全上下文是指用于5G系统的安全上下文。5G安全上下文包括但不限于5G NAS安全上下文、5G AS安全上下文和5G AKMA安全上下文。5G NAS 安全上下文用于UE和AMF之间的安全保护,AS安全上下文用于UE和基站之间的安全保护。5G AKMA安全上下文包括Kakma、A-KID、Kaf等密钥(或者安全材料,或者安全密钥)。5G AKMA安全上下文在主鉴权流程后AUSF侧生成,并发送给AAnF,UE侧则是在AKMA业务发起前再生成。The security context in this embodiment of the present application includes materials used for security functions, such as keys, algorithms, and counters. Among them, the security context can be divided into: native security context and 5G security context. The native security context refers to the security context generated through the main authentication process. The 5G security context refers to the security context for the 5G system. 5G security context includes but is not limited to 5G NAS security context, 5G AS security context and 5G AKMA security context. 5G NAS security context is used for security protection between UE and AMF, and AS security context is used for security protection between UE and base station. The 5G AKMA security context includes keys (or security materials, or security keys) such as Kakma, A-KID, Kaf, etc. The 5G AKMA security context is generated on the AUSF side after the main authentication process and sent to the AAnF, and on the UE side before the AKMA service is initiated.
本申请实施例中,UE并不盲目激活安全上下文,当生成新的安全上下文后,UE确定是否激活。以此降低密钥更新复杂度,提升设备性能。In this embodiment of the present application, the UE does not blindly activate the security context, and after generating a new security context, the UE determines whether to activate it. This reduces the complexity of key update and improves device performance.
结合第二方面,在第二方面的一种可能的实现方式中,所述终端设备确定不激活所述第二安全上下文,包括:所述终端设备确定不激活所述第二安全上下文中的NAS安全上下文和/或所述第二安全上下文中的AS安全上下文。UE可以不激活第二安全上下文中的部分NAS安全上下文和/或所述第二安全上下文中的AS安全上下文,提升方案的实现灵活性。With reference to the second aspect, in a possible implementation manner of the second aspect, the terminal device determining not to activate the second security context includes: the terminal device determining not to activate the NAS in the second security context The security context and/or the AS security context in the second security context. The UE may not activate part of the NAS security context in the second security context and/or the AS security context in the second security context to improve the implementation flexibility of the solution.
结合第二方面,在第二方面的一种可能的实现方式中,所述终端设备确定不激活所述第二安全上下文之前,所述方法还包括:所述终端设备验证所述来自AMF的密钥标识符对应的安全算法,与所述第一安全上下文对应的安全算法是否相同,所述来自AMF的密钥标识符对应的安全算法为所述接入和移动性管理功能选择的安全算法;当所述来自AMF的密钥标识符对应的安全算法与所述第一安全上下文对应的安全算法相同,所述终端设备确定不更新第一安全上下文。With reference to the second aspect, in a possible implementation manner of the second aspect, before the terminal device determines not to activate the second security context, the method further includes: the terminal device verifies the password from the AMF Whether the security algorithm corresponding to the key identifier is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the security algorithm selected by the access and mobility management function; When the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, the terminal device determines not to update the first security context.
UE收到第二NAS SMC消息后,如果第二NAS SMC消息有加密保护,则UE使用当前UE正在使用的密钥对消息进行解密保护。After the UE receives the second NAS SMC message, if the second NAS SMC message is encrypted and protected, the UE decrypts and protects the message using the key currently being used by the UE.
具体的,UE收到第二NAS SMC消息后,UE使用当前UE正在使用的密钥对消息进行完整性保护验证。并验证第二NAS SMC消息中携带的安全算法是否与UE在注册请求消息中携带的安全算法相同,安全算法包括:UE的完整性保护算法和加密算法。在所有验证通过后,UE根据该第一密钥标识符确定后续使用的密钥。下面对不同方案分别进行描述:Specifically, after the UE receives the second NAS SMC message, the UE performs integrity protection verification on the message using the key currently being used by the UE. And verify whether the security algorithm carried in the second NAS SMC message is the same as the security algorithm carried by the UE in the registration request message, and the security algorithm includes: the integrity protection algorithm and the encryption algorithm of the UE. After all verifications are passed, the UE determines the key to be used subsequently according to the first key identifier. The different schemes are described below:
(1)、当来自AMF的密钥标识符与UE的密钥标识符相同,且密钥标识符对应的安全算法与第一中间密钥对应的安全算法相同,则终端设备继续使用第一安全上下文,终端设备不作任何处理,其中,第一安全上下文对应第一中间密钥;(1), when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is the same as the security algorithm corresponding to the first intermediate key, the terminal device continues to use the first security algorithm context, the terminal device does not perform any processing, wherein the first security context corresponds to the first intermediate key;
(2)、当来自AMF的密钥标识符与UE的密钥标识符不相同,则终端设备使用第二中间密钥生成第二安全上下文,终端设备激活第二安全上下文;(2), when the key identifier from the AMF is different from the key identifier of the UE, the terminal device uses the second intermediate key to generate the second security context, and the terminal device activates the second security context;
(3)、当来自AMF的密钥标识符与UE的密钥标识符相同,且密钥标识符对应的安全算法与第一中间密钥对应的安全算法不同,则终端设备根据第一中间密钥生成第三安全上下文,终端设备激活第三安全上下文。(3), when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is different from the security algorithm corresponding to the first intermediate key, then the terminal device according to the first intermediate key The key generates a third security context, and the terminal device activates the third security context.
具体的,当该来自AMF的密钥标识符为第一密钥标识符时,UE需要使用该第一密钥标识符对应的密钥,即UE需要使用第一安全上下文和第一中间密钥。UE可以继续使用原有的中间密钥(第一中间密钥)和第一安全上下文。UE可以重新激活该第一中间密钥和第一安全上下文,此处不做限制。Specifically, when the key identifier from the AMF is the first key identifier, the UE needs to use the key corresponding to the first key identifier, that is, the UE needs to use the first security context and the first intermediate key . The UE can continue to use the original intermediate key (the first intermediate key) and the first security context. The UE may reactivate the first intermediate key and the first security context, which is not limited here.
在另一种实现方法中,UE可以对比第二NAS SMC消息中来自AMF的密钥标识符与当前UE正在使用的中间密钥的密钥标识符是否一样,UE还需要验证第二NAS SMC消息中该密钥标识符对应的安全算法与当前UE正在使用的安全算法是否相同。如果均一样, 并且UE验证NAS SMC的完整性保护是正确的,则UE可以不进行任何操作,继续使用当前的5G NAS安全上下文。即,使用当前的密钥和安全算法,NAS COUNT也不需要重置为0。In another implementation method, the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify the second NAS SMC message. Whether the security algorithm corresponding to the key identifier is the same as the security algorithm currently being used by the UE. If all are the same, and the UE verifies that the integrity protection of the NAS SMC is correct, the UE can continue to use the current 5G NAS security context without performing any operations. That is, with the current key and security algorithm, the NAS COUNT does not need to be reset to 0 either.
在一种实现方法中,UE可以对比第二NAS SMC消息中来自AMF的密钥标识符与当前UE正在使用的中间密钥的密钥标识符是否一样,UE还需要验证第二NAS SMC消息中该来自AMF的密钥标识符对应的安全算法与当前UE正在使用的安全算法是否相同。如果只有后者不同(即密钥标识符一致,安全算法不一致),则UE需要使用ngKSI#1标识的Kausf#1对应的Kamf#1,使用第二NAS SMC消息携带的新的安全算法生成第三安全上下文。该第三安全上下文可以是新的5G NAS安全上下文(对应于第一中间密钥),具体地,生成新的K NAS-int和新的K NASenc,并且NAS COUNT重置为0。UE使用新生成的K NAS-int验证第二NAS SMC消息的完整性保护。可以理解的是,因为第二NAS SMC消息携带的是ngKSI#1,所以只能用ngKSI#1对应的第一中间密钥进行进一步衍生子密钥。所以只需要生成新的NAS密钥就行了。 In an implementation method, the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify that the second NAS SMC message contains the same key identifier. Whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm currently being used by the UE. If only the latter is different (that is, the key identifiers are the same, but the security algorithms are inconsistent), the UE needs to use the Kamf#1 corresponding to the Kausf#1 identified by ngKSI#1, and use the new security algorithm carried in the second NAS SMC message to generate the first Three security contexts. The third security context may be a new 5G NAS security context (corresponding to the first intermediate key), specifically, a new K NAS-int and a new K NASenc are generated, and the NAS COUNT is reset to 0. The UE verifies the integrity protection of the second NAS SMC message using the newly generated K NAS-int . It can be understood that, because the second NAS SMC message carries ngKSI#1, only the first intermediate key corresponding to ngKSI#1 can be used to further derive the subkey. So just generate a new NAS key and that's it.
在另一种实现方法中,UE对第一密钥标识符标识的密钥做激活操作,可以包括以下至少1个步骤:根据密钥标识#1标识的Kausf#1生成,生成Kseaf#1,使用Kseaf#1生成Kamf#1,再使用Kamf#1和第二NAS SMC消息中携带的选择的安全算法生成K NASint#1和K NASenc#1,将K NASint#1、K NASenc#1加密算法和完整性保护算法用于具体的功能,但是NAS COUNT保持不变。 In another implementation method, the UE performs an activation operation on the key identified by the first key identifier, which may include at least one of the following steps: generating Kseaf#1 according to the Kausf#1 identified by the key identifier #1, generating Kseaf#1, Use Kseaf#1 to generate Kamf#1, then use Kamf#1 and the selected security algorithm carried in the second NAS SMC message to generate K NASint#1 and K NASenc#1 , and encrypt the K NASint#1 and K NASenc#1 algorithms and integrity protection algorithms are used for specific functions, but the NAS COUNT remains the same.
在另一种实现方式中,UE只对比第二NAS SMC消息中携带的来自AMF的密钥标识符与当前正在使用的密钥对应的密钥标识符是否一样,如果一样,并且对第二NAS SMC消息的完整性保护校验成功,则不进行任何操作,继续使用当前的5G NAS安全上下文。In another implementation manner, the UE only compares whether the key identifier from the AMF carried in the second NAS SMC message is the same as the key identifier corresponding to the key currently being used. If the integrity protection check of the SMC message is successful, no operation is performed and the current 5G NAS security context continues to be used.
在AMF可以不生成第二密钥标识符的情况下,NAS SMC#2中还携带了第二指示信息时,UE进一步检查是否收到第三指示信息。如果UE收到第三指示信息,则UE只生成新的Kamf(生成Kamf#2),不更新5G NAS和/或5G AS安全上下文。In the case that the AMF may not generate the second key identifier, and the NAS SMC#2 also carries the second indication information, the UE further checks whether the third indication information is received. If the UE receives the third indication information, the UE only generates a new Kamf (generates Kamf#2), and does not update the 5G NAS and/or 5G AS security context.
在标准规定每次Kamf变化都会生成第二密钥标识符的情况下,如果NAS SMC#2中携带第一密钥标识符,则终端设备继续使用第一安全上下文,即只需要生成Kamf#2,不再作其他任何处理。也就是说,终端设备可以继续使用基于Kausf#1生成的5G NAS安全上文和5G AS安全上下文。或者,如果NAS SMC#2中携带第二密钥标识符和第三指示信息,则终端设备只需要生成Kamf#2,不再作其他任何处理。In the case where the standard stipulates that the second key identifier will be generated every time the Kamf changes, if the NAS SMC#2 carries the first key identifier, the terminal device will continue to use the first security context, that is, only the Kamf#2 needs to be generated , and no other processing will be performed. That is to say, the terminal device can continue to use the 5G NAS security context and 5G AS security context generated based on Kausf#1. Alternatively, if the NAS SMC#2 carries the second key identifier and the third indication information, the terminal device only needs to generate Kamf#2, and no other processing is required.
结合第二方面,在第二方面的一种可能的实现方式中,在所述接入和移动性管理功能确定需要激活所述第二安全上下文的情况下,AMF向UE发送NAS SMC#2,NAS SMC#2中还包括第一指示信息。所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;所述第二网元包括以下任一个:网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。With reference to the second aspect, in a possible implementation manner of the second aspect, when the access and mobility management function determines that the second security context needs to be activated, the AMF sends the NAS SMC#2 to the UE, The NAS SMC#2 also includes first indication information. The first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element; the second network element includes Any of the following: Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF.
可选地,该第一指示信息来自AAnf。AAnF向AUSF发送第二密钥请求消息,该第二密钥请求消息携带第一指示信息。AUSF向AMF发送该第一指示信息。AMF向UE发送 该第一指示信息。该第一指示信息与第二网元关联,第一指示信息指示终端设备更新终端设备与第二网元之间的通信密钥。第二网元包括以下任一个但不限于NEF、AAnF、ECS、EES或AF。示例性的,当第二网元为AF时,第一指示信息可以是AF的标识信息(AF_ID)。Optionally, the first indication information comes from AAnf. The AAnF sends a second key request message to the AUSF, where the second key request message carries the first indication information. The AUSF sends the first indication information to the AMF. The AMF sends the first indication information to the UE. The first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element. The second network element includes any of the following but not limited to NEF, AAnF, ECS, EES or AF. Exemplarily, when the second network element is an AF, the first indication information may be identification information (AF_ID) of the AF.
第三方面,本申请实施例提出一种通信装置,包括:In a third aspect, an embodiment of the present application provides a communication device, including:
处理模块,用于生成第二安全上下文,所述第二安全上下文与第一安全上下文不一致,所述第一安全上下文为接入和移动性管理功能当前使用的安全上下文;a processing module, configured to generate a second security context, where the second security context is inconsistent with the first security context, and the first security context is the security context currently used by the access and mobility management function;
所述处理模块,还用于确定是否激活所述第二安全上下文。The processing module is further configured to determine whether to activate the second security context.
在一种可能的实现方式中,In one possible implementation,
收发模块,用于向所述终端设备发送包含第二密钥标识符的第二鉴权请求消息,所述第二鉴权请求消息用于触发所述终端设备和网络之间的第二鉴权;a transceiver module, configured to send a second authentication request message containing a second key identifier to the terminal device, where the second authentication request message is used to trigger a second authentication between the terminal device and the network ;
所述处理模块,还用于在所述第二鉴权成功之后,确定是否需要激活所述第二鉴权过程中生成的第二安全上下文;The processing module is further configured to determine whether the second security context generated in the second authentication process needs to be activated after the second authentication is successful;
所述收发模块,还用于在不需要激活所述第二安全上下文的情况下,向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第一密钥标识符;其中,所述第一密钥标识符为所述接入和移动性管理功能当前使用的所述第一安全上下文的密钥标识符。The transceiver module is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device without activating the second security context, where the second NAS SMC message includes the first NAS SMC message. a key identifier; wherein the first key identifier is the key identifier of the first security context currently used by the access and mobility management function.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于向所述终端设备发送包含所述第一密钥标识符的第一鉴权请求消息,所述第一鉴权请求消息用于触发所述终端设备和网络之间的第一鉴权;The transceiver module is further configured to send a first authentication request message containing the first key identifier to the terminal device, where the first authentication request message is used to trigger the connection between the terminal device and the network the first authentication;
所述收发模块,还用于在所述第一鉴权成功之后,向所述终端设备发送第一NAS SMC消息以激活在所述第一鉴权过程中生成的所述第一安全上下文,所述第一NAS SMC消息包括所述第一密钥标识符。The transceiver module is further configured to, after the first authentication succeeds, send a first NAS SMC message to the terminal device to activate the first security context generated in the first authentication process, so the The first NAS SMC message includes the first key identifier.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于接收来自所述终端设备的注册请求消息。The transceiver module is further configured to receive a registration request message from the terminal device.
在一种可能的实现方式中,In one possible implementation,
所述处理模块,还用于当确定不更新非接入层NAS密钥和/或接入层AS密钥时,确定不激活所述第二安全上下文,The processing module is further configured to determine not to activate the second security context when it is determined not to update the non-access stratum NAS key and/or the access stratum AS key,
或者,or,
所述处理模块,还用于当确定非接入层NAS计数器翻转时,确定激活所述第二安全上下文,The processing module is further configured to determine to activate the second security context when it is determined that the non-access stratum NAS counter rolls over,
或者,or,
所述处理模块,还用于当确定更新所述终端设备的非接入层NAS密钥上下文和/或接入层AS密钥上下文时,确定激活所述第二安全上下文;The processing module is further configured to determine to activate the second security context when it is determined to update the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device;
或者,or,
所述处理模块,还用于当确定所述第二鉴权由第一网元触发,则不激活所述第二安全上下文,所述第一网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算 MEC或应用功能AF;The processing module is further configured to not activate the second security context when it is determined that the second authentication is triggered by a first network element, and the first network element includes any one of the following: an authentication management function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF;
或者,or,
所述处理模块,还用于当确定所述第二鉴权仅需要对所述终端设备进行鉴权,则不激活所述第二安全上下文;The processing module is further configured to not activate the second security context when it is determined that the second authentication only needs to authenticate the terminal device;
或者,or,
所述处理模块,还用于当确定所述第二鉴权由所述终端设备触发,则不激活所述第二安全上下文。The processing module is further configured to not activate the second security context when it is determined that the second authentication is triggered by the terminal device.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于当确定激活所述第二安全上下文后,向所述终端设备发送所述第二密钥标识符。The transceiver module is further configured to send the second key identifier to the terminal device after it is determined that the second security context is activated.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于当确定激活所述第二安全上下文后,向所述终端设备发送第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;The transceiver module is further configured to, after determining to activate the second security context, send first indication information to the terminal device, where the first indication information is associated with the second network element, and the first indication information indicates The terminal device updates the communication key between the terminal device and the second network element;
所述第二网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于当确定激活所述第二安全上下文后,所述接入和移动性管理功能激活第二中间密钥的非接入层NAS密钥,所述第二安全上下文对应所述第二中间密钥;The transceiver module is further configured to activate, by the access and mobility management function, the non-access stratum NAS key of the second intermediate key after determining to activate the second security context, the second security context corresponding to the second intermediate key;
所述接入和移动性管理功能不激活所述第二中间密钥的接入层AS密钥。The access and mobility management function does not activate the access stratum AS key of the second intermediate key.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于接收第一网元发送的第三鉴权请求消息,其中,所述第三鉴权请求消息携带所述终端设备的永久标识信息,所述第三鉴权请求消息用于触发所述终端设备与网络之间的所述第二鉴权;The transceiver module is further configured to receive a third authentication request message sent by the first network element, wherein the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message for triggering the second authentication between the terminal device and the network;
所述第一网元包括以下任一个:AUSF、NEF、AAnF、ECS、EES或AF。The first network element includes any one of the following: AUSF, NEF, AAnF, ECS, EES or AF.
在一种可能的实现方式中,In one possible implementation,
所述处理模块,还用于选择安全算法对所述接入和移动性管理功能向所述终端设备发送的第二NAS SMC消息进行完整性保护和机密性保护;The processing module is further configured to select a security algorithm to perform integrity protection and confidentiality protection on the second NAS SMC message sent by the access and mobility management function to the terminal device;
所述处理模块,还用于当所述接入和移动性管理功能选择的安全算法与所述第一安全上下文对应的安全算法相同,则确定不激活所述第二安全上下文;The processing module is further configured to determine that the second security context is not activated when the security algorithm selected by the access and mobility management function is the same as the security algorithm corresponding to the first security context;
所述收发模块,还用于向所述终端设备发送所述第二NAS SMC消息,所述第二NAS SMC消息包括所述第一密钥标识符。The transceiver module is further configured to send the second NAS SMC message to the terminal device, where the second NAS SMC message includes the first key identifier.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第二指示信息,所述第二指示信息指示所述终端设备生成Kamf#2,并激活Kamf#2对应的所述第二安全上下文,所述Kamf#2为更新的Kamf。The transceiver module is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device, where the second NAS SMC message includes second indication information, and the second indication information indicates the terminal The device generates Kamf#2, and activates the second security context corresponding to Kamf#2, which is the updated Kamf.
在一种可能的实现方式中,In one possible implementation,
所述第二NAS SMC消息还包括第三指示信息,所述第三指示信息指示所述终端设备继续使用所述第一安全上下文中的NAS安全上下文和所述第一安全上下文中的AS安全上下文。The second NAS SMC message further includes third indication information, where the third indication information instructs the terminal device to continue to use the NAS security context in the first security context and the AS security context in the first security context .
在一种可能的实现方式中,In one possible implementation,
所述第二安全上下文包括以下一项或多项:Kseaf#2、Kamf#2、Kaf#2、Kakma#2、K NASint#2、K NASenc#2、K gNB#2、K RRCint#2、K RRCenc#2或者K N3IWF#2The second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, K NASint#2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 or K N3IWF#2 .
第四方面,本申请实施例提出一种通信装置,包括:In a fourth aspect, an embodiment of the present application provides a communication device, including:
收发模块,用于接收来自接入和移动性管理功能AMF的第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息携带来自所述来自AMF的密钥标识符;a transceiver module for receiving a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, where the second NAS SMC message carries the key identifier from the AMF;
处理模块,用于当所述密钥标识符与所述终端设备正在使用的第一安全上下文的第一密钥标识符相同时,确定不激活第二安全上下文,所述第二安全上下文与所述第一安全上下文不一致。A processing module, configured to determine that the second security context is not activated when the key identifier is the same as the first key identifier of the first security context being used by the terminal device, and the second security context is the same as the first security context. The first security context described above is inconsistent.
在一种可能的实现方式中,In one possible implementation,
所述处理模块,还用于确定不激活所述第二安全上下文中的NAS安全上下文和/或所述第二安全上下文中的AS安全上下文。The processing module is further configured to determine not to activate the NAS security context in the second security context and/or the AS security context in the second security context.
在一种可能的实现方式中,In one possible implementation,
所述处理模块,还用于验证所述来自AMF的密钥标识符对应的安全算法,与所述第一安全上下文对应的安全算法是否相同,所述来自AMF的密钥标识符对应的安全算法为所述接入和移动性管理功能选择的安全算法;The processing module is further configured to verify whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the same a security algorithm selected for the access and mobility management function;
所述处理模块,还用于当所述来自AMF的密钥标识符对应的安全算法与所述第一安全上下文对应的安全算法相同,确定不更新第一安全上下文。The processing module is further configured to determine not to update the first security context when the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context.
在一种可能的实现方式中,In one possible implementation,
所述收发模块,还用于接收所述接入和移动性管理功能发送的第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;The transceiver module is further configured to receive first indication information sent by the access and mobility management function, where the first indication information is associated with a second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element;
所述第二网元包括以下任一个:网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
第五方面,本申请实施例提供了一种通信装置,该通信装置可以实现上述第一、第二方面所涉及方法中终端设备、网络设备所执行的功能。该通信装置包括处理器、存储器以及与该处理器连接的接收器和与该处理器连接的发射器;该存储器用于存储程序代码,并将该程序代码传输给该处理器;该处理器用于根据该程序代码中的指令驱动该接收器和该发射器执行如上述第一、二方面该的方法;接收器和发射器分别与该处理器连接,以执行上述各个方面的该的方法中终端设备、网络设备的操作。具体地,发射器可以进行发送的操作,接收器可以进行接收的操作。可选的,该接收器与发射器可以是射频电路,该射频电路通过天线实现接收与发送消息;该接收器与发射器还可以是通信接口,处理器与该通信接口通过总线连接,该处理器通过该通信接口实现接收或发送消息。In a fifth aspect, an embodiment of the present application provides a communication device, which can implement the functions performed by the terminal device and the network device in the methods involved in the first and second aspects above. The communication device includes a processor, a memory, a receiver connected to the processor and a transmitter connected to the processor; the memory is used for storing program codes and transmitting the program codes to the processor; the processor is used for Drive the receiver and the transmitter to execute the methods in the first and second aspects according to the instructions in the program code; the receiver and the transmitter are respectively connected to the processor to execute the methods in the above aspects. Operation of equipment and network equipment. Specifically, the transmitter can perform the operation of sending, and the receiver can perform the operation of receiving. Optionally, the receiver and the transmitter can be a radio frequency circuit, and the radio frequency circuit can receive and send messages through an antenna; the receiver and the transmitter can also be a communication interface, and the processor and the communication interface are connected through a bus, and the processing The server implements receiving or sending messages through this communication interface.
第六方面,本申请实施例提供一种通信装置,该通信装置可以包括网络设备或者芯片等实体,或者,该通信装置可以包括终端设备或者芯片等实体,该通信装置包括:处理器,存储器;该存储器用于存储指令;该处理器用于执行该存储器中的该指令,使得该通信装置执行如前述第一方面或第二方面中任一项该的方法。In a sixth aspect, an embodiment of the present application provides a communication apparatus, where the communication apparatus may include entities such as network equipment or chips, or the communication apparatus may include entities such as terminal equipment or chips, and the communication apparatus includes: a processor and a memory; The memory is used to store instructions; the processor is used to execute the instructions in the memory, so that the communication device performs the method according to any one of the aforementioned first or second aspects.
第七方面,本申请实施例提供了一种存储一个或多个计算机执行指令的计算机可读存储介质,当该计算机执行指令被处理器执行时,该处理器执行如前述第一方面或第二方面中任意一种可能的实现方式。In a seventh aspect, embodiments of the present application provide a computer-readable storage medium that stores one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes the first aspect or the second method described above. Any of the possible implementations of the aspect.
第八方面,本申请实施例提供一种存储一个或多个计算机执行指令的计算机程序产品(或称计算机程序),当该计算机执行指令被该处理器执行时,该处理器执行前述第一方面或第二方面中任意一种可能的实现方式。In an eighth aspect, an embodiment of the present application provides a computer program product (or a computer program) that stores one or more computer-executable instructions, and when the computer-executable instructions are executed by the processor, the processor executes the aforementioned first aspect or any possible implementation manner of the second aspect.
第九方面,本申请提供了一种芯片系统,该芯片系统包括处理器,用于支持计算机设备实现上述方面中所涉及的功能。在一种可能的设计中,该芯片系统还包括存储器,该存储器,用于保存计算机设备必要的程序指令和数据。该芯片系统,可以由芯片构成,也可以包括芯片和其他分立器件。In a ninth aspect, the present application provides a chip system, where the chip system includes a processor for supporting a computer device to implement the functions involved in the above aspects. In a possible design, the chip system further includes a memory for storing necessary program instructions and data of the computer device. The chip system may be composed of chips, or may include chips and other discrete devices.
第十方面,本申请提供了一种通信系统,该通信系统包括如上述第四方面、第五方面中的通信装置。In a tenth aspect, the present application provides a communication system, where the communication system includes the communication apparatus in the fourth and fifth aspects above.
附图说明Description of drawings
图1为一种通信系统的网络架构示意图;1 is a schematic diagram of a network architecture of a communication system;
图2为本申请实施例中通信装置的硬件结构示意图;2 is a schematic diagram of a hardware structure of a communication device in an embodiment of the present application;
图3为UE通过转发的接入流程示意图;3 is a schematic diagram of an access flow of a UE through forwarding;
图4为密钥Kaf的生成流程示意图;Fig. 4 is the generation flow schematic diagram of key Kaf;
图5为本申请实施例涉及的NAS SMC流程示意图;FIG. 5 is a schematic flowchart of the NAS SMC involved in the embodiment of the application;
图6为本申请实施例提出的一种通信方法的流程示意图;6 is a schematic flowchart of a communication method proposed by an embodiment of the present application;
图7为本申请实施例提出的一种应用场景示意图;FIG. 7 is a schematic diagram of an application scenario proposed by an embodiment of the present application;
图8为本申请实施例提出的又一种应用场景示意图;FIG. 8 is a schematic diagram of another application scenario proposed by an embodiment of the present application;
图9为本申请实施例提出的又一种应用场景示意图;FIG. 9 is a schematic diagram of another application scenario proposed by an embodiment of the present application;
图10为本申请实施例中通信装置的一种实施例示意图;FIG. 10 is a schematic diagram of an embodiment of a communication device in an embodiment of the present application;
图11为本申请实施例中通信装置的一种实施例示意图。FIG. 11 is a schematic diagram of an embodiment of a communication apparatus in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。本申请的说明书和权利要求书及上述附图中的术语“第一”、第二”以及相应术语标号等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. The terms "first", second" and the corresponding term labels in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that The terms used in this way can be interchanged under appropriate circumstances, and this is only a way of distinguishing objects with the same attributes in the description of the embodiments of the present application. In addition, the terms "include" and "have" and any of them Variations, intended to cover non-exclusive inclusion, such that a process, method, system, product or device comprising a series of units is not necessarily limited to those units, but may include or are not expressly listed for such process, method, product or device inherent other units.
在本申请的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本申请中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,在本申请的描述中,“至少一项”是指一项或者多项,“多项”是指两项或两项以上。“以下至少一项(个)”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a,b,或c中的至少一项(个),可以表示:a,b,c,a-b,a-c,b-c,或a-b-c,其中a,b,c可以是单个,也可以是多个。In the description of this application, unless otherwise stated, "/" means or means, for example, A/B can mean A or B; "and/or" in this application is only an association relationship that describes an associated object , which means that there can be three kinds of relationships, for example, A and/or B, which can mean that A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the present application, "at least one item" refers to one or more items, and "multiple items" refers to two or more items. "At least one item(s) below" or similar expressions thereof refer to any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one item (a) of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, c may be single or multiple .
本申请实施例的技术方案可以应用于各种通信系统,例如:宽带码分多址(Wideband Code Division Multiple Access,WCDMA)系统,通用分组无线业务(general packet radio service,GPRS),长期演进(Long Term Evolution,LTE)系统,LTE频分双工(frequency division duplex,FDD)系统,LTE时分双工(time division duplex,TDD),通用移动通信系统(universal mobile telecommunication system,UMTS),全球互联微波接入(worldwide interoperability for microwave access,WiMAX)通信系统,第五代(5th generation,5G)系统或NR以及未来的第六代通信系统等。The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: Wideband Code Division Multiple Access (WCDMA) system, general packet radio service (GPRS), Long Term Evolution (Long Term Evolution (LTE) system, LTE frequency division duplex (FDD) system, LTE time division duplex (TDD), universal mobile telecommunication system (UMTS), global interconnection microwave connection The world wide interoperability for microwave access (WiMAX) communication system, the fifth generation (5th generation, 5G) system or NR and the future sixth generation communication system, etc.
各种通信系统中由运营者运营的部分可称为运营商网络。运营商网络也可称为公用陆地移动网(public land mobile network,PLMN)网络,是由政府或政府所批准的经营者,以为公众提供陆地移动通信业务为目的而建立和经营的网络,主要是移动网络运营商(mobile network operator,MNO)为用户提供移动宽带接入服务的公共网络。本申请实施例中所描述的运营商网络或PLMN网络,可以为符合第三代合作伙伴项目(3rd generation partnership project,3GPP)标准要求的网络,简称3GPP网络。通常3GPP网络由运营商来运营,包括但不限于第五代移动通信(5th-generation,5G)网络(简称5G网络),第四代移动通信(4th-generation,4G)网络(简称4G网络)或第三代移动通信技术(3rd-generation,3G)网络(简称3G网络)。还包括未来的6G网络。为了方便描述,本申请实施例中将以运营商网络(如移动网络运营商(mobile network operator,MNO)网络)为例进行说明。The part of various communication systems that is operated by an operator may be referred to as an operator network. The operator network, also known as the public land mobile network (PLMN) network, is a network established and operated by the government or government-approved operators for the purpose of providing land mobile communication services to the public. A mobile network operator (MNO) is a public network that provides users with mobile broadband access services. The operator network or PLMN network described in the embodiments of this application may be a network that meets the requirements of the 3rd generation partnership project (3rd generation partnership project, 3GPP) standard, which is referred to as a 3GPP network for short. Usually 3GPP networks are operated by operators, including but not limited to fifth-generation (5th-generation, 5G) networks (referred to as 5G networks), fourth-generation (4th-generation, 4G) networks (referred to as 4G networks) Or the third-generation mobile communication technology (3rd-generation, 3G) network (referred to as 3G network). Also includes future 6G networks. For the convenience of description, an operator network (such as a mobile network operator (mobile network operator, MNO) network) will be used as an example for description in this embodiment of the present application.
为了便于理解本申请实施例,以图1所示的5G网络架构为例对本申请使用的应用场景进行说明,可以理解的是对其他通信网络与5G网络架构相似,因此不做赘述。请参阅图1,图1为一种通信系统的网络架构示意图,所述网络架构中可以包括:终端设备(也可以称为用户设备部分,运营商网络部分和数据网络(data network,DN)部分。In order to facilitate the understanding of the embodiments of the present application, the 5G network architecture shown in FIG. 1 is taken as an example to describe the application scenarios used in the present application. It can be understood that other communication networks are similar to the 5G network architecture, and therefore will not be repeated. Please refer to FIG. 1. FIG. 1 is a schematic diagram of a network architecture of a communication system. The network architecture may include: a terminal device (also referred to as a user equipment part, an operator network part, and a data network (DN) part) .
终端设备部分包括终端设备110,终端设备110也可以称为用户设备(user equipment,UE)。本申请实施例中所涉及的终端设备110作为一种具有无线收发功能的设备,可以经(无线)接入网((radio)access network,(R)AN)140中的接入网设备与一个或多个核心网(core network,CN)进行通信。终端设备110也可称为接入终端,终端,用户单元,用户站,移动站,移动台,远方站,远程终端,移动设备,用户终端,无线网络设备,用户代理或用户装置等。终端设备110可以部署在陆地上,包括室内或室外,手持或车载;也可以部署在水面上(如轮船等);还可以部署在空中(例如飞机,气球和卫星上等)。终端设备110可以是蜂窝电话(cellular phone),无绳电话,会话启动协议(session initiation protocol,SIP)电话,智能电话(smart phone),手机(mobile phone),无线本地环路(wireless local  loop,WLL)站,个人数字处理(personal digital assistant,PDA),可以是具有无线通信功能的手持设备,计算设备或连接到无线调制解调器的其它设备,车载设备,可穿戴设备,无人机设备或物联网,车联网中的终端,第五代移动通信(fifth generation,5G)网络以及未来网络中的任意形态的终端,中继用户设备或者未来演进的公用陆地移动通信网络(public land mobile network,PLMN)中的终端等,其中,中继用户设备例如可以是5G家庭网关(residential gateway,RG)。例如终端设备110可以是虚拟现实(virtual reality,VR)终端,增强现实(augmented reality,AR)终端,工业控制(industrial control)中的无线终端,无人驾驶(self driving)中的无线终端,远程医疗(remote medical)中的无线终端,智能电网(smart grid)中的无线终端,运输安全(transportation safety)中的无线终端,智慧城市(smart city)中的无线终端,智慧家庭(smart home)中的无线终端等。本申请实施例对此并不限定。为方便说明,本申请实施例中以终端设备110包括无人机和无人机遥控器为例进行说明。The terminal equipment part includes a terminal equipment 110, and the terminal equipment 110 may also be referred to as user equipment (user equipment, UE). The terminal device 110 involved in the embodiments of the present application, as a device with a wireless transceiver function, can communicate with a device in the (radio) access network ((R)AN) 140 through the access network device in the (R)AN) 140 . or multiple core networks (core networks, CN) to communicate. Terminal equipment 110 may also be referred to as an access terminal, terminal, subscriber unit, subscriber station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless network device, user agent or user device, and the like. The terminal device 110 can be deployed on land, including indoor or outdoor, hand-held or vehicle-mounted; can also be deployed on water (such as ships, etc.); and can also be deployed in the air (such as planes, balloons, satellites, etc.). The terminal device 110 may be a cellular phone (cellular phone), a cordless phone, a session initiation protocol (SIP) phone, a smart phone (smart phone), a mobile phone (mobile phone), a wireless local loop (WLL) ) station, a personal digital assistant (PDA), which can be a handheld device with wireless communication capabilities, a computing device or other device connected to a wireless modem, an in-vehicle device, a wearable device, a drone device, or the Internet of Things, The terminal in the Internet of Vehicles, the fifth generation (5G) network and any form of terminal in the future network, the relay user equipment or the public land mobile network (PLMN) evolved in the future. The terminal, etc., where the relay user equipment may be, for example, a 5G residential gateway (RG). For example, the terminal device 110 may be a virtual reality (VR) terminal, an augmented reality (AR) terminal, a wireless terminal in industrial control (industrial control), a wireless terminal in self driving, remote Wireless terminal in medical (remote medical), wireless terminal in smart grid (smart grid), wireless terminal in transportation safety, wireless terminal in smart city, wireless terminal in smart home (smart home) wireless terminals, etc. This embodiment of the present application does not limit this. For the convenience of description, in the embodiments of the present application, the terminal device 110 includes an unmanned aerial vehicle and an unmanned aerial vehicle remote controller as an example for description.
需要说明的是,本申请实施例中涉及的无人机还可以包括:可以自主进行行驶的车辆(vehicle),或基于遥控器的控制指令进行行驶的车辆;可以自主进行航行的船舶(shipping),或基于遥控器的控制指令进行航行的船舶等。It should be noted that the drones involved in the embodiments of the present application may also include: a vehicle that can travel autonomously, or a vehicle that travels based on the control instructions of a remote controller; a ship that can travel autonomously , or ships sailing based on the control commands of the remote control.
运营商网络可以包括统一数据管理(unified data management,UDM)134,鉴权管理功能(authentication server function,AUSF)136,接入和移动性管理功能(access and mobility management function,AMF)137,会话管理功能(session management function,SMF)138,用户面功能(user plane function,UPF)139以及(R)AN140等。上述运营商网络中,除(R)AN140部分之外的其他部分可以称为核心网络(core network,CN)部分或核心网部分。为方便说明,本申请实施例中以(R)AN 140为RAN为例进行说明。The operator network may include unified data management (UDM) 134, authentication server function (AUSF) 136, access and mobility management function (AMF) 137, session management Function (session management function, SMF) 138, user plane function (user plane function, UPF) 139 and (R)AN 140 and so on. In the above-mentioned operator network, other parts other than the (R)AN 140 part may be referred to as a core network (core network, CN) part or a core network part. For convenience of description, in the embodiments of the present application, the (R)AN 140 is used as an RAN as an example for description.
数据网络DN 120,也可以称为协议数据网络(protocol data network,PDN),通常是位于运营商网络之外的网络,例如第三方网络。运营商网络可以接入多个数据网络DN 120,数据网络DN 120上可部署多种业务,可为终端设备110提供数据和/或语音等服务。例如,数据网络DN 120可以是某智能工厂的私有网络,智能工厂安装在车间的传感器可以是终端设备110,数据网络DN 120中部署了传感器的控制服务器,控制服务器可为传感器提供服务。传感器可与控制服务器通信,获取控制服务器的指令,基于指令将采集的传感器数据传送给控制服务器等。又例如,数据网络DN 120可以是某公司的内部办公网络,该公司员工的手机或者电脑可为终端设备110,员工的手机或者电脑可以访问公司内部办公网络上的信息,数据资源等。The data network DN 120, which may also be referred to as a protocol data network (PDN), is usually a network outside the operator's network, such as a third-party network. The operator network can access multiple data networks DN 120, and multiple services can be deployed on the data network DN 120, which can provide services such as data and/or voice for the terminal device 110. For example, the data network DN 120 can be a private network of a smart factory, the sensors installed in the workshop of the smart factory can be terminal devices 110, and the control server of the sensor is deployed in the data network DN 120, and the control server can provide services for the sensor. The sensor can communicate with the control server, obtain instructions from the control server, and transmit the collected sensor data to the control server based on the instructions. For another example, the data network DN 120 can be an internal office network of a company, and the mobile phones or computers of employees of the company can be terminal devices 110, and the mobile phones or computers of employees can access information, data resources, etc. on the internal office network of the company.
终端设备110可通过运营商网络提供的接口(例如N1等)与运营商网络建立连接,使用运营商网络提供的数据和/或语音等服务。终端设备110还可通过运营商网络访问数据网络DN 120,使用数据网络DN 120上部署的运营商业务,和/或第三方提供的业务。其中,上述第三方可为运营商网络和终端设备110之外的服务方,可为终端设备110提供其他数据和/或语音等服务。其中,上述第三方的具体表现形式,具体可基于实际应用场景确定,在此不做限制。The terminal device 110 may establish a connection with the operator's network through an interface (eg, N1, etc.) provided by the operator's network, and use services such as data and/or voice provided by the operator's network. The terminal device 110 can also access the data network DN 120 through the operator network, and use the operator services deployed on the data network DN 120, and/or services provided by third parties. The above-mentioned third party may be a service provider other than the operator network and the terminal device 110 , and may provide other data and/or voice services for the terminal device 110 . The specific expression form of the above third party can be specifically determined based on the actual application scenario, which is not limited here.
下面对运营商网络中的网络功能进行简要介绍。The following briefly introduces the network functions in the operator's network.
(R)AN 140可以看作是运营商网络的子网络,是运营商网络中业务节点与终端设备110之间的实施系统。终端设备110要接入运营商网络,首先是经过(R)AN 140,进而可通过(R)AN 140与运营商网络的业务节点连接。本申请实施例中的接入网设备(RAN设备),是一种为终端设备110提供无线通信功能的设备,也可以称为网络设备,RAN设备包括但不限于:5G系统中的下一代基站节点(next generation node base station,gNB),长期演进(long term evolution,LTE)中的演进型节点B(evolved node B,eNB),无线网络控制器(radio network controller,RNC),节点B(node B,NB),基站控制器(base station controller,BSC),基站收发台(base transceiver station,BTS),家庭基站(例如,home evolved nodeB,或home node B,HNB),基带单元(base band unit,BBU),传输点(transmitting and receiving point,TRP),发射点(transmitting point,TP),小基站设备(pico),移动交换中心,或者未来网络中的网络设备等。采用不同无线接入技术的系统中,具备接入网设备功能的设备的名称可能会有所不同。为方便描述,本申请所有实施例中,上述为终端设备110提供无线通信功能的装置统称为接入网设备或简称为RAN或AN。应理解,本文对接入网设备的具体类型不作限定。The (R)AN 140 can be regarded as a sub-network of the operator's network, and is an implementation system between the service node and the terminal device 110 in the operator's network. To access the operator network, the terminal device 110 first passes through the (R)AN 140, and then can be connected to the service node of the operator network through the (R)AN 140. The access network device (RAN device) in this embodiment of the application is a device that provides wireless communication functions for the terminal device 110, and may also be referred to as a network device. The RAN device includes but is not limited to: next-generation base stations in the 5G system Node (next generation node base station, gNB), evolved node B (evolved node B, eNB) in long term evolution (long term evolution, LTE), radio network controller (radio network controller, RNC), node B (node B) B, NB), base station controller (BSC), base transceiver station (base transceiver station, BTS), home base station (for example, home evolved nodeB, or home node B, HNB), base band unit (base band unit) , BBU), transmission point (transmitting and receiving point, TRP), transmitting point (transmitting point, TP), small base station equipment (pico), mobile switching center, or network equipment in future networks, etc. In systems using different wireless access technologies, the names of devices with access network device functions may be different. For the convenience of description, in all the embodiments of this application, the above-mentioned apparatuses for providing wireless communication functions for the terminal device 110 are collectively referred to as access network devices or simply referred to as RAN or AN. It should be understood that the specific type of the access network device is not limited herein.
接入和移动性管理功能AMF(也可以称为AMF网元,AMF网络功能或AMF网络功能实体)137是由运营商网络提供的控制面网络功能,负责终端设备110接入运营商网络的接入控制和移动性管理,例如包括移动状态管理,分配用户临时身份标识,认证和授权用户等功能。The Access and Mobility Management Function AMF (also referred to as AMF network element, AMF network function or AMF network function entity) 137 is a control plane network function provided by the operator's network and is responsible for the connection of the terminal device 110 to the operator's network. Access control and mobility management, including functions such as mobility status management, assigning user temporary identities, authenticating and authorizing users.
会话管理功能SMF(也可以称为SMF网元,SMF网络功能或SMF网络功能实体)138是由运营商网络提供的控制面网络功能,负责管理终端设备110的协议数据单元(protocol data unit,PDU)会话。PDU会话是一个用于传输PDU的通道,终端设备需要通过PDU会话与数据网络DN 120互相传送PDU。PDU会话由SMF网络功能138负责建立,维护和删除等。SMF网络功能138包括会话管理(如会话建立,修改和释放,包含用户面功能UPF 139和(R)AN 140之间的隧道维护),UPF网络功能139的选择和控制,业务和会话连续性(service and session continuity,SSC)模式选择,漫游等会话相关的功能。The session management function SMF (also referred to as SMF network element, SMF network function or SMF network function entity) 138 is a control plane network function provided by the operator network, responsible for managing the protocol data unit (PDU) of the terminal device 110 ) session. The PDU session is a channel for transmitting PDUs, and the terminal device needs to transfer PDUs to and from the data network DN 120 through the PDU session. The PDU session is established, maintained and deleted by the SMF network function 138. SMF network functions 138 include session management (eg session establishment, modification and release, including tunnel maintenance between user plane functions UPF 139 and (R)AN 140), selection and control of UPF network functions 139, service and session continuity ( Service and session continuity, SSC) mode selection, roaming and other session-related functions.
用户面功能UPF(也可以称为UPF网元,UPF网络功能或UPF网络功能实体)139是由运营商提供的网关,是运营商网络与数据网络DN 120通信的网关。UPF网络功能139包括数据包路由和传输,数据包检测,业务用量上报,服务质量(quality of service,QoS)处理,合法监听,上行数据包检测,下行数据包存储等用户面相关的功能。The user plane function UPF (may also be referred to as UPF network element, UPF network function or UPF network function entity) 139 is a gateway provided by the operator, and is a gateway for the operator network to communicate with the data network DN 120. The UPF network function 139 includes user plane-related functions such as data packet routing and transmission, data packet detection, service usage reporting, quality of service (QoS) processing, legal interception, uplink data packet detection, and downlink data packet storage.
统一数据管理网元UDM(也可以称为UDM网元,UDM网络功能或UDM网络功能实体)134是由运营商提供的控制面功能,负责存储运营商网络中签约用户的永久身份标识(subscriber permanent identifier,SUPI),签约用户的公开使用的签约标识(generic public subscription identifier,GPSI),信任状(credential)等信息。其中SUPI在传输过程中会先进行加密,加密后的SUPI被称为隐藏的用户签约标识符(subscription concealed identifier,SUCI)。UDM 134所存储的这些信息可用于终端设备110接入运营商网络的认证和授权。其中,上述运营商网络的签约用户具体可为使用运营商网络提供的业务的用户,例如使用“中国电信”的手机芯卡的用户,或者使用“中国移动”的手机芯卡的用户等。上述签约 用户的信任状可以是:该手机芯卡存储的长期密钥或者跟该手机芯卡加密相关的信息等存储的小文件,用于认证和/或授权。需要说明的是,永久标识符,信任状,安全上下文,认证数据(cookie),以及令牌等同验证/认证,授权相关的信息,在本申请实施例中,为了描述方便起见不做区分限制。The unified data management network element UDM (also referred to as UDM network element, UDM network function or UDM network function entity) 134 is a control plane function provided by the operator, and is responsible for storing the permanent identity (subscriber permanent identity) of the subscriber in the operator's network. identifier, SUPI), the publicly used subscription identifier (generic public subscription identifier, GPSI) of the contracting user, credential (credential) and other information. The SUPI will be encrypted first in the transmission process, and the encrypted SUPI is called a hidden user subscription identifier (SUCI). This information stored by UDM 134 can be used for authentication and authorization of terminal device 110 to access the operator's network. The above-mentioned subscribers of the operator's network may specifically be users who use the services provided by the operator's network, such as users using "China Telecom" mobile phone SIM cards, or users using "China Mobile" mobile phone SIM cards, etc. The above-mentioned credential of the signing user may be: a long-term key stored in the mobile phone core card or a small file stored with information related to encryption of the mobile phone core card, etc., 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 are not differentiated and limited in the embodiments of the present application for convenience of description.
鉴权管理功能(authentication server function,AUSF)(也可以称为AUSF网元、AUSF网络功能或AUSF网络功能实体)136是由运营商提供的控制面功能,通常用于主认证,即终端设备110(签约用户)与运营商网络之间的认证。AUSF 136接收到签约用户发起的认证请求之后,可通过UDM网络功能134中存储的认证信息和/或授权信息对签约用户进行认证和/或授权,或者通过UDM网络功能134生成签约用户的认证和/或授权信息。AUSF网络功能136可向签约用户反馈认证信息和/或授权信息。在认证和密钥管理(Authentication and key management for Application,AKMA)场景中,会为认证和密钥管理锚点功能(Authentication and key management for Application(AKMA)Anchor Function,AAnF)130生成AKMA锚点密钥Kakma(该秘钥管理密钥也称为AKMA中间密钥),并且负责为应用功能(application Function,AF)135生成AF 135使用的密钥Kaf和Kaf的有效时间。The authentication management function (authentication server function, AUSF) (also referred to as AUSF network element, AUSF network function or AUSF network function entity) 136 is a control plane function provided by the operator, usually used for main authentication, that is, the terminal device 110 Authentication between the (subscriber) and the operator network. After the AUSF 136 receives the authentication request initiated by the subscribed user, it can authenticate and/or authorize the subscribed user through the authentication information and/or authorization information stored in the UDM network function 134, or generate the authentication and/or authorization of the subscribed user through the UDM network function 134. / or authorization information. The AUSF network function 136 may feed back authentication information and/or authorization information to the subscriber. In an Authentication and Key Management for Application (AKMA) scenario, an AKMA Anchor Key is generated for the Authentication and Key Management for Application (AKMA) Anchor Function, AAnF) 130 The key Kakma (this key management key is also called the AKMA intermediate key), and is responsible for generating the key Kaf and the validity time of Kaf used by the AF 135 for the application function (AF) 135.
网络开放功能(Network Exposure Function,NEF)131,做为中间网元为外部应用功能(application Function,AF)135和核心网内部的认证和密钥管理锚点功能(Authentication and key management for Application(AKMA)Anchor Function,AAnF)130提供交互服务。The Network Exposure Function (NEF) 131 acts as an intermediate network element for the external application function (application Function, AF) 135 and the authentication and key management for Application (AKMA) anchor function within the core network. )Anchor Function, AAnF) 130 provides interactive services.
网络存储功能(Network Repository Function,NRF)132,用于进行网络功能(Network Function,NF)登记、管理,或状态检测,实现所有NF的自动化管理,每个NF启动时,必须要到NRF进行注册登记才能提供服务,登记信息包括NF类型、地址,或服务列表等。The Network Repository Function (NRF) 132 is used for network function (Network Function, NF) registration, management, or state detection, and realizes the automatic management of all NFs. When each NF starts, it must register with the NRF. Only registration can provide services, and registration information includes NF type, address, or service list.
策略控制实体(policy control function,PCF)133,PCF 133与AF 135交互获得服务质量(Quality of Service,Qos)参数,或者提供QoS参数给AF 135,进而实现一种可以影响应用程序数据传输的作用。Policy control function (PCF) 133, PCF 133 interacts with AF 135 to obtain quality of service (Quality of Service, QoS) parameters, or provides QoS parameters to AF 135, thereby realizing a function that can affect application data transmission .
应用功能AF 135,AF 135与第三代合作伙伴计划(3rd Generation Partnership Project,3GPP)核心网交互用于提供应用层服务。比如:提供关于应用层数据路由,提供接入网络能力。AF 135可以与NEF 131交互,可以与PCF 133交互。在认证和密钥管理(Authentication and key management for Application,AKMA)场景中,AF135需要与AAnF 130交互,获得AF中间密钥(Kaf)和Kaf的有效时间。AF 135的位置可以在5G核心网内部,也可以在5G核心网外部。如果AF在5G核心网内部,那么他可以直接与PCF 133交互。如果AF 135在5G核心网外部,则NEF 131作为中间节点转发AF 135与PCF 133的交互内容。比如通过NEF转发。The application function AF 135 interacts with the 3rd Generation Partnership Project (3GPP) core network to provide application layer services. For example: provide data routing on the application layer and provide the ability to access the network. AF 135 can interact with NEF 131 and can interact with PCF 133. In the authentication and key management for Application (AKMA) scenario, the AF135 needs to interact with the AAnF 130 to obtain the AF intermediate key (Kaf) and the valid time of the Kaf. The location of AF 135 can be inside the 5G core network or outside the 5G core network. If the AF is inside the 5G core network, it can directly interact with the PCF 133. If the AF 135 is outside the 5G core network, the NEF 131 acts as an intermediate node to forward the interactive content between the AF 135 and the PCF 133. Such as forwarding through NEF.
认证和密钥管理AKMA锚点功能AAnF 130,AAnF 130会跟AUSF 136交互获得AKMA中间密钥(Kakma),并且负责为AF 135生成AF 135使用的密钥Kaf和Kaf的有效时间。Authentication and key management AKMA anchor function AAnF 130, AAnF 130 will interact with AUSF 136 to obtain the AKMA intermediate key (Kakma), and is responsible for generating the valid time of the key Kaf and Kaf used by AF 135 for AF 135.
图1中Nausf、Nudm、Namf、Nsmf、Nnrf、Nnef、Naanf、Naf、N1、N2、N3、N4,以及N6为接口序列号。这些接口序列号的含义可参见3GPP标准协议中定义的含义,在此不做赘述。需要说明的是,图1中仅以终端设备110为UE作出了示例性说明,图1中的 各个网络功能之间的接口名称也仅仅是一个示例,在具体实现中,该系统架构的接口名称还可能为其他名称,本申请实施例对此不做具体限定。In Figure 1, Nausf, Nudm, Namf, Nsmf, Nnrf, Nnef, Naanf, Naf, N1, N2, N3, N4, and N6 are interface serial numbers. For the meanings of these interface serial numbers, refer to the meanings defined in the 3GPP standard protocol, which will not be repeated here. It should be noted that, in FIG. 1, only the terminal device 110 is used as an example for the UE, and the interface names between various network functions in FIG. 1 are only an example. In the specific implementation, the interface names of the system architecture Other names may also be used, which are not specifically limited in this embodiment of the present application.
为方便说明,本申请实施例中以移动性管理网络功能为AMF网络功能137为例进行说明。它也可以是未来通信系统中的具有上述AMF网络功能137的其他网络功能。或者,本申请中的移动性管理网络功能还可以是LTE中的移动管理网元(Mobility Management Entity,MME)等。进一步地,将AMF网络功能137简称为AMF,将终端设备110称为UE,将即本申请实施例中后文所描述的AMF均可替换为移动性管理网络功能,UE均可替换为终端设备。For convenience of description, in this embodiment of the present application, the mobility management network function is the AMF network function 137 as an example for description. It may also be other network functions with the above-mentioned AMF network function 137 in the future communication system. Alternatively, the mobility management network function in this application may also be a mobility management network element (Mobility Management Entity, MME) in LTE, or the like. Further, the AMF network function 137 is referred to as AMF for short, and the terminal device 110 is referred to as UE, that is, the AMF described later in the embodiments of the present application can be replaced by a mobility management network function, and the UE can be replaced by a terminal device. .
本申请提供的一种密钥标识的生成方法可以应用于各类通信系统中,例如,可以是物联网(internet of things,IoT)、窄带物联网(narrow band internet of things,NB-IoT)、长期演进(long term evolution,LTE),也可以是第五代(5G)通信系统,还可以是LTE与5G混合架构、也可以是5G新无线(new radio,NR)系统以及未来通信发展中出现的新的通信系统等。本申请的5G通信系统可以包括非独立组网(non-standalone,NSA)的5G通信系统、独立组网(standalone,SA)的5G通信系统中的至少一种。通信系统还可以是公共陆地移动网络(public land mobile network,PLMN)网络、设备到设备(device-to-device,D2D)网络、机器到机器(machine to machine,M2M)网络或者其他网络。A method for generating a key identifier provided by this application can be applied to various communication systems, for example, it can be the Internet of Things (Internet of Things, IoT), the narrowband Internet of Things (NB-IoT), Long term evolution (LTE), it can also be the fifth generation (5G) communication system, it can also be a hybrid architecture of LTE and 5G, it can also be a 5G new radio (NR) system and it will appear in the future communication development. new communication systems, etc. The 5G communication system of the present application may include at least one of a non-standalone (NSA) 5G communication system and an independent (standalone, SA) 5G communication system. The communication system may also be a public land mobile network (PLMN) network, a device-to-device (D2D) network, a machine-to-machine (M2M) network, or other networks.
此外,本申请实施例还可以适用于面向未来的其他通信技术,例如6G等。本申请描述的网络架构以及业务场景是为了更加清楚的说明本申请的技术方案,并不构成对本申请提供的技术方案的限定,本领域普通技术人员可知,随着网络架构的演变和新业务场景的出现,本申请涉及的各个网络功能可能发生变更,本申请提供的技术方案对于类似的技术问题,同样适用。In addition, the embodiments of the present application may also be applicable to other future-oriented communication technologies, such as 6G and the like. The network architecture and service scenarios described in this application are for the purpose of illustrating the technical solutions of this application more clearly, and do not constitute a limitation on the technical solutions provided by this application. The appearance of each network function involved in this application may be changed, and the technical solutions provided in this application are also applicable to similar technical problems.
图2为本申请实施例中通信装置的硬件结构示意图。该通信装置可以是本申请实施例中网络设备或终端设备的一种可能的实现方式。如图2所示,通信装置至少包括处理器204,存储器203,和收发器202,存储器203进一步用于存储指令2031和数据2032。可选的,该通信装置还可以包括天线206,I/O(输入/输出,Input/Output)接口210和总线212。收发器202进一步包括发射器2021和接收器2022。此外,处理器204,收发器202,存储器203和I/O接口210通过总线212彼此通信连接,天线206与收发器202相连。FIG. 2 is a schematic diagram of a hardware structure of a communication device according to an embodiment of the present application. The communication apparatus may be a possible implementation manner of the network device or the terminal device in the embodiment of the present application. As shown in FIG. 2 , the communication apparatus includes at least a processor 204 , a memory 203 , and a transceiver 202 , and the memory 203 is further configured to store instructions 2031 and data 2032 . Optionally, the communication device may further include an antenna 206 , an I/O (input/output, Input/Output) interface 210 and a bus 212 . The transceiver 202 further includes a transmitter 2021 and a receiver 2022. In addition, the processor 204 , the transceiver 202 , the memory 203 and the I/O interface 210 are communicatively connected to each other through the bus 212 , and the antenna 206 is connected to the transceiver 202 .
处理器204可以是通用处理器,例如但不限于,中央处理器(Central Processing Unit,CPU),也可以是专用处理器,例如但不限于,数字信号处理器(Digital Signal Processor,DSP),应用专用集成电路(Application Specific Integrated Circuit,ASIC)和现场可编程门阵列(Field Programmable Gate Array,FPGA)等。该处理器204还可以是神经网络处理单元(neural processing unit,NPU)。此外,处理器204还可以是多个处理器的组合。特别的,在本申请实施例提供的技术方案中,处理器204可以用于执行,后续方法实施例中密钥标识的生成方法的相关步骤。处理器204可以是专门设计用于执行上述步骤和/或操作的处理器,也可以是通过读取并执行存储器203中存储的指令2031来执行上述步骤和/或操作的处理器,处理器204在执行上述步骤和/或操作的过程中可能需要用到数据2032。The processor 204 can be a general-purpose processor, such as, but not limited to, a central processing unit (Central Processing Unit, CPU), or can be a special-purpose processor, such as, but not limited to, a digital signal processor (Digital Signal Processor, DSP), application Application Specific Integrated Circuit (ASIC) and Field Programmable Gate Array (FPGA), etc. The processor 204 may also be a neural network processing unit (NPU). Furthermore, the processor 204 may also be a combination of multiple processors. In particular, in the technical solutions provided in the embodiments of the present application, the processor 204 may be configured to execute the relevant steps of the method for generating the key identifier in the subsequent method embodiments. The processor 204 may be a processor specially designed to perform the above steps and/or operations, or may be a processor that performs the above steps and/or operations by reading and executing the instructions 2031 stored in the memory 203, the processor 204 Data 2032 may be required in performing the steps and/or operations described above.
收发器202包括发射器2021和接收器2022,在一种可选的实现方式中,发射器2021 用于通过天线206发送信号。接收器2022用于通过天线206之中的至少一根天线接收信号。特别的,在本申请实施例提供的技术方案中,发射器2021具体可以用于通过天线206之中的至少一根天线执行,例如,后续方法实施例中密钥标识的生成方法应用于网络设备或终端设备时,网络设备或终端设备中接收模块或发送模块所执行的操作。The transceiver 202 includes a transmitter 2021 and a receiver 2022 . In an optional implementation, the transmitter 2021 is used to transmit signals through the antenna 206 . The receiver 2022 is used to receive signals through at least one of the antennas 206 . In particular, in the technical solutions provided by the embodiments of the present application, the transmitter 2021 may be specifically configured to be executed by at least one antenna among the antennas 206. For example, the method for generating the key identifier in the subsequent method embodiments is applied to a network device or terminal device, the operation performed by the receiving module or the sending module in the network device or terminal device.
在本申请实施例中,收发器202用于支持通信装置执行前述的接收功能和发送功能。将具有处理功能的处理器视为处理器204。接收器2022也可以称为输入口、接收电路等,发射器2021可以称为发射器或者发射电路等。In this embodiment of the present application, the transceiver 202 is configured to support the communication device to perform the aforementioned receiving function and sending function. A processor with processing capabilities is considered processor 204 . The receiver 2022 may also be called an input port, a receiving circuit, and the like, and the transmitter 2021 may be called a transmitter or a transmitting circuit, and the like.
处理器204可用于执行该存储器203存储的指令,以控制收发器202接收消息和/或发送消息,完成本申请方法实施例中通信装置的功能。作为一种实现方式,收发器202的功能可以考虑通过收发电路或者收发的专用芯片实现。本申请实施例中,收发器202接收消息可以理解为收发器202输入消息,收发器202发送消息可以理解为收发器202输出消息。The processor 204 may be configured to execute the instructions stored in the memory 203 to control the transceiver 202 to receive messages and/or send messages, so as to complete the function of the communication device in the method embodiment of the present application. As an implementation manner, the function of the transceiver 202 may be implemented by a transceiver circuit or a dedicated chip for transceiver. In this embodiment of the present application, receiving a message by the transceiver 202 may be understood as an input message by the transceiver 202 , and sending a message by the transceiver 202 may be understood as an output message by the transceiver 202 .
存储器203可以是各种类型的存储介质,例如随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),非易失性RAM(Non-Volatile RAM,NVRAM),可编程ROM(Programmable ROM,PROM),可擦除PROM(Erasable PROM,EPROM),电可擦除PROM(Electrically Erasable PROM,EEPROM),闪存,光存储器和寄存器等。存储器203具体用于存储指令2031和数据2032,处理器204可以通过读取并执行存储器203中存储的指令2031,来执行本申请方法实施例中所述的步骤和/或操作,在执行本申请方法实施例中操作和/或步骤的过程中可能需要用到数据2032。The memory 203 may be various types of storage media, such as random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), non-volatile RAM (Non-Volatile RAM, NVRAM), and Programmable ROM (Programmable ROM, PROM), Erasable PROM (Erasable PROM, EPROM), Electrically Erasable PROM (Electrically Erasable PROM, EEPROM), Flash memory, optical memory and registers, etc. The memory 203 is specifically used to store the instructions 2031 and the data 2032, and the processor 204 can perform the steps and/or operations described in the method embodiments of the present application by reading and executing the instructions 2031 stored in the memory 203. Data 2032 may be required during the operations and/or steps of a method embodiment.
可选的,该通信装置还可以包括I/O接口210,该I/O接口210用于接收来自外围设备的指令和/或数据,以及向外围设备输出指令和/或数据。Optionally, the communication apparatus may further include an I/O interface 210, and the I/O interface 210 is used for receiving instructions and/or data from peripheral devices, and outputting instructions and/or data to peripheral devices.
下面,介绍本申请实施例涉及的一些背景技术。Below, some background technologies involved in the embodiments of the present application are introduced.
(1)、密钥架构。(1), the key structure.
接下来,介绍第五代移动通信系统的密钥架构。UE(或USIM)和UDM(或认证凭据仓库及处理功能(Authentication credential Respository and Processing Function,ARPF)或统一数据存储(Unified Data Repoitory,UDR))上保存UE的长期密钥K。Next, the key structure of the fifth generation mobile communication system is introduced. UE (or USIM) and UDM (or Authentication Credential Respository and Processing Function (ARPF) or Unified Data Repoitory (UDR)) save the UE's long-term key K.
在网络设备侧,UDM或者ARPF基于UE的长期密钥K,生成密钥CK和密钥IK。UDM选择的认证方式不同,生成中间密钥Kausf的方式存在差异。当UDM选择使用的认证方式为5G认证和密钥协商(5G Authentication and Key Agreement,5G AKA)时,UDM或者ARPF根据密钥CK和密钥IK,生成中间密钥Kausf。UDM将生成的中间密钥Kausf发送给AUSF。当UDM选择使用的认证方式为第三代认证和密钥协商的改进扩展认证协议方式(Improved Extensible Authentication Protocol Method for 3rd Generation Authentication and Key Agreement,EAP-AKA')时,UDM或者ARPF根据密钥CK和密钥IK,生成密钥CK’和密钥IK’。UDM将生成的密钥CK’和密钥IK’发送给AUSF。AUSF根据密钥CK’和密钥IK’生成中间密钥Kausf。On the network device side, the UDM or ARPF generates the key CK and the key IK based on the UE's long-term key K. The authentication methods selected by UDM are different, and the methods of generating the intermediate key Kausf are different. When the authentication method selected by the UDM is 5G authentication and key agreement (5G Authentication and Key Agreement, 5G AKA), the UDM or ARPF generates the intermediate key Kausf according to the key CK and the key IK. UDM sends the generated intermediate key Kausf to AUSF. When the authentication method selected by UDM is the Improved Extensible Authentication Protocol Method for 3rd Generation Authentication and Key Agreement (EAP-AKA'), the UDM or ARPF will use the key CK and key IK, generate key CK' and key IK'. The UDM sends the generated key CK' and key IK' to the AUSF. The AUSF generates the intermediate key Kausf based on the key CK' and the key IK'.
基于该中间密钥Kausf,可以派生出多种密钥。本申请实施例中为了便于描述,将基于该中间密钥Kausf派生的密钥称为安全上下文。安全上下文包括但不限于:Kseaf、Kamf、Kaf、Kakma、K NASint、K NASenc、K gNB、K RRCint、K RRCenc或者K N3IWFBased on this intermediate key Kausf, various keys can be derived. For convenience of description in the embodiments of the present application, the key derived based on the intermediate key Kausf is referred to as a security context. Security contexts include, but are not limited to: Kseaf, Kamf, Kaf, Kakma, K NASint , K NASenc , K gNB , K RRCint , K RRCenc or K N3IWF .
AUSF根据中间密钥Kausf生成密钥Kseaf,并将密钥Kseaf发送给SEAF。SEAF根据密钥Kseaf生成密钥Kamf并将密钥Kamf发送给AMF。AMF根据密钥Kamf生成非接入层(non-access stratum,NAS)密钥和和接入层(access stratum,AS)中间密钥K gNB。AMF将K gNB传递给基站,基站根据K gNB再进一步生成AS安全上下文,比如K RRCint、K RRCenc。 AUSF generates the key Kseaf based on the intermediate key Kausf, and sends the key Kseaf to SEAF. SEAF generates the key Kamf based on the key Kseaf and sends the key Kamf to the AMF. The AMF generates a non-access stratum (NAS) key and an access stratum (access stratum, AS) intermediate key K gNB according to the key Kamf . The AMF delivers the K gNB to the base station, and the base station further generates the AS security context according to the K gNB , such as K RRCint and K RRCenc.
在终端设备侧,首先,USIM基于UE的长期密钥K,生成密钥CK和密钥IK。USIM将密钥CK和密钥IK发送给UE。其次,与网络侧类似,不同认证方式下生成中间密钥Kausf的方式存在差异。当使用的认证方式为5G AKA时,UE根据密钥CK和密钥IK,生成中间密钥Kausf。当使用的认证方式为EAP-AKA’时,UE根据密钥CK和密钥IK,生成密钥CK’和密钥IK’。UE根据密钥CK’和密钥IK’生成中间密钥Kausf。On the terminal device side, first, the USIM generates the key CK and the key IK based on the UE's long-term key K. The USIM sends the key CK and the key IK to the UE. Secondly, similar to the network side, there are differences in the way of generating the intermediate key Kausf under different authentication methods. When the authentication method used is 5G AKA, the UE generates the intermediate key Kausf according to the key CK and the key IK. When the authentication method used is EAP-AKA', the UE generates the key CK' and the key IK' according to the key CK and the key IK. The UE generates the intermediate key Kausf according to the key CK' and the key IK'.
UE根据中间密钥Kausf生成密钥Kseaf。UE根据密钥Kseaf生成密钥Kamf。UE根据密钥Kamf生成NAS密钥和K gNB。UE再根据K gNB进一步生成K RRCint、K RRCencThe UE generates the key Kseaf according to the intermediate key Kausf. The UE generates the key Kamf according to the key Kseaf. The UE generates the NAS key and K gNB according to the key Kamf . The UE further generates K RRCint and K RRCenc according to K gNB .
(2)、AKMA。(2), AKMA.
为了便于理解,请参阅图3,图3为UE通过转发的接入流程示意图。以图3为例说明AKMA流程,具体的:For ease of understanding, please refer to FIG. 3 , which is a schematic diagram of an access flow of a UE through forwarding. Take Figure 3 as an example to illustrate the AKMA process, specifically:
301、UE与核心网之间进行主鉴权流程。301. Perform a primary authentication process between the UE and the core network.
步骤301中,UE与核心网之间进行主鉴权(Primary authentication)流程。该主鉴权流程需要使用鉴权向量(authentication vector,AV),该鉴权向量用于主鉴权流程中传递主鉴权流程的验证参数。具体的,通过步骤302,AUSF获取该鉴权向量。In step 301, a primary authentication (Primary authentication) process is performed between the UE and the core network. The main authentication process needs to use an authentication vector (authentication vector, AV), and the authentication vector is used to transfer the verification parameters of the main authentication process in the main authentication process. Specifically, through step 302, the AUSF obtains the authentication vector.
本申请实施例中,该主鉴权流程也称为鉴权流程,此处不作限制。In this embodiment of the present application, the main authentication process is also called an authentication process, which is not limited here.
302、AUSF向UDM发送鉴权向量获取请求消息。302. The AUSF sends an authentication vector acquisition request message to the UDM.
步骤302中,AUSF向UDM发送鉴权向量获取请求消息,该鉴权向量获取请求消息例如“Numd_UEAuthentication Get Request”。该鉴权向量获取请求消息用于向UDM请求鉴权向量。该鉴权向量获取请求消息中携带SUPI或SUCI。具体的,当AMF向AUSF发送的消息中携带SUPI时,该鉴权向量获取请求消息中携带SUPI;当AMF向AUSF发送的消息中携带SUCI时,该鉴权向量获取请求消息中携带SUCI。In step 302, the AUSF sends an authentication vector acquisition request message to the UDM, where the authentication vector acquisition request message is, for example, "Numd_UEAuthentication Get Request". The authentication vector acquisition request message is used to request an authentication vector from the UDM. The authentication vector acquisition request message carries SUPI or SUCI. Specifically, when the message sent by the AMF to the AUSF carries SUPI, the authentication vector acquisition request message carries SUPI; when the message sent by the AMF to the AUSF carries SUCI, the authentication vector acquisition request message carries SUCI.
SUCI可以理解为是SUPI的一种加密形式。SUCI的具体生成方法可以参考3GPP标准TS 33.501。概括地说,SUPI中除移动国家代码(mobile country code,MCC)之外的部分可以由全球用户识别卡(universal subscriber identity module,USIM)或移动设备(mobile equipment,ME)进行加密计算得到SUCI中的加密部分。SUCI除了加密部分,还包括路由标识RID,MCC,MNC等内容。SUCI can be understood as an encrypted form of SUPI. The specific generation method of SUCI can refer to 3GPP standard TS 33.501. In a nutshell, the part of SUPI other than the mobile country code (MCC) can be encrypted and calculated by the universal subscriber identity module (USIM) or mobile equipment (ME) to obtain the SUCI encryption part. In addition to the encryption part, SUCI also includes routing identifier RID, MCC, MNC and other contents.
303、AUSF接收UDM发送的鉴权向量获取响应消息。303. The AUSF receives the authentication vector acquisition response message sent by the UDM.
步骤303中,UDM收到步骤302的鉴权向量获取请求消息后,UDM确定对应的鉴权向量。UDM向AUSF发送鉴权向量获取响应消息,该鉴权向量获取响应消息中携带鉴权向量。该鉴权向量获取响应消息例如:“Num_UEAuthentication_Get Response”。In step 303, after the UDM receives the authentication vector acquisition request message in step 302, the UDM determines the corresponding authentication vector. The UDM sends an authentication vector acquisition response message to the AUSF, where the authentication vector acquisition response message carries the authentication vector. The authentication vector acquisition response message is, for example: "Num_UEAuthentication_Get Response".
可选的,UDM基于SUPI对应的用户签约数据判断该主鉴权流程对应的UE是否支持AKMA业务。当该UE支持AKMA业务,则该鉴权向量获取响应消息中携带AKMA业务指示信息,该AKMA业务指示信息是“AKMA Indication”。AKMA业务指示信息用于指示 AUSF需要为这个UE生成AKMA锚点密钥Kakma。也可以理解为:该AKMA业务指示信息用于指示该UE支持AKMA业务。当该UE不支持AKMA业务,则该鉴权向量获取请求消息中不携带AKMA业务指示信息。Optionally, the UDM determines whether the UE corresponding to the main authentication process supports the AKMA service based on the user subscription data corresponding to the SUPI. When the UE supports the AKMA service, the authentication vector acquisition response message carries the AKMA service indication information, and the AKMA service indication information is "AKMA Indication". The AKMA service indication information is used to indicate that the AUSF needs to generate the AKMA anchor key Kakma for this UE. It can also be understood as: the AKMA service indication information is used to indicate that the UE supports the AKMA service. When the UE does not support the AKMA service, the authentication vector acquisition request message does not carry the AKMA service indication information.
304a、UE基于AUSF中间密钥生成AKMA锚点密钥Kakma。304a. The UE generates an AKMA anchor key Kakma based on the AUSF intermediate key.
步骤304a中,当UE的主鉴权流程成功完成后,UE基于与AUSF使用的相同的中间密钥(Kausf)生成AKMA锚点密钥(Kakma)。可选的,进一步地,UE要发起AKMA业务前,UE基于与AUSF使用的相同的中间密钥(Kausf)生成AKMA锚点密钥(Kakma)。In step 304a, after the UE's primary authentication process is successfully completed, the UE generates an AKMA anchor key (Kakma) based on the same intermediate key (Kausf) used by the AUSF. Optionally, further, before the UE initiates the AKMA service, the UE generates an AKMA anchor key (Kakma) based on the same intermediate key (Kausf) used by the AUSF.
304b、UE生成认证和密钥管理-密钥临时身份标识A-KID。304b, the UE generates an authentication and key management-key temporary identity identifier A-KID.
步骤304b中,当UE的主鉴权流程成功完成后,UE要发起AKMA业务前,UE基于与AUSF使用的相同的中间密钥(Kausf)生成认证和密钥管理-密钥临时身份标识(AKMA-Key Identifier,A-KID)。A-KID用于标识UE的AKMA锚点密钥Kakma。可选的,进一步地,UE要发起AKMA业务前,UE基于与AUSF使用的相同的中间密钥(Kausf)生成A-KID。具体地,UE基于基于与AUSF使用的相同的中间密钥(Kausf)生成A-KID中的密钥管理-密钥临时身份标识(AKMA Temporary UE Identifier,A-TID)部分。In step 304b, after the UE's main authentication process is successfully completed, before the UE initiates the AKMA service, the UE generates authentication and key management-key temporary identity (AKMA) based on the same intermediate key (Kausf) used by the AUSF. -Key Identifier, A-KID). The A-KID is used to identify the UE's AKMA anchor key Kakma. Optionally, further, before the UE initiates the AKMA service, the UE generates an A-KID based on the same intermediate key (Kausf) used by the AUSF. Specifically, the UE generates the key management-key temporary identifier (AKMA Temporary UE Identifier, A-TID) part in the A-KID based on the same intermediate key (Kausf) used by the AUSF.
具体的,基于路由标识RID生成A-KID。A-KID格式为“username@exmaple”。“username”部分包括路由标识,和认证和密钥管理-密钥临时身份标识(AKMA Temporary UE Identifier,A-TID)。“example”部分包括家乡网络标识,例如:移动国家代码(mobile country code,MCC)和移动网络代码(mobile network code,MNC)。A-TID是基于Kausf生成的一个临时标识。Specifically, the A-KID is generated based on the routing identifier RID. A-KID format is "username@exmaple". The "username" part includes the routing identifier, and the Authentication and Key Management-Key Temporary Identifier (AKMA Temporary UE Identifier, A-TID). The "example" part includes home network identifiers such as: mobile country code (MCC) and mobile network code (MNC). A-TID is a temporary identification based on Kausf.
需要说明的是,步骤304a与步骤304b执行顺序不作限制。It should be noted that the execution order of step 304a and step 304b is not limited.
305a、AUSF基于AUSF中间密钥生成AKMA锚点密钥Kakma。305a. The AUSF generates the AKMA anchor key Kakma based on the AUSF intermediate key.
步骤305a与前述步骤304a类似,不作赘述。与304a不同的地方在于,AUSF在收到所述鉴权向量获取响应消息后,如果消息中携带有AKMA业务指示信息,则AUSF使用AUSF获取到的Kausf生成Kakma和A-KID。如果所述鉴权向量获取响应消息没有携带有AKMA业务指示信息,则AUSF可以不生成Kakma和A-KID。Step 305a is similar to the aforementioned step 304a, and will not be repeated here. The difference from 304a is that after the AUSF receives the authentication vector acquisition response message, if the message carries the AKMA service indication information, the AUSF uses the Kausf acquired by the AUSF to generate Kakma and A-KID. If the authentication vector acquisition response message does not carry the AKMA service indication information, the AUSF may not generate Kakma and A-KID.
305b、AUSF生成认证和密钥管理-密钥临时身份标识A-KID。305b, the AUSF generates an authentication and key management-key temporary identity identifier A-KID.
步骤305b中,当步骤303中,UDM发送的鉴权向量获取响应消息中携带AKMA标识信息时,AUSF基于该AKMA标识信息确定需要生成A-KID。In step 305b, when in step 303, the authentication vector acquisition response message sent by the UDM carries the AKMA identification information, the AUSF determines that an A-KID needs to be generated based on the AKMA identification information.
306、AUSF向AAnF发送AKMA锚密钥注册请求消息。306. The AUSF sends an AKMA anchor key registration request message to the AAnF.
步骤306中,AUSF选择一个AAnF后,AUSF向该AAnF发送AKMA锚密钥注册请求消息。AKMA锚密钥注册请求消息例如:“Naanf_AKMA_AnchorKey_Register Request”。具体的,该AKMA锚密钥注册请求消息中携带SUPI、A-KID和Kakma。In step 306, after the AUSF selects an AAnF, the AUSF sends an AKMA anchor key registration request message to the AAnF. The AKMA anchor key registration request message is for example: "Naanf_AKMA_AnchorKey_Register Request". Specifically, the AKMA anchor key registration request message carries SUPI, A-KID and Kakma.
307、AUSF接收AAnF发送的AKMA锚密钥注册响应消息。307. The AUSF receives the AKMA anchor key registration response message sent by the AAnF.
步骤307中,AAnF基于步骤306的AKMA锚密钥注册请求消息,向AUSF发送AKMA锚密钥注册响应消息。该AKMA锚密钥注册响应消息例如:“Naanf_AKMA_AnchorKey_Register Response”。In step 307, the AAnF sends an AKMA anchor key registration response message to the AUSF based on the AKMA anchor key registration request message in step 306. The AKMA anchor key registration response message is for example: "Naanf_AKMA_AnchorKey_Register Response".
308、AUSF删除Kakma和A-KID。308. AUSF deletes Kakma and A-KID.
步骤308中,当AUSF接收来自AAnF发送的AKMA锚密钥注册响应消息后,AUSF删除Kakma和A-KID。In step 308, after the AUSF receives the AKMA anchor key registration response message sent from the AAnF, the AUSF deletes the Kakma and the A-KID.
(3)、路由标识RID。(3) Route identifier RID.
SUCI中包括RID。当前标准规定,RID用于AMF查找AUSF,AUSF查找UDM。在AKMA流程中,RID用于生成A-KID。RID还用于选择AAnF。RIDs are included in SUCI. The current standard specifies that RID is used for AMF to look up AUSF and AUSF to look up UDM. In the AKMA process, the RID is used to generate the A-KID. RID is also used to select AAnF.
在5G全球用户识别卡(Universal Subscriber Identity Module,USIM)中,RID存储在USIM中。当5G UE使用5G USIM时,5G UE从该5G USIM中获取需要使用的RID。该RID的值可以是一个非缺省值,也可以是一个缺省值。In the 5G Global Subscriber Identity Module (USIM), the RID is stored in the USIM. When the 5G UE uses the 5G USIM, the 5G UE obtains the RID to be used from the 5G USIM. The value of the RID can be a non-default value or a default value.
而在4G USIM中不存在RID,因此,如果一个5G UE使用了4G USIM,那么SUCI中的RID会被填充为缺省值。However, there is no RID in 4G USIM, so if a 5G UE uses 4G USIM, the RID in SUCI will be filled with the default value.
在AMF中,关于UE的上下文中包括RID。可以理解为,AMF从SUCI中获取RID后,将该RID存储在AMF中。In AMF, the RID is included in the context of the UE. It can be understood that after the AMF obtains the RID from the SUCI, the RID is stored in the AMF.
(4)、密钥Kaf的生成流程。(4) The generation process of the key Kaf.
密钥Kaf是基于中间密钥Kausf派生得到的密钥,安全上下文中包括该Kaf。具体生成Kaf的流程,请参阅图4。图4为密钥Kaf的生成流程示意图,具体的:The key Kaf is a key derived based on the intermediate key Kausf, which is included in the security context. For the specific process of generating Kaf, please refer to Figure 4. Figure 4 is a schematic diagram of the generation process of the key Kaf, specifically:
401、主鉴权流程并生成Kakma。401. The main authentication process is performed and Kakma is generated.
步骤401为主鉴权流程并生成Kakma,具体步骤请参阅前述图3所示各个步骤,此处不作赘述。Step 401 is the main authentication process and generates Kakma. For specific steps, please refer to each step shown in FIG. 3 above, which will not be repeated here.
402、UE向AF发送A-KID。402. The UE sends an A-KID to the AF.
步骤402中,UE发送“Application Session Establishment Request”消息给AF。该消息中携带A-KID。AAnF根据A-KID查找对应的Kakma,该Kakma的A-KID与该消息中的A-KID一致。In step 402, the UE sends an "Application Session Establishment Request" message to the AF. The A-KID is carried in the message. AAnF searches for the corresponding Kakma according to the A-KID, and the A-KID of the Kakma is consistent with the A-KID in the message.
403、AF向AAnF发送A-KID和AF_ID。403. The AF sends the A-KID and the AF_ID to the AAnF.
步骤403中,AF发送“Naanf_AKMA_ApplicationKey_Get_Request”消息给AAnF。该消息中携带A-KID和AF的标识信息(AF_ID)。A-KID来自前述“Application Session Establishment Request”消息。该AF_ID用于生成Kaf。In step 403, the AF sends a "Naanf_AKMA_ApplicationKey_Get_Request" message to the AAnF. The message carries A-KID and AF identification information (AF_ID). The A-KID comes from the aforementioned "Application Session Establishment Request" message. The AF_ID is used to generate Kaf.
404、AAnF根据A-KID确定Kakma,并使用Kakma生成Kaf。404. AAnF determines Kakma according to the A-KID, and uses Kakma to generate Kaf.
步骤404中,AAnF根据A-KID确定Kakma。然后使用Kakma生成Kaf。并确定Kaf的有效时间(也可以称为过期时间)。In step 404, the AAnF determines the Kakma according to the A-KID. Then use Kakma to generate Kaf. And determine the validity time of Kaf (also known as expiration time).
405、AAnF向AF发送Kaf。405. AAnF sends Kaf to AF.
步骤405中,AAnF向AF发送“Naanf_AKMA_ApplicationKey_Get Response”消息,该消息中携带生成的Kaf和Kaf的过期时间。In step 405, the AAnF sends a "Naanf_AKMA_ApplicationKey_Get Response" message to the AF, where the message carries the generated Kaf and the expiration time of the Kaf.
406、AF向UE回复响应消息。406. The AF returns a response message to the UE.
步骤406中,AF向UE回复响应消息,该响应消息可以是“Application Session Establishment Response”消息。In step 406, the AF replies a response message to the UE, and the response message may be an "Application Session Establishment Response" message.
由上述步骤可知,Kakma是在主鉴权完成后使用Kausf生成的。因此,在没有新Kausf生成的情况下,就不会有新Kakma生成。所以可以理解为,Kakma的有效时间与Kausf的 有效时间一致。Kausf的更新时间依赖于主鉴权发生的频率,而主鉴权发生的时间依赖于网络配置或者触发条件。因此Kausf的有效时间(也称为过期时间、有效期或者生存时间),不确定。基于该Kausf生成的Kakma的有效时间也不确定。It can be seen from the above steps that Kakma is generated using Kausf after the main authentication is completed. So without a new Kausf being generated, there will be no new Kakma being generated. So it can be understood that the effective time of Kakma is consistent with that of Kausf. The update time of Kausf depends on the frequency of the main authentication, and the time of the main authentication depends on the network configuration or trigger conditions. Therefore, the validity time of Kausf (also known as expiration time, validity period or life time) is uncertain. The validity time of Kakma generated based on this Kausf is also uncertain.
由于需要根据该A-KID确定对应的Kakma后,基于该Kakma(和AF_ID)生成Kaf。该Kaf的有效时间由AAnF设置,因此该Kaf的有效时间可能与Kausf的有效时间不一致。After the corresponding Kakma needs to be determined according to the A-KID, Kaf is generated based on the Kakma (and AF_ID). The valid time of this Kaf is set by AAnF, so the valid time of this Kaf may not be consistent with the valid time of Kausf.
因为Kaf有单独的有效期,因此当有效期到期后,Kaf就过期了。Kaf过期,就需要更新Kaf,否则UE和AF之间就存在没有密钥可以用的可能性。Because Kaf has a separate validity period, when the validity period expires, Kaf expires. When the Kaf expires, the Kaf needs to be updated, otherwise there is a possibility that there is no key available between the UE and the AF.
因为Kaf的生成需要使用Kakma,因此如果Kakma没有更新,那么Kakma会生成相同的Kaf。所以,当Kaf过期后,如果有新的Kausf生成,则AAnF可以为AF生成新的Kaf。但是若没有新的Kausf生成,则AAnF只会再次生成过期的Kaf。此时UE和AF如果继续使用过期Kaf,那么设定Kaf的有效期就变得没有意义,与有效期的设计初衷不符。例如:使用Kakma#1生成Kaf#1,基于Kausf#1生成Kakma#1。当Kaf#1过期后,AF和UE需要使用新的Kaf(Kaf#2)。当Kausf未更新,即Kausf依然是Kausf#1时,基于该Kausf#1生成的Kaf依然是Kaf#1。因此,UE和AF无法继续使用该Kaf。Because the generation of Kaf needs to use Kakma, so if Kakma is not updated, then Kakma will generate the same Kaf. Therefore, when Kaf expires, if a new Kausf is generated, AAnF can generate a new Kaf for AF. But if no new Kausf is generated, AAnF will only generate expired Kaf again. At this time, if the UE and the AF continue to use the expired Kaf, it becomes meaningless to set the validity period of the Kaf, which is inconsistent with the original design of the validity period. For example: use Kakma#1 to generate Kaf#1, and generate Kakma#1 based on Kausf#1. When Kaf#1 expires, AF and UE need to use a new Kaf (Kaf#2). When Kausf is not updated, that is, Kausf is still Kausf#1, the Kaf generated based on Kausf#1 is still Kaf#1. Therefore, the UE and AF cannot continue to use the Kaf.
(5)、中间密钥Kausf的存储流程。(5) The storage process of the intermediate key Kausf.
Kausf是在主鉴权过程中,在AUSF中生成的,或者UDM生成后发送给AUSF的。在UE侧,UE可以使用与AUSF或者UDM相同的方法生成与AUSF获得的相同的Kausf。当前讨论了如何确保UE和AUSF保存相同的Kausf。讨论结论是AUSF在确定鉴权成功后保存新的Kausf,而UE侧是在收到非接入层安全模式命令(Non-access stratum security mode commond,NAS SMC)消息后,保存新的Kausf。Kausf is generated in AUSF during the main authentication process, or sent to AUSF after UDM is generated. On the UE side, the UE can generate the same Kausf obtained by AUSF using the same method as AUSF or UDM. It is currently discussed how to ensure that the UE and the AUSF hold the same Kausf. The conclusion of the discussion is that the AUSF saves the new Kausf after determining that the authentication is successful, and the UE side saves the new Kausf after receiving the Non-access stratum security mode common (NAS SMC) message.
具体的,首先发生主鉴权流程,其次发生NAS SMC流程。为了实现UE保存最新的Kausf,主鉴权流程后需要强制发生NAS SMC流程,并且,主鉴权流程与NAS SMC流程之间的空闲时间尽可能小。NAS SMC流程可以用于激活原生安全上下文,原生安全上下文是指通过主鉴权流程生成的安全上下文。安全上下文包括密钥、算法、计数器等用于安全功能的材料。5G安全上下文是指用于5G系统的安全上下文。5G安全上下文包括但不限于5G NAS安全上下文、5G AS安全上下文和5G AKMA安全上下文。5G NAS安全上下文用于UE和AMF之间的安全保护,AS安全上下文用于UE和基站之间的安全保护。5G AKMA安全上下文包括Kakma、A-KID、Kaf等密钥(或者安全材料,或者安全密钥)。5G AKMA安全上下文在主鉴权流程后AUSF侧生成,并发送给AAnF,UE侧则是在AKMA业务发起前再生成。具体的,主鉴权流程中生成新的Kausf,并基于这个新的Kausf生成其它新的密钥(例如NAS密钥)。该新的密钥如果要激活的话,必须通过NAS SMC流程激活。激活密钥指的是UE和AMF开始使用密钥做安全保护。为了便于理解,请参阅图5,图5为本申请实施例涉及的NAS SMC流程示意图。NAS SMC流程包括:Specifically, the main authentication process occurs first, followed by the NAS SMC process. In order for the UE to save the latest Kausf, the NAS SMC process needs to be forced to occur after the main authentication process, and the idle time between the main authentication process and the NAS SMC process should be as small as possible. The NAS SMC process can be used to activate the native security context, which refers to the security context generated through the main authentication process. The security context includes keys, algorithms, counters, and other materials used for security functions. The 5G security context refers to the security context for the 5G system. 5G security context includes but is not limited to 5G NAS security context, 5G AS security context and 5G AKMA security context. The 5G NAS security context is used for security protection between UE and AMF, and the AS security context is used for security protection between UE and base station. The 5G AKMA security context includes keys (or security materials, or security keys) such as Kakma, A-KID, Kaf, etc. The 5G AKMA security context is generated on the AUSF side after the main authentication process and sent to the AAnF, and on the UE side before the AKMA service is initiated. Specifically, a new Kausf is generated in the main authentication process, and other new keys (eg, NAS keys) are generated based on the new Kausf. If the new key is to be activated, it must be activated through the NAS SMC process. The activation key means that the UE and AMF start to use the key for security protection. For ease of understanding, please refer to FIG. 5, which is a schematic flowchart of a NAS SMC involved in an embodiment of the present application. The NAS SMC process includes:
501、启动完整性保护。501. Start integrity protection.
步骤501中,AMF启动完整性保护流程。In step 501, the AMF starts an integrity protection process.
502、AMF向UE发送NAS SMC消息。502. The AMF sends a NAS SMC message to the UE.
步骤502中,AMF在主鉴权流程中会生成5G密钥标识符(Key Set Identifier in 5G, ngKSI),该5G密钥标识符用于标识5G安全上下文。NAS SMC消息中携带的5G密钥标识符用于告知UE后续将要使用哪一套密钥进行安全保护。AMF向UE发送NAS SMC消息,该NAS SMC消息中携带5G密钥标识符(Key Set Identifier in 5G,ngKSI),该NAS SMC消息还包括其它信息,例如:选择的加密算法和/或选择的完整性保护算法、重放的安全算法等,安全算法包括:加密算法和完整性保护算法此处不作赘述。In step 502, the AMF generates a 5G key identifier (Key Set Identifier in 5G, ngKSI) in the main authentication process, and the 5G key identifier is used to identify the 5G security context. The 5G key identifier carried in the NAS SMC message is used to inform the UE which set of keys to use for security protection in the future. The AMF sends a NAS SMC message to the UE, the NAS SMC message carries the 5G key identifier (Key Set Identifier in 5G, ngKSI), and the NAS SMC message also includes other information, such as: the selected encryption algorithm and/or the selected complete Security algorithm, security algorithm for replay, etc. Security algorithm includes: encryption algorithm and integrity protection algorithm, which will not be described here.
503、启动上行解密流程。503. Start an uplink decryption process.
步骤503中,AMF启动上行链路的解密流程。In step 503, the AMF starts the decryption process of the uplink.
504、检验NAS SMC消息的完整性。504. Verify the integrity of the NAS SMC message.
步骤504中,UE检验该NAS SMC消息的完整性,具体的,UE还检验是否成功启动上行链路加密,下行链路解密和完整性保护等。In step 504, the UE verifies the integrity of the NAS SMC message, specifically, the UE also verifies whether the uplink encryption, downlink decryption and integrity protection are successfully activated.
505、UE向AMF发送NAS SMC完成响应。505. The UE sends a NAS SMC completion response to the AMF.
步骤505中,UE完成NAS SMC消息的校验后,UE向AMF发送NAS SMC完成响应。该NAS SMC完成响应可以是NAS消息。In step 505, after the UE completes the verification of the NAS SMC message, the UE sends a NAS SMC completion response to the AMF. The NAS SMC Completion Response may be a NAS message.
506、启动下行加密流程。506. Start the downlink encryption process.
步骤506中,AMF启动下行链路的加密流程。In step 506, the AMF starts the downlink encryption process.
在过去,主鉴权流程后不一定会发生NAS SMC。在没有NAS SMC流程的情况下,UE和AMF是继续使用旧密钥。也就是说,即使主鉴权流程后生成了新的部分原生密钥,但是因为没有NAS SMC流程,所以AMF没有继续生成完整的原生密钥。其中,部分原生密钥可以理解为除了NAS密钥和AS密钥意外的密钥,比如包括Kausf,Kseaf,Kamf。完整原生密钥,则是指进一步生成了NAS密钥和AS密钥。在通常情况下,只有经过NAS SMC流程,AMF和/或UE才会进一步生成NAS密钥;在只有经过AS SMC流程,基站和/或UE才会进一步生成AS密钥。In the past, NAS SMC did not necessarily happen after the main authentication process. In the absence of the NAS SMC process, the UE and AMF continue to use the old key. That is to say, even if a new partial native key is generated after the main authentication process, AMF does not continue to generate the complete native key because there is no NAS SMC process. Among them, some native keys can be understood as keys other than NAS keys and AS keys, such as Kausf, Kseaf, Kamf. The complete native key means that the NAS key and the AS key are further generated. Under normal circumstances, the AMF and/or the UE will further generate the NAS key only after going through the NAS SMC process; the base station and/or the UE will further generate the AS key only after going through the AS SMC process.
需要说明的是,当前使用的密钥不一定是前次主鉴权流程生成的密钥,因为前次主鉴权流程过后也不一定有NAS SMC流程。所以,NAS消息当前使用的密钥与主鉴权流程是否发生没有直接关系,而是与NAS SMC流程是否发生有关系。It should be noted that the currently used key is not necessarily the key generated by the previous main authentication process, because there may not be a NAS SMC process after the previous main authentication process. Therefore, the key currently used in the NAS message is not directly related to whether the main authentication process occurs, but is related to whether the NAS SMC process occurs.
由于NAS SMC流程中,需要使用ngkSI指示使用哪一套密钥进行安全保护,因此,保护NAS消息时使用的当前密钥与NAS SMC流程中携带哪个ngKSI有关。例如:发生了3次主鉴权,当前使用的是第1次主鉴权后的密钥,第2次主鉴权没有发生NAS SMC,但是第3次主鉴权后发生了NAS SMC。如果第三次主鉴权后的NAS SMC携带的是第二次主鉴权生成的ng-KSI,那么激活的就是第二套主鉴权相关的密钥。In the NAS SMC process, it is necessary to use ngkSI to indicate which set of keys to use for security protection. Therefore, the current key used to protect NAS messages is related to which ngKSI is carried in the NAS SMC process. For example, three primary authentications have occurred, and the key after the first primary authentication is currently used. The NAS SMC did not occur in the second primary authentication, but the NAS SMC occurred after the third primary authentication. If the NAS SMC after the third primary authentication carries the ng-KSI generated by the second primary authentication, the activated key is the second set of primary authentication-related keys.
现有技术中,规定了主鉴权流程与NAS SMC流程绑定,即主鉴权发生后要尽快执行NAS SMC流程。当前没有规定NAS SMC流程要携带哪个密钥标识符,若默认地NAS SMC要携带最近一次主鉴权过程中生成的密钥标识符,则意味着每一次主鉴权流程后都要做密钥更新。密钥更新不仅仅涉及到NAS密钥,还涉及到接入层(access stratum,AS)密钥,因此密钥更新的复杂度高,影响了设备性能,或者影响设备使用寿命。基于此,本申请提出一种通信方法,下面结合附图进行说明。请参阅图6,图6为本申请实施例提出的一种通信方法的流程示意图,包括:In the prior art, it is stipulated that the main authentication process is bound to the NAS SMC process, that is, the NAS SMC process should be executed as soon as possible after the main authentication occurs. Currently, it is not specified which key identifier should be carried in the NAS SMC process. By default, the NAS SMC should carry the key identifier generated in the most recent main authentication process, which means that a key must be made after each main authentication process. renew. The key update involves not only the NAS key, but also the access stratum (AS) key, so the complexity of the key update is high, which affects the performance of the device, or affects the service life of the device. Based on this, the present application proposes a communication method, which will be described below with reference to the accompanying drawings. Please refer to FIG. 6. FIG. 6 is a schematic flowchart of a communication method proposed by an embodiment of the present application, including:
601、UE向AMF发送注册请求消息。601. The UE sends a registration request message to the AMF.
UE向AMF发送注册请求消息,该注册请求消息通过网络设备转发。该注册请求消息中携带UE的用户隐藏标识(Subscription Concealed Identifier,SUCI)。The UE sends a registration request message to the AMF, and the registration request message is forwarded by the network device. The registration request message carries the UE's Subscription Concealed Identifier (SUCI).
可选的,该注册请求消息可以是“Registration Request”。Optionally, the registration request message may be "Registration Request".
602、AMF向UE发送第一密钥标识符。602. The AMF sends the first key identifier to the UE.
AMF接收注册请求消息后,AMF发起主鉴权流程:AMF向AUSF请求对UE进行鉴权;AUSF向UDM请求鉴权向量;UDM生成鉴权向量,并根据选择的主鉴权方法确定发送生成的鉴权向量还是处理后的鉴权向量发送给AUSF,AMF获取来自AUSF的鉴权向量后,AMF向UE发送第一鉴权请求消息,该第一鉴权请求消息中包括第一密钥标识符。本申请实施例中,以密钥标识符是ngKSI为例进行说明,可以理解的是,该密钥标识符还可以是其它标识,此处不作限制。具体流程可以参考标准TS 33.501版本17.1.0中章节6.1.3的描述。After the AMF receives the registration request message, the AMF initiates the main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for the authentication vector; the UDM generates the authentication vector, and determines to send the generated authentication vector according to the selected primary authentication method. The authentication vector or the processed authentication vector is sent to the AUSF. After the AMF obtains the authentication vector from the AUSF, the AMF sends the first authentication request message to the UE, and the first authentication request message includes the first key identifier. . In the embodiments of the present application, the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here. For the specific process, please refer to the description in Section 6.1.3 of Standard TS 33.501 Version 17.1.0.
具体的,AMF向UE发送第一鉴权请求消息,该第一鉴权请求消息包括第一密钥标识符,该第一鉴权请求消息用于触发UE与网络之间的第一鉴权(也称为第一主鉴权流程)。Specifically, the AMF sends a first authentication request message to the UE, where the first authentication request message includes a first key identifier, and the first authentication request message is used to trigger the first authentication ( Also known as the first primary authentication process).
示例性的,该第一密钥标识符为ngKSI#1,该第一密钥标识符与第一中间密钥对应。本申请实施例中,以中间密钥为Kausf为例进行说明。则该第一中间密钥为Kausf#1。Exemplarily, the first key identifier is ngKSI#1, and the first key identifier corresponds to the first intermediate key. In the embodiment of the present application, the intermediate key is Kausf as an example for description. Then the first intermediate key is Kausf#1.
603、UE和AMF交互完成第一主鉴权流程。603. The UE interacts with the AMF to complete the first primary authentication process.
UE收到第一鉴权请求消息(包括第一密钥标识符),并且UE会收到鉴权向量。则UE开始对对网络侧鉴权;在验证网络侧为真后,UE会回复消息给AMF继续进行主鉴权流程,最终完成UE至AMF和AUSF的双向认证。具体的主鉴权流程标准TS 33.501版本17.1.0中章节6.1.3的描述,此处不作赘述。由于该主鉴权流程与第一中间密钥和第一密钥标识符相关,因此将该主鉴权流程称为第一主鉴权流程。The UE receives the first authentication request message (including the first key identifier), and the UE receives the authentication vector. Then the UE starts to authenticate the network side; after verifying that the network side is true, the UE will reply a message to the AMF to continue the main authentication process, and finally complete the two-way authentication from the UE to the AMF and the AUSF. The specific main authentication process standard TS 33.501 version 17.1.0 is described in Section 6.1.3, which will not be repeated here. Since the main authentication process is related to the first intermediate key and the first key identifier, the main authentication process is called the first main authentication process.
第一主鉴权流程中,AUSF存储第一密钥标识符对应的第一中间密钥。示例性的,AUSF存储Kasuf#1。具体地,在AUSF在验证UE是真实的之后,存储Kausf#1。需要说明的是,AUSF不会收到第一密钥标识符,因此,AUSF最终只是存储Kausf#1和UE的永久标识的对应关系。In the first primary authentication process, the AUSF stores the first intermediate key corresponding to the first key identifier. Exemplarily, AUSF stores Kasuf#1. Specifically, after the AUSF verifies that the UE is authentic, Kausf#1 is stored. It should be noted that the AUSF will not receive the first key identifier, therefore, the AUSF finally only stores the correspondence between Kausf#1 and the permanent identifier of the UE.
604、NAS SMC流程#1。604. NAS SMC process #1.
第一主鉴权流程结束后,AMF发起NAS SMC流程,具体的NAS SMC流程与前述图5所示的流程一致,此处不作赘述。本申请实施例中,将与第一主鉴权流程相关的NAS SMC流程称为NAS SMC流程#1。After the first main authentication process ends, the AMF initiates the NAS SMC process. The specific NAS SMC process is the same as the process shown in the aforementioned Figure 5, and will not be repeated here. In the embodiment of the present application, the NAS SMC process related to the first main authentication process is referred to as NAS SMC process #1.
具体的,在NAS SMC流程#1中,AMF向UE发送第一NAS SMC消息,该第一NAS SMC消息中携带第一密钥标识符。AMF使用该第一密钥标识符对应的NAS完整性保护密钥对该第一NAS SMC消息进行完整性保护验证。Specifically, in the NAS SMC process #1, the AMF sends the first NAS SMC message to the UE, and the first NAS SMC message carries the first key identifier. The AMF uses the NAS integrity protection key corresponding to the first key identifier to perform integrity protection verification on the first NAS SMC message.
UE接收该第一NAS SMC消息后,UE使用该第一密钥标识符对应的NAS完整性保护密钥对该第一NAS SMC消息进行完整性保护校验。如果校验成功,那么UE使用该第一密钥标识符对应的NAS加密密钥和NAS完整性保护密钥对该消息进行机密性保护和完整性保护。UE侧完成对该第一密钥标识符对应的NAS密钥的激活过程。UE回复“NAS Security  Mode Complete”消息至AMF。AMF使用该第一密钥标识符对应的NAS完整性保护密钥和NAS加密密钥对该消息(“NAS Security Mode Complete”消息)进行解密和校验完整性保护。如果校验成功,则AMF侧完成对该第一密钥标识符对应的NAS密钥的激活过程。After the UE receives the first NAS SMC message, the UE uses the NAS integrity protection key corresponding to the first key identifier to perform integrity protection verification on the first NAS SMC message. If the verification is successful, the UE performs confidentiality protection and integrity protection on the message by using the NAS encryption key and the NAS integrity protection key corresponding to the first key identifier. The UE side completes the activation process of the NAS key corresponding to the first key identifier. The UE replies with a "NAS Security Mode Complete" message to the AMF. The AMF uses the NAS integrity protection key and the NAS encryption key corresponding to the first key identifier to decrypt and verify the integrity of the message ("NAS Security Mode Complete" message). If the verification is successful, the AMF side completes the activation process of the NAS key corresponding to the first key identifier.
示例性的,因为该第一NAS SMC消息中携带ngKSI#1,所以AMF使用ngKSI#1对应的NAS完整性保护密钥对该第一NAS SMC消息进行完整性保护。Exemplarily, because the first NAS SMC message carries ngKSI#1, the AMF uses the NAS integrity protection key corresponding to ngKSI#1 to perform integrity protection on the first NAS SMC message.
605、触发第二主鉴权流程。605. Trigger the second primary authentication process.
AMF触发第二主鉴权流程,该第二主鉴权流程相较于第一主鉴权流程,属于重鉴权流程,第二主鉴权流程的触发条件包括但不限于:AMF根据本地策略触发,或者,NAS计数器(count)需要翻转,或者,其它网络功能(或者网元)触发。该网络功能包括但不限于:AUSF或者AAnF。The AMF triggers the second main authentication process. Compared with the first main authentication process, the second main authentication process belongs to the re-authentication process. The triggering conditions of the second main authentication process include but are not limited to: AMF according to local policies Triggered, or the NAS counter (count) needs to be rolled over, or other network functions (or network elements) are triggered. The network function includes but is not limited to: AUSF or AAnF.
具体的,AMF可以通过主鉴权流程触发原因确定是否激活第二安全上下文。主鉴权流程触发原因可以有多种方式,包括但不限于:Specifically, the AMF may determine whether to activate the second security context through the triggering cause of the primary authentication process. There are various ways to trigger the main authentication process, including but not limited to:
a.主鉴权流程仅仅用于对UE进行鉴权,比如,AMF根据本地策略、运营商配置周期性对UE进行鉴权。a. The main authentication process is only used to authenticate the UE. For example, the AMF periodically authenticates the UE according to local policies and operator configuration.
b.主鉴权流程的触发原因是为了更新5G NAS安全上下文或者5G AS安全上下文。比如,NAS COUNT即将翻转。b. The triggering reason for the main authentication process is to update the 5G NAS security context or the 5G AS security context. For example, NAS COUNT is about to flip.
c.主鉴权流程是因为其他功能网元的请求触发的。比如AMF从AUSF、NEF、AAnF、ECS、EES等网元收到用于请求更新密钥的消息。在只有触发主鉴权流程才可以更新的情况下,则发起主鉴权流程。c. The main authentication process is triggered by requests from other functional network elements. For example, the AMF receives a message for requesting key update from network elements such as AUSF, NEF, AAnF, ECS, and EES. In the case that the update can only be performed by triggering the main authentication process, the main authentication process is initiated.
d.主鉴权流程是因为终端设备触发的。比如终端设备通过注册请求消息携带指示信息,用于指示需要更新某个密钥。d. The main authentication process is triggered by the terminal device. For example, the terminal device carries indication information through the registration request message, which is used to indicate that a certain key needs to be updated.
需要说明的是,步骤605到步骤607b是可选的。步骤605到步骤607b是为了说明触发AMF生成第二安全上下文的方法。在步骤605到步骤607b未执行的情况下,AMF也可以生成第二安全上下文,比如,AMF可以通过第一安全上下文中的Kamf#1生成新的Kamf,该Kamf称为Kamf#2。Kamf#2作为中间密钥表示第二安全上下文。AMF可以进一步根据Kamf#2生成新的5G NAS密钥和新的5G AS密钥。比如,通过标准33.501章节A.13水平Kamf推演方式,生成新的Kamf。在这种情况下,AMF可以生成新的第二密钥标识符,也可以不生成第二密钥标识符。生成第二密钥标识符是为了结合现有技术,一个Kamf要与一个密钥标识符进行一一对应,此时新生成的Kamf要有一个新的密钥标识符,该新的密钥标识符用于标识该新生成的Kamf。该情况通常发生在AMF变化的场景下。不生成第二密钥标识符,则可以发生在AMF没有变化的情况下,即当前的AMF生成的Kamf继续被自己使用的情况。It should be noted that steps 605 to 607b are optional. Steps 605 to 607b are to illustrate the method of triggering the AMF to generate the second security context. When steps 605 to 607b are not executed, the AMF may also generate a second security context. For example, the AMF may generate a new Kamf through Kamf#1 in the first security context, and the Kamf is called Kamf#2. Kamf#2 represents the second security context as an intermediate key. AMF can further generate new 5G NAS keys and new 5G AS keys according to Kamf#2. For example, a new Kamf is generated through the horizontal Kamf deduction method in Section A.13 of the standard 33.501. In this case, the AMF may or may not generate a new second key identifier. The purpose of generating the second key identifier is to combine the existing technology, a Kamf should be in a one-to-one correspondence with a key identifier, and the newly generated Kamf should have a new key identifier, the new key identifier. character is used to identify the newly generated Kamf. This situation usually occurs in the context of AMF changes. If the second key identifier is not generated, it may happen that the AMF does not change, that is, the Kamf generated by the current AMF continues to be used by itself.
606、AMF向UE发送第二密钥标识符。606. The AMF sends the second key identifier to the UE.
AMF触发第二主鉴权流程后,AMF发起第二主鉴权流程:AMF向AUSF请求对UE进行鉴权;AUSF向UDM请求鉴权向量;UDM生成鉴权向量,并根据选择的主鉴权方法确定发送生成的鉴权向量还是处理后的鉴权向量发送给AUSF,AMF获取来自AUSF的鉴权向量后,AMF向UE发送第二鉴权请求消息,该第二鉴权请求消息包括第二密钥标识符, 该第二鉴权请求消息用于触发UE与网络的第二鉴权(也称为第二主鉴权流程)。本申请实施例中,以密钥标识符是ngKSI为例进行说明,可以理解的是,该密钥标识符还可以是其它标识,此处不作限制。具体流程可以参考标准TS 33.501版本17.1.0中章节6.1.3的描述。After the AMF triggers the second main authentication process, the AMF initiates the second main authentication process: the AMF requests the AUSF to authenticate the UE; the AUSF requests the UDM for the authentication vector; the UDM generates the authentication vector, and according to the selected main authentication The method determines whether to send the generated authentication vector or the processed authentication vector to the AUSF. After the AMF obtains the authentication vector from the AUSF, the AMF sends a second authentication request message to the UE, and the second authentication request message includes the second authentication request message. The key identifier, the second authentication request message is used to trigger the second authentication between the UE and the network (also referred to as the second main authentication process). In the embodiments of the present application, the key identifier is ngKSI as an example for description. It can be understood that the key identifier may also be other identifiers, which is not limited here. For the specific process, please refer to the description in Section 6.1.3 of Standard TS 33.501 Version 17.1.0.
示例性的,该第二密钥标识符为ngKSI#2,该第二密钥标识符与第二中间密钥对应。本申请实施例中,以中间密钥为Kausf为例进行说明。则该第二中间密钥为Kausf#2。Exemplarily, the second key identifier is ngKSI#2, and the second key identifier corresponds to the second intermediate key. In the embodiment of the present application, the intermediate key is Kausf as an example for description. Then the second intermediate key is Kausf#2.
示例性的,AMF通过“Authentication Request”消息向UE发送该第二密钥标识符。该第二密钥标识符可以是ngKSI#2。Exemplarily, the AMF sends the second key identifier to the UE through an "Authentication Request" message. The second key identifier may be ngKSI#2.
607a、UE和AMF交互完成第二主鉴权流程。607a, the UE and the AMF interact to complete the second primary authentication process.
UE、AMF和AUSF继续完成第二主鉴权流程。具体的主鉴权流程,与前述步骤603类似,此处不作赘述。The UE, AMF and AUSF continue to complete the second primary authentication process. The specific main authentication process is similar to the foregoing step 603, and will not be repeated here.
607b、存储第二中间密钥。607b. Store the second intermediate key.
AUSF存储该第二密钥标识符对应的中间密钥,为了区分第一主鉴权流程中的第一中间密钥,将该第二密钥标识符对应的中间密钥称为第二中间密钥。该第二中间密钥可以是Kausf#2。具体地,在AUSF在验证UE是真实的之后,存储Kausf#1。需要说明的是,AUSF不会收到第二密钥标识符,因此,AUSF最终只是存储Kausf#2和UE的永久标识的对应关系。The AUSF stores the intermediate key corresponding to the second key identifier. In order to distinguish the first intermediate key in the first primary authentication process, the intermediate key corresponding to the second key identifier is called the second intermediate key. key. The second intermediate key may be Kausf#2. Specifically, after the AUSF verifies that the UE is authentic, Kausf#1 is stored. It should be noted that the AUSF will not receive the second key identifier, so the AUSF finally only stores the correspondence between Kausf#2 and the permanent identifier of the UE.
608、AMF确定是否激活第二安全上下文。608. The AMF determines whether to activate the second security context.
AMF确定是否激活该第二中间密钥对应的安全上下文,为了区分第一中间密钥对应的第一安全上下文,将该第二中间密钥对应的中间密钥安全上下称为第二安全上下文。该第二安全上下文包括但不限于:基于中间密钥生成的5G NAS安全上下文和/或5G AS安全上下文。因此,AMF确定是否激活第二安全上下文,是指是否激活基于中间密钥生成的5G NAS安全上下文和/或5G AS安全上下文。The AMF determines whether to activate the security context corresponding to the second intermediate key. In order to distinguish the first security context corresponding to the first intermediate key, the security context of the intermediate key corresponding to the second intermediate key is referred to as the second security context. The second security context includes but is not limited to: the 5G NAS security context and/or the 5G AS security context generated based on the intermediate key. Therefore, the AMF determines whether to activate the second security context, which refers to whether to activate the 5G NAS security context and/or the 5G AS security context generated based on the intermediate key.
AMF确定是否激活第二安全上下文。下面对多种可能的实施方式进行说明:The AMF determines whether to activate the second security context. Several possible implementations are described below:
在一种可能的实现方式中,若发生了主鉴权流程,并且主鉴权流程仅仅用于对UE进行鉴权,则不需要激活第二安全上下文。即不需要进一步使用基于Kausf#2生成的5G NAS密钥和5G AS密钥,或者UE和AMF不需要进一步生成基于Kausf#2生成的5G NAS密钥和5G AS密钥。示例性的场景如下:运营商配置出现如下场景时,触发UE鉴权,且不激活第二安全上下文,该场景包括但不限于:UE断网(UE与为该UE提供通信服务的网络设备断开连接);AMF数据发生迁移,即从AMF#1迁移至AMF#2。在另一种可能的实现方法中,若主鉴权流程的触发原因是为了更新5G NAS安全上下文或者5G AS安全上下文,则AMF确定需要激活第二安全上下文。比如,AMF确定主鉴权流程触发是因为NAS COUNT翻转,或者因为基站请求新密钥。例如,当NAS COUNT即将翻转的时候,AMF会触发主鉴权流程生成新的5G NAS安全上下文,并通过NAS SMC流程激活生成的5G NAS安全上下文。In a possible implementation manner, if the main authentication process occurs and the main authentication process is only used to authenticate the UE, the second security context does not need to be activated. That is, there is no need to further use the 5G NAS key and 5G AS key generated based on Kausf#2, or the UE and AMF do not need to further generate the 5G NAS key and 5G AS key generated based on Kausf#2. An exemplary scenario is as follows: when the operator configures the following scenarios, the UE authentication is triggered and the second security context is not activated. open connection); AMF data is migrated, that is, migrated from AMF#1 to AMF#2. In another possible implementation method, if the triggering reason for the main authentication process is to update the 5G NAS security context or the 5G AS security context, the AMF determines that the second security context needs to be activated. For example, the AMF determines that the primary authentication procedure is triggered because the NAS COUNT rolls over, or because the base station requests a new key. For example, when the NAS COUNT is about to be overturned, the AMF will trigger the main authentication process to generate a new 5G NAS security context, and activate the generated 5G NAS security context through the NAS SMC process.
在另一种可能的实现方法中,发生了主鉴权流程,并且主鉴权流程是因为其他功能网元请求而触发的。比如,当主鉴权流程是AUSF请求的用于更新基于Kakma时,AMF确定不需要激活第二安全上下文。再比如,主鉴权流程是来自SMF、UDM为了同步UE状态 触发的,则AMF确定不需要激活第二安全上下文。再比如,如果终端设备发送的是初始注册请求消息,AMF因为无法找到UE的5G安全上下文而触发的主鉴权流程,则AMF确定不要激活第二安全上下文。In another possible implementation method, the main authentication process occurs, and the main authentication process is triggered by the request of other functional network elements. For example, when the main authentication procedure is requested by the AUSF for updating the Kakma-based, the AMF determines that the second security context does not need to be activated. For another example, if the main authentication process is triggered by the SMF and the UDM in order to synchronize the UE state, the AMF determines that the second security context does not need to be activated. For another example, if the initial registration request message sent by the terminal device is the main authentication process triggered by the AMF because the 5G security context of the UE cannot be found, the AMF determines not to activate the second security context.
在另一种可能的实现方式中,发生了主鉴权流程,并且主鉴权流程的触发条件不是为了更新5G NAS安全上下文,则可以默认不需要激活第二安全上下文。In another possible implementation manner, if the main authentication process occurs, and the triggering condition of the main authentication process is not to update the 5G NAS security context, the second security context does not need to be activated by default.
在另一种可能的实现方式中,发生了主鉴权流程,在AMF无法明确是激活第二安全上下文的时候,则AMF可以默认激活第二安全上下文。例如:当AMF无法确定是否激活该第二安全上下文时,AMF默认激活该第二安全上下文。或者AMF可以默认继续使用第一安全上下文。例如:当AMF无法确定是否激活该第二安全上下文时,AMF默认继续使用第一安全上下文。需要说明的是,AMF可以根据上述的至少一个条件进行判断。当同时出现多个条件的时候,则需要综合考虑。具体地,例如,如果出现了需要激活第二安全上下文的触发条件出现,则AMF必须激活第二安全上下文。比如,AMF被本地策略触发鉴权的同时发现了NAS COUNT即将翻转,则AMF根据NAS COUNT即将翻转确定需要激活第二安全上下文。In another possible implementation manner, the main authentication process occurs, and when the AMF cannot clearly activate the second security context, the AMF may activate the second security context by default. For example, when the AMF cannot determine whether to activate the second security context, the AMF activates the second security context by default. Or AMF may continue to use the first security context by default. For example, when the AMF cannot determine whether to activate the second security context, the AMF continues to use the first security context by default. It should be noted that the AMF may make a judgment according to at least one of the above conditions. When multiple conditions appear at the same time, comprehensive consideration is required. Specifically, for example, if a triggering condition that requires activation of the second security context occurs, the AMF must activate the second security context. For example, when the AMF is authenticated by the local policy and finds that the NAS COUNT is about to be rolled over, the AMF determines that the second security context needs to be activated according to the about to roll over of the NAS COUNT.
在另一种可能的实现方式中,发生了主鉴权流程,并且主鉴权流程是因为终端设备触发的。则AMF要判断是否需要更新NAS密钥或者AS密钥,在不需要更新的情况下则可以不激活第二安全上下文;在需要更新的情况下则激活第二安全上下文;在不确定的情况下默认激活第二安全上下文。In another possible implementation manner, the main authentication process occurs, and the main authentication process is triggered by the terminal device. Then the AMF needs to determine whether the NAS key or the AS key needs to be updated. If the update is not required, the second security context may not be activated; if the update is required, the second security context is activated; in the case of uncertainty The second security context is activated by default.
在另一种可能的实现方式中,没有发生主鉴权流程,并且AMF收到了第一网元的更新密钥的请求消息,AMF根据该更新密钥的请求消息,触发第二鉴权。第一网元包括以下任一个但不限于:AAnF、边缘配置服务器(Elastic Compute Service,ECS)、边缘使能服务器EES或者移动边缘计算MEC功能网元。则在AMF生成第二安全上下文后,确定不激活第二安全上下文。In another possible implementation manner, the primary authentication process does not occur, and the AMF receives a request message for updating the key of the first network element, and the AMF triggers the second authentication according to the request message for updating the key. The first network element includes any one of the following but is not limited to: AAnF, an edge configuration server (Elastic Compute Service, ECS), an edge enabling server EES, or a mobile edge computing MEC functional network element. Then, after the AMF generates the second security context, it is determined not to activate the second security context.
步骤608后,当AMF确定需要激活第二安全上下文时,进入步骤609;当AMF确定不需要激活该第二安全上下文时,进入步骤612。After step 608, when the AMF determines that the second security context needs to be activated, the process proceeds to step 609; when the AMF determines that the second security context does not need to be activated, the process proceeds to step 612.
609、若确定激活,则NAS SMC流程#2中,在主鉴权流程发生的情况下,AMF向UE发送第二密钥标识符。在主鉴权流程没有发生的情况下,AMF向UE发送第一密钥标识符和第二指示信息。609. If it is determined to activate, in the NAS SMC process #2, when the primary authentication process occurs, the AMF sends the second key identifier to the UE. In the case that the main authentication process does not occur, the AMF sends the first key identifier and the second indication information to the UE.
若AMF确定激活该第二安全上下文,则在NAS SMC流程#2中,AMF向UE发送第二密钥标识符。If the AMF determines to activate the second security context, in the NAS SMC process #2, the AMF sends the second key identifier to the UE.
在一种可能的实现方式中,AMF根据主鉴权触发是因为要更换NAS密钥,因此确定更新当前密钥。因此,AMF根据Kausf#2生成Kseaf#2。使用Kseaf#2生成Kamf#2。AMF选择一个加密算法和一个完整性保护算法,并进一步生成K NASint#2和K NASenc#2。可选地,AMF可以进一步生成K gNB#2,并通过N2消息将K gNB#2发送给网络设备(例如基站)。 In a possible implementation manner, the AMF is triggered according to the primary authentication because the NAS key needs to be replaced, so it is determined to update the current key. Therefore, AMF generates Kseaf#2 according to Kausf#2. Use Kseaf#2 to generate Kamf#2. AMF selects an encryption algorithm and an integrity protection algorithm, and further generates K NASint#2 and K NASenc#2 . Optionally, the AMF may further generate K gNB #2, and send K gNB #2 to a network device (eg, a base station) through an N2 message.
示例性的,AMF通过第二NAS SMC消息(“NAS Security Mode Command”消息)向UE发送该第二密钥标识符。即该第二NAS SMC消息中携带该第二密钥标识符(例如ngKSI#2)。Exemplarily, the AMF sends the second key identifier to the UE through a second NAS SMC message ("NAS Security Mode Command" message). That is, the second key identifier (eg ngKSI#2) is carried in the second NAS SMC message.
UE收到该密钥标识符后根据该密钥标识符确定后续使用的密钥。当该密钥标识符为第二密钥标识符时,UE需要使用该第二密钥标识符对应的密钥材料,即UE需要使用基于第二中间密钥生成的5G NAS密钥。具体地,UE根据Kausf#2生成Kseaf#2。使用Kseaf#2生成Kamf#2。再使用Kamf#2和NAS SMC中携带的选择的安全算法生成K NASint#2和K NASenc#2。UE使用K NASint#2验证NAS SMC的完整性保护。此外,UE还要验证第二NAS SMC消息中携带的安全算法是否与UE在注册请求消息中携带的相同。在验证通过后,UE开始使用K NASint#2和K NASenc#2对后续发送的NAS消息进行完整性保护和加密保护,对后续收到的NAS消息进行完整性保护验证和解密。 After receiving the key identifier, the UE determines the key to be used subsequently according to the key identifier. When the key identifier is the second key identifier, the UE needs to use the key material corresponding to the second key identifier, that is, the UE needs to use the 5G NAS key generated based on the second intermediate key. Specifically, the UE generates Kseaf#2 according to Kausf#2. Use Kseaf#2 to generate Kamf#2. Then use Kamf#2 and the selected security algorithm carried in the NAS SMC to generate K NASint#2 and K NASenc#2 . The UE uses K NASint#2 to verify the integrity protection of the NAS SMC. In addition, the UE also needs to verify whether the security algorithm carried in the second NAS SMC message is the same as that carried in the registration request message by the UE. After the verification is passed, the UE starts to use K NASint#2 and K NASenc#2 to perform integrity protection and encryption protection on the subsequently sent NAS messages, and perform integrity protection verification and decryption on the subsequently received NAS messages.
610、UE存储与第二密钥标识符对应的第二中间密钥。610. The UE stores the second intermediate key corresponding to the second key identifier.
UE收到NAS SMC消息后,UE存储该第二密钥标识符,并且UE存储于该第二密钥标识符对应的第二中间密钥。示例性的,UE存储ngKSI#2和Kausf#2(Kausf#2与ngKSI#2对应)。After the UE receives the NAS SMC message, the UE stores the second key identifier, and the UE stores the second intermediate key corresponding to the second key identifier. Exemplarily, the UE stores ngKSI#2 and Kausf#2 (Kausf#2 corresponds to ngKSI#2).
激活操作具体如下:创建安全功能函数,并将更新的密钥放置入该安全函数中使用。UE删除或停止之前使用的安全函数。The activation operation is as follows: create a security function function, and put the updated key into the security function for use. The UE deletes or stops the security function used before.
UE回复NAS SMP消息(“NAS Security Mode complete”消息)至AMF。The UE replies with a NAS SMP message ("NAS Security Mode complete" message) to the AMF.
611、AMF不激活新的AS密钥。611. AMF does not activate the new AS key.
步骤611为可选步骤。AMF确定是否要更新AS密钥。如果该主鉴权触发流程是因为NAS密钥需要更新,比如NAS计数器值即将翻转。为了节省UE的复杂度,AMF可以确定不更新AS密钥。则,AMF在激活该第二安全上下文时,不激活该第二密钥标识符对应的AS密钥。即AMF激活的该第二安全上下文中不包括AS密钥,AMF仅激活该第二密钥标识符对应的NAS密钥。例如:AMF不激活ngKSI#2对应的AS密钥,该AS密钥包括但不限于:密钥K gNB。具体的,AMF不生成ngKSI#2对应的K gNB(AMF不生成新的K gNB#2,旧的K gNB#1对应ngKSI#1),或者AMF生成K gNB#2后,并不发送该K gNB#2至网络设备(例如基站)。 Step 611 is an optional step. AMF determines whether to update the AS key. If the primary authentication triggers the process because the NAS key needs to be updated, for example, the NAS counter value is about to roll over. In order to save the complexity of the UE, the AMF may determine not to update the AS key. Then, when the AMF activates the second security context, it does not activate the AS key corresponding to the second key identifier. That is, the second security context activated by the AMF does not include the AS key, and the AMF only activates the NAS key corresponding to the second key identifier. For example, the AMF does not activate the AS key corresponding to ngKSI#2, and the AS key includes but is not limited to: the key K gNB . Specifically, AMF does not generate K gNB corresponding to ngKSI#2 (AMF does not generate new K gNB #2, and old K gNB #1 corresponds to ngKSI#1), or after AMF generates K gNB #2, it does not send the K gNB #2 gNB #2 to network equipment (eg base station).
612、若不激活第二安全上下文,则NAS SMC流程#2中,AMF向UE发送第一密钥标识符。612. If the second security context is not activated, in the NAS SMC process #2, the AMF sends the first key identifier to the UE.
或者AMF向UE发送第二密钥标识符和第三指示信息。Or the AMF sends the second key identifier and the third indication information to the UE.
可选地,当主鉴权流程没有发生的情况下,若AMF向UE发送第一密钥标识符,则第二NAS SMC消息中还可以携带一个第三指示信息。具体地,第三指示信息用于告知UE不需要更新当前使用的NAS安全上下文和AS安全上下文。当前使用的NAS安全上下文也可以称为第一安全上下文中的NAS安全上下文,当前使用的AS安全上下文也可以称为第一安全上下文中的AS安全上下文。本申请实施例中NAS安全上下文可以是5G NAS安全上下文,AS安全上下文可以是5G AS安全上下文。Optionally, when the main authentication process does not occur, if the AMF sends the first key identifier to the UE, the second NAS SMC message may also carry a third indication information. Specifically, the third indication information is used to inform the UE that the currently used NAS security context and AS security context do not need to be updated. The currently used NAS security context may also be referred to as the NAS security context in the first security context, and the currently used AS security context may also be referred to as the AS security context in the first security context. In this embodiment of the present application, the NAS security context may be a 5G NAS security context, and the AS security context may be a 5G AS security context.
第三指示信息的具体形式本实施例不做具体限定,可以是比特位指示信息,也可以是枚举类型信息,还可以通过有没有出现进行指示,比如第二NAS SMC消息出现了第三指示信息则不更新当前使用的5G NAS安全上下文和5G AS安全上下文,第二NAS SMC消息中没有出现则指示UE需要更新当前使用的5G NAS安全上下文和5G AS安全上下文。The specific form of the third indication information is not specifically limited in this embodiment. It may be bit indication information, or enumeration type information, or it may be indicated by whether it appears or not. For example, a third indication appears in the second NAS SMC message. The information does not update the currently used 5G NAS security context and 5G AS security context. If it does not appear in the second NAS SMC message, it indicates that the UE needs to update the currently used 5G NAS security context and 5G AS security context.
若不激活,则在NAS SMC流程#2中,AMF向UE发送第二NAS SMC消息,该第二NAS SMC消息包括第一密钥标识符。第一密钥标识符标识的NAS密钥是AMF和UE当前正在使用的密钥。If not activated, in NAS SMC process #2, the AMF sends a second NAS SMC message to the UE, where the second NAS SMC message includes the first key identifier. The NAS key identified by the first key identifier is the key currently being used by the AMF and the UE.
在一种可能的实现方式中,AMF根据主鉴权触发原因初步确定不需要更新当前密钥。进一步,AMF可以选择一个安全算法,安全算法包括:加密算法和完整性保护算法,并对比跟当前第一密钥标识符标识的正在使用的安全算法是否相同。如果相同,则最终确定不做任何处理,即不更新密钥。如果不同,则需要通过NAS SMC流程#2更新密钥,激活第二安全上下文。示例性的,AMF通过第二NAS SMC消息(“NAS Security Mode Command”消息)向UE发送该第一密钥标识符。即该第二NAS SMC消息中携带该第一密钥标识符(例如ngKSI#1)。具体地,AMF将第一密钥标识符使用的加密算法和/或完整性保护算法作为选择的安全算法放入到第二NAS SMC消息中。该第二NAS SMC消息使用第一密钥标识符对应的K NASint-1进行完整性保护和/或使用K NASenc-1进行机密性保护。 In a possible implementation manner, the AMF preliminarily determines that the current key does not need to be updated according to the triggering cause of the primary authentication. Further, the AMF may select a security algorithm, the security algorithm includes: an encryption algorithm and an integrity protection algorithm, and compare whether the security algorithm is the same as the currently used security algorithm identified by the current first key identifier. If it is the same, it is finalized to do nothing, i.e. not update the key. If different, the key needs to be updated through the NAS SMC process #2 to activate the second security context. Exemplarily, the AMF sends the first key identifier to the UE through a second NAS SMC message ("NAS Security Mode Command" message). That is, the second NAS SMC message carries the first key identifier (eg, ngKSI#1). Specifically, the AMF puts the encryption algorithm and/or the integrity protection algorithm used by the first key identifier into the second NAS SMC message as the selected security algorithm. The second NAS SMC message uses K NASint-1 corresponding to the first key identifier for integrity protection and/or K NASenc-1 for confidentiality protection.
在另一种实现方式中,没有发生主鉴权流程。AMF生成了Kamf#2,但是没有生成第二密钥标识符时,AMF确定不需要激活第二安全上下文。为了让UE与AMF之间的密钥同步,则第二NAS SMC消息中包括第二指示信息(Kamf change),第二指示信息指示UE需要生成新的Kamf,称为Kamf#2(UE原来使用的Kamf称为Kamf#1)。可选的,AMF在第二NAS SMC消息中携带第一密钥标识符,可选的,第二NAS SMC消息还携带第三指示信息。In another implementation, no primary authentication process occurs. When the AMF generates Kamf#2, but does not generate the second key identifier, the AMF determines that the second security context does not need to be activated. In order to synchronize the keys between the UE and the AMF, the second NAS SMC message includes second indication information (Kamf change), which indicates that the UE needs to generate a new Kamf, which is called Kamf#2 (the original used by the UE The Kamf is called Kamf#1). Optionally, the AMF carries the first key identifier in the second NAS SMC message, and optionally, the second NAS SMC message also carries third indication information.
在另一种实现方式中,没有发生主鉴权流程,但是AMF生成了Kamf#2和第二密钥标识符,AMF确定不需要激活第二安全上下文。为了让UE与AMF之间的密钥同步,则AMF向UE发送第二指示信息,第二指示信息告知UE需要生成新的Kamf,称为Kamf#2。若AMF获得了第二密钥标识符,则第二NAS SMC消息中携带第一密钥标识符和第二指示信息,或者第二NAS SMC消息中携带第二密钥标识符、第三指示信息和第二指示信息。In another implementation, the primary authentication process does not occur, but the AMF generates Kamf#2 and the second key identifier, and the AMF determines that the second security context does not need to be activated. In order to synchronize the keys between the UE and the AMF, the AMF sends the second indication information to the UE, and the second indication information informs the UE that a new Kamf needs to be generated, which is called Kamf#2. If the AMF obtains the second key identifier, the second NAS SMC message carries the first key identifier and the second indication information, or the second NAS SMC message carries the second key identifier and the third indication information and second indication information.
UE收到第二NAS SMC消息后,如果第二NAS SMC消息有加密保护,则UE使用当前UE正在使用的密钥对消息进行解密保护。After the UE receives the second NAS SMC message, if the second NAS SMC message is encrypted and protected, the UE decrypts and protects the message using the key currently being used by the UE.
具体的,UE收到第二NAS SMC消息后,UE使用当前UE正在使用的密钥对消息进行完整性保护验证。并验证第二NAS SMC消息中携带的安全算法是否与UE在注册请求消息中携带的安全算法相同,安全算法包括:UE的完整性保护算法和加密算法。在所有验证通过后,UE根据该第一密钥标识符确定后续使用的密钥。下面对不同方案分别进行描述:Specifically, after the UE receives the second NAS SMC message, the UE performs integrity protection verification on the message using the key currently being used by the UE. And verify whether the security algorithm carried in the second NAS SMC message is the same as the security algorithm carried by the UE in the registration request message, and the security algorithm includes: the integrity protection algorithm and the encryption algorithm of the UE. After all verifications are passed, the UE determines the key to be used subsequently according to the first key identifier. The different schemes are described below:
(1)、当来自AMF的密钥标识符与UE的密钥标识符相同,且密钥标识符对应的安全算法与第一中间密钥对应的安全算法相同,则终端设备继续使用第一安全上下文,终端设备不作任何处理,其中,第一安全上下文对应第一中间密钥;(1), when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is the same as the security algorithm corresponding to the first intermediate key, the terminal device continues to use the first security algorithm context, the terminal device does not perform any processing, wherein the first security context corresponds to the first intermediate key;
(2)、当来自AMF的密钥标识符与UE的密钥标识符不相同,则终端设备使用第二中间密钥生成第二安全上下文,终端设备激活第二安全上下文;(2), when the key identifier from the AMF is different from the key identifier of the UE, the terminal device uses the second intermediate key to generate the second security context, and the terminal device activates the second security context;
(3)、当来自AMF的密钥标识符与UE的密钥标识符相同,且密钥标识符对应的安全算法与第一中间密钥对应的安全算法不同,则终端设备根据第一中间密钥生成第三安全上下文,终端设备激活第三安全上下文。(3), when the key identifier from the AMF is the same as the key identifier of the UE, and the security algorithm corresponding to the key identifier is different from the security algorithm corresponding to the first intermediate key, then the terminal device according to the first intermediate key The key generates a third security context, and the terminal device activates the third security context.
具体的,当该来自AMF的密钥标识符为第一密钥标识符时,UE需要使用该第一密钥标识符对应的密钥,即UE需要使用第一安全上下文和第一中间密钥。UE可以继续使用原有的中间密钥(第一中间密钥)和第一安全上下文。UE可以重新激活该第一中间密钥和第一安全上下文,此处不做限制。Specifically, when the key identifier from the AMF is the first key identifier, the UE needs to use the key corresponding to the first key identifier, that is, the UE needs to use the first security context and the first intermediate key . The UE can continue to use the original intermediate key (the first intermediate key) and the first security context. The UE may reactivate the first intermediate key and the first security context, which is not limited here.
在另一种实现方法中,UE可以对比第二NAS SMC消息中来自AMF的密钥标识符与当前UE正在使用的中间密钥的密钥标识符是否一样,UE还需要验证第二NAS SMC消息中该密钥标识符对应的安全算法与当前UE正在使用的安全算法是否相同。如果均一样,并且UE验证NAS SMC的完整性保护是正确的,则UE可以不更新第一安全上下文,继续使用当前的5G NAS安全上下文。即,使用当前的密钥和安全算法,NAS COUNT也不需要重置为0。In another implementation method, the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify the second NAS SMC message. Whether the security algorithm corresponding to the key identifier is the same as the security algorithm currently being used by the UE. If all are the same, and the UE verifies that the integrity protection of the NAS SMC is correct, the UE may continue to use the current 5G NAS security context without updating the first security context. That is, with the current key and security algorithm, the NAS COUNT does not need to be reset to 0 either.
在一种实现方法中,UE可以对比第二NAS SMC消息中来自AMF的密钥标识符与当前UE正在使用的中间密钥的密钥标识符是否一样,UE还需要验证第二NAS SMC消息中该来自AMF的密钥标识符对应的安全算法与当前UE正在使用的安全算法是否相同。如果只有后者不同(即密钥标识符一致,安全算法不一致),则UE需要使用ngKSI#1标识的Kausf#1对应的Kamf#1,使用第二NAS SMC消息携带的新的安全算法生成第三安全上下文。该第三安全上下文可以是新的5G NAS安全上下文(对应于第一中间密钥),具体地,生成新的K NAS-int和新的K NASenc,并且NAS COUNT重置为0。UE使用新生成的K NAS-int验证第二NAS SMC消息的完整性保护。可以理解的是,因为第二NAS SMC消息携带的是ngKSI#1,所以只能用ngKSI#1对应的第一中间密钥进行进一步衍生子密钥。所以只需要生成新的NAS密钥就行了。 In an implementation method, the UE can compare whether the key identifier from the AMF in the second NAS SMC message is the same as the key identifier of the intermediate key currently being used by the UE, and the UE also needs to verify that the second NAS SMC message contains the same key identifier. Whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm currently being used by the UE. If only the latter is different (that is, the key identifiers are the same, but the security algorithms are inconsistent), the UE needs to use the Kamf#1 corresponding to the Kausf#1 identified by ngKSI#1, and use the new security algorithm carried in the second NAS SMC message to generate the first Three security contexts. The third security context may be a new 5G NAS security context (corresponding to the first intermediate key), specifically, a new K NAS-int and a new K NASenc are generated, and the NAS COUNT is reset to 0. The UE verifies the integrity protection of the second NAS SMC message using the newly generated K NAS-int . It can be understood that, because the second NAS SMC message carries ngKSI#1, only the first intermediate key corresponding to ngKSI#1 can be used to further derive the subkey. So just generate a new NAS key and that's it.
在另一种实现方法中,UE可以按照步骤610的描述对第一密钥标识符标识的密钥做激活操作,可以包括以下至少1个步骤:根据密钥标识#1标识的Kausf#1生成,生成Kseaf#1,使用Kseaf#1生成Kamf#1,再使用Kamf#1和第二NAS SMC消息中携带的选择的安全算法生成K NASint#1和K NASenc#1,将K NASint#1、K NASenc#1加密算法和完整性保护算法用于具体的功能,但是NAS COUNT保持不变。 In another implementation method, the UE may activate the key identified by the first key identifier according to the description in step 610, which may include at least one of the following steps: generating the key identified by the key identifier #1 according to Kausf#1 , generate Kseaf#1, use Kseaf#1 to generate Kamf#1, and then use Kamf#1 and the selected security algorithm carried in the second NAS SMC message to generate K NASint#1 and K NASenc#1 , K NASint#1, K NASint#1 , K NASenc#1 encryption algorithm and integrity protection algorithm are used for specific functions, but the NAS COUNT remains unchanged.
在另一种实现方式中,UE只对比第二NAS SMC消息中携带的来自AMF的密钥标识符与当前正在使用的密钥对应的密钥标识符是否一样,如果一样,并且对第二NAS SMC消息的完整性保护校验成功,则不更新第一安全上下文,继续使用当前的5G NAS安全上下文。In another implementation manner, the UE only compares whether the key identifier from the AMF carried in the second NAS SMC message is the same as the key identifier corresponding to the key currently being used. If the integrity protection check of the SMC message is successful, the first security context will not be updated, and the current 5G NAS security context will continue to be used.
在AMF可以不生成第二密钥标识符的情况下,NAS SMC#2中还携带了第二指示信息时,UE进一步检查是否收到第三指示信息。如果UE收到第三指示信息,则UE只生成新的Kamf(生成Kamf#2),不更新5G NAS和/或5G AS安全上下文。In the case that the AMF may not generate the second key identifier, and the NAS SMC#2 also carries the second indication information, the UE further checks whether the third indication information is received. If the UE receives the third indication information, the UE only generates a new Kamf (generates Kamf#2), and does not update the 5G NAS and/or 5G AS security context.
在标准规定每次Kamf变化都会生成第二密钥标识符的情况下,如果NAS SMC#2中携带第一密钥标识符,则终端设备继续使用第一安全上下文,即只需要生成Kamf#2,不再作其他任何处理。也就是说,终端设备可以继续使用基于Kausf#1生成的5G NAS安全上文和5G AS安全上下文。或者,如果NAS SMC#2中携带第二密钥标识符和第三指示信息,则终端设备只需要生成Kamf#2,不再作其他任何处理。In the case where the standard stipulates that the second key identifier will be generated every time the Kamf changes, if the NAS SMC#2 carries the first key identifier, the terminal device will continue to use the first security context, that is, only the Kamf#2 needs to be generated , and no other processing will be performed. That is to say, the terminal device can continue to use the 5G NAS security context and 5G AS security context generated based on Kausf#1. Alternatively, if the NAS SMC#2 carries the second key identifier and the third indication information, the terminal device only needs to generate Kamf#2, and no other processing is required.
本申请实施例中,当UE仅需要进行鉴权时,UE侧与网络侧均不需要更新新的安全上下文,降低密钥更新复杂度,提升设备性能。In this embodiment of the present application, when the UE only needs to perform authentication, neither the UE side nor the network side need to update a new security context, which reduces the complexity of key update and improves device performance.
下面,结合前述实施例介绍本申请实施例提出的一种应用场景。该应用场景中,中间密钥为Kausf,安全上下文为Kaf。需要说明的是,上述中间密钥与安全上下文仅做示例性说明,安全上下文还可以是基于中间密钥生成的其它密钥、安全算法,或者密钥的变形,此处不作限制。具体的,请参阅图7,图7为本申请实施例提出的一种应用场景示意图,包括:In the following, an application scenario proposed by the embodiments of the present application is introduced in conjunction with the foregoing embodiments. In this application scenario, the intermediate key is Kausf, and the security context is Kaf. It should be noted that the above-mentioned intermediate keys and security contexts are only illustrative, and the security contexts may also be other keys generated based on the intermediate keys, security algorithms, or key variants, which are not limited here. Specifically, please refer to FIG. 7, which is a schematic diagram of an application scenario proposed by an embodiment of the present application, including:
701、UE向AMF发送注册请求消息。701. The UE sends a registration request message to the AMF.
702、AMF向UE发送第一密钥标识符。702. The AMF sends the first key identifier to the UE.
703、UE和AMF交互完成第一主鉴权流程。703. The UE interacts with the AMF to complete the first primary authentication process.
704、NAS SMC流程#1。704. NAS SMC process #1.
步骤701-704与前述步骤601-604一致,此处不做赘述。Steps 701-704 are the same as the aforementioned steps 601-604, and are not repeated here.
705、存储Kausf#1,并生成Kakma#1。705. Store Kausf#1, and generate Kakma#1.
AUSF在第一主鉴权流程结束后,存储Kausf#1,并根据该Kausf#1生成Kakma#1。After the first main authentication process ends, the AUSF stores Kausf#1, and generates Kakma#1 according to the Kausf#1.
为了便于区分,将步骤705中存储Kausf#1的AUSF称为AUSF#1。For the convenience of distinction, the AUSF storing Kausf#1 in step 705 is called AUSF#1.
706、生成Kakma#1。706. Generate Kakma#1.
NAS SMC流程#1结束后,UE根据Kausf#1生成Kakma#1。After the NAS SMC process #1 ends, the UE generates Kakma#1 according to Kausf#1.
707、生成Kaf#1(A-KID#1)。707. Generate Kaf#1 (A-KID#1).
当UE生成Kakma#1后,UE向AF发送A-KID,该A-KID与Kakma#1对应,因此将该A-KID称为A-KID#1。该A-KID#1用于生成对应的Kaf,该Kaf称为Kaf#1。After the UE generates Kakma#1, the UE sends an A-KID to the AF, and the A-KID corresponds to Kakma#1, so the A-KID is called A-KID#1. The A-KID#1 is used to generate a corresponding Kaf, which is called Kaf#1.
具体的生成Kaf#1的流程,请参阅前述步骤402-406,此处不做赘述。For the specific process of generating Kaf#1, please refer to the aforementioned steps 402-406, which will not be repeated here.
708、当Kaf#1即将过期,AF向AAnF发送第一密钥请求消息,该第一密钥请求消息携带A-KID#1。708. When Kaf#1 is about to expire, the AF sends a first key request message to AAnF, where the first key request message carries A-KID#1.
当AF确定Kaf#1即将过期,AF向AAnF发送第一密钥请求消息,该第一密钥请求消息携带A-KID#1。When the AF determines that Kaf#1 is about to expire, the AF sends a first key request message to the AAnF, where the first key request message carries A-KID#1.
可选地,当AF有该UE的标识信息的时候,AF在该第一密钥请求消息中携带UE的标识信息。Optionally, when the AF has the identification information of the UE, the AF carries the identification information of the UE in the first key request message.
具体的,该AF为运营商外部的AF时,该UE的标识信息可以是GPSI;当该AF为运营商内部的AF时,该UE的标识信息可以是SUPI。A-KID#1为UE在首次接入AF的时候获得的,AF保存了该A-KID#1。Specifically, when the AF is an AF outside the operator, the identification information of the UE may be GPSI; when the AF is an AF within the operator, the identification information of the UE may be SUPI. The A-KID#1 is obtained when the UE accesses the AF for the first time, and the AF stores the A-KID#1.
709、AAnF根据该第一密钥请求消息,确定A-KID#1是否存在。709. The AAnF determines whether A-KID#1 exists according to the first key request message.
AAnF根据该第一密钥请求消息,确定A-KID#1是否存在。当该第一密钥请求消息携带A-KID#1,则AAnF检查本地是否存在与该A-KID#1相同的A-KID。The AAnF determines whether A-KID#1 exists according to the first key request message. When the first key request message carries A-KID#1, the AAnF checks whether the same A-KID as the A-KID#1 exists locally.
当该第一密钥请求消息中携带有UE的标识信息的时候,AAnF进一步确定是否存在Kakma#2,Kakma#2为更新的Kakma。Kakma#1为相对于由第一中间密钥(Kausf#1)生成的密钥,因此Kakma#2为更新的Kakma,Kakma#2由第二中间密钥(Kausf#2)生成。When the first key request message carries the identity information of the UE, the AAnF further determines whether Kakma#2 exists, and Kakma#2 is the updated Kakma. Kakma#1 is relative to the key generated by the first intermediate key (Kausf#1), so Kakma#2 is the updated Kakma, which is generated by the second intermediate key (Kausf#2).
若存在A-KID#1,进入步骤710。If A-KID#1 exists, go to step 710 .
若AAnF确定本地没有在该A-KID#1,则AAnF使用该第一密钥请求消息中携带的UE的标识信息确定是否有Kakma#2。如果有,则进入步骤717(步骤710-716b不执行)。如果没有,则在响应消息中(步骤717中,步骤710-716b不执行)返回一个失败消息码,指示Kakma无法找到。If the AAnF determines that the A-KID#1 is not present locally, the AAnF determines whether there is Kakma#2 by using the identification information of the UE carried in the first key request message. If so, go to step 717 (steps 710-716b are not executed). If not, a failure message code is returned in the response message (in step 717, steps 710-716b are not performed), indicating that Kakma could not be found.
该第一密钥请求请求消息可以是“Naanf_AKMA_ApplicationKey_Get request”消息。The first key request request message may be a "Naanf_AKMA_ApplicationKey_Get request" message.
710、若存在A-KID#1,则AAnF向AUSF发送第二密钥请求消息,该第二密钥请求消息携带UE的永久标识信息。710. If A-KID#1 exists, the AAnF sends a second key request message to the AUSF, where the second key request message carries the permanent identification information of the UE.
可选地,该第二密钥请求消息携带第一指示信息。该第一指示信息与第二网元关联,第一指示信息指示终端设备更新终端设备与第二网元之间的通信密钥。第二网元包括以下任一个但不限于NEF、AAnF、ECS、EES或AF。示例性的,当第二网元为AF时,第一指示信息可以是AF的标识信息。Optionally, the second key request message carries the first indication information. The first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element. The second network element includes any of the following but not limited to NEF, AAnF, ECS, EES or AF. Exemplarily, when the second network element is an AF, the first indication information may be identification information of the AF.
在AAnF发送第二密钥请求消息前,AAnF选择AUSF。AAnF可以通过多种方式确定为该UE提供服务器的AUSF。下面分别进行说明:Before the AAnF sends the second key request message, the AAnF selects the AUSF. The AAnF can determine the AUSF that provides the server for the UE in various ways. The following are respectively explained:
(1)、AAnF根据该A-KID#1对应的UE的永久标识信息(SUPI),从UDM确定为该UE提供服务的AUSF。该AUSF称为AUSF#1。具体的,UDM根据该UE的标识信息确定AUSF,该AUSF中存储Kausf#1。由于该AUSF接收UDM发送的该UE支持AKMA业务指示信息(即AUSF#1与该UDM之间已执行前述步骤302-303),因此该AUSF确认该UE支持AKMA业务。本申请实施例中,AKMA业务指示信息可以是“AKMA Indication(AKMA Ind)”或“AKMA ID”,不作限定。(1) The AAnF determines the AUSF that serves the UE from the UDM according to the permanent identification information (SUPI) of the UE corresponding to the A-KID#1. This AUSF is called AUSF#1. Specifically, the UDM determines an AUSF according to the identification information of the UE, and Kausf#1 is stored in the AUSF. Since the AUSF receives the indication information sent by the UDM that the UE supports the AKMA service (that is, the foregoing steps 302-303 have been performed between AUSF#1 and the UDM), the AUSF confirms that the UE supports the AKMA service. In this embodiment of the present application, the AKMA service indication information may be "AKMA Indication (AKMA Ind)" or "AKMA ID", which is not limited.
(2)、AAnF根据A-KID#1中的RID,向NRF请求获取AUSF,该AUSF可以为该UE提供服务。该AUSF可以是AUSF#1,也可以是其它的AUSF(例如AUSF#2)。若该AUSF为AUSF#2,由于该AUSF#2未收到该UE支持AKMA业务指示信息,因此该AUSF#2无法确认该UE是否支持AKMA业务。AUSF#2与UDM之间需要通过前述步骤302-303,使得AUSF#2获取该UE的AKMA业务指示信息。(2) The AAnF requests the NRF to acquire an AUSF according to the RID in A-KID#1, and the AUSF can provide services for the UE. The AUSF may be AUSF#1, or may be another AUSF (eg, AUSF#2). If the AUSF is AUSF#2, since the AUSF#2 has not received the indication information that the UE supports the AKMA service, the AUSF#2 cannot confirm whether the UE supports the AKMA service. The foregoing steps 302-303 need to be passed between AUSF#2 and the UDM, so that AUSF#2 obtains the AKMA service indication information of the UE.
具体的,该第二密钥请求消息用于指示AMF确定不激活第二安全上下文。可选的,该第二密钥请求消息中携带指示信息,该指示信息用于指示AMF确定不激活第二安全上下文。可选的,该第二密钥请求消息中携带AF的标识信息,该AF的标识信息用于指示AMF不激活第二安全上下文。Specifically, the second key request message is used to instruct the AMF to determine not to activate the second security context. Optionally, the second key request message carries indication information, where the indication information is used to instruct the AMF to determine not to activate the second security context. Optionally, the second key request message carries the identification information of the AF, where the identification information of the AF is used to indicate that the AMF does not activate the second security context.
UE的标识信息可以是SUPI或者SUCI,AF的标识信息可以是AF_ID。该UE的标识信息用于通知AUSF确定该UE相关的数据(例如Kausf#1已经该UE的AKMA业务指示信息)。该AF的标识信息还用于通知AUSF是哪个AF的密钥需要更新。The identification information of the UE may be SUPI or SUCI, and the identification information of the AF may be AF_ID. The identification information of the UE is used to notify the AUSF to determine the data related to the UE (for example, Kausf#1 and the AKMA service indication information of the UE). The identification information of the AF is also used to inform the AUSF of which AF's key needs to be updated.
需要说明的是,该第二密钥请求消息中可以不包括第一指示信息,第一指示信息可以通过其它方式发送至UE,此处不做限制。It should be noted that the second key request message may not include the first indication information, and the first indication information may be sent to the UE in other ways, which is not limited here.
在另一种实现方式中,AAnF可以直接向AMF发送第三鉴权请求消息,第三鉴权请求消息携带UE的永久标识信息,可选地携带AF ID。在AAnF发送该消息前,AAnF要确定可以为UE服务的AMF。AAnF根据UE的永久标识信息从UDM中确定为该UE提供服务的AMF。当AAnF直接向AMF发送用户第三鉴权请求消息时,步骤711和步骤712不执 行。In another implementation manner, the AAnF may directly send a third authentication request message to the AMF, where the third authentication request message carries the permanent identification information of the UE, and optionally carries the AF ID. Before the AAnF sends this message, the AAnF needs to determine the AMFs that can serve the UE. The AAnF determines the AMF serving the UE from the UDM according to the UE's permanent identity information. When the AAnF directly sends the user third authentication request message to the AMF, steps 711 and 712 are not executed.
711、AUSF确定为该UE提供服务的AMF。711. The AUSF determines an AMF serving the UE.
AUSF根据UE的永久标识信息从UDM中确定为该UE提供服务的AMF。The AUSF determines the AMF serving the UE from the UDM according to the UE's permanent identity information.
在AUSF确定为该UE提供服务的AMF前,AUSF首先确定该UE支持AKMA业务。Before the AUSF determines the AMF serving the UE, the AUSF first determines that the UE supports the AKMA service.
AAnF可以通过多种方式确定为该UE支持AKMA业务。下面分别进行说明:The AAnF may determine that the UE supports the AKMA service in various ways. The following are respectively explained:
(1)、针对步骤710中的第一种选择AUSF的方法确定AUSF#1后。由于该AUSF接收UDM发送的该UE支持AKMA业务指示信息(即AUSF#1与该UDM之间已执行前述步骤302-303),因此该AUSF确认该UE支持AKMA业务。本申请实施例中,AKMA业务指示信息可以是“AKMA Indication(AKMA Ind)”或“AKMA ID”,不作限定。(1) After determining AUSF #1 for the first method of selecting AUSF in step 710 . Since the AUSF receives the indication information sent by the UDM that the UE supports the AKMA service (that is, the foregoing steps 302-303 have been performed between AUSF#1 and the UDM), the AUSF confirms that the UE supports the AKMA service. In this embodiment of the present application, the AKMA service indication information may be "AKMA Indication (AKMA Ind)" or "AKMA ID", which is not limited.
(2)、针对步骤710中的第二种选择AUSF的方法确定AUSF后,如果该AUSF不是AUSF#1,则由于该AUSF#2未收到该UE支持AKMA业务指示信息,因此该AUSF#2无法确认该UE是否支持AKMA业务。则AUSF#2需要向UDM请求该UE是否支持AKMA业务。该过程可以是AUSF#2向UDM发送请求消息,请求消息用于向UDM请求U是否支持AKMA,消息中携带用户的永久标识SUPI。UDM可以直接回复表示支持或不支持的响应消息,或者在响应消息中携带AKMA指示信息。AUSF#2根据响应消息或者响应消息中的指示信息确定该UE是否支持AKMA业务。比如,如果响应消息是成功消息,或者携带AKMA指示信息,则确定该UE支持AKMA业务。在另一种可能的实现方式中,AUSF#2与UDM之间需要通过前述步骤302-303,使得AUSF#2获取该UE的AKMA业务指示信息。该过程可以发生在第二主鉴权流程中,也可以发在在步骤712之前。若发生在步骤712之前,意味着AUSF需要先确定该UE可以支持AKMA业务,再继续进行步骤712,即请求触发主鉴权流程。如果该过程发生在步主鉴权流程中,则AUSF在收到鉴权响应消息后,要先查看该消息中是否携带AKMA指示信息,如果携带则继续进行流程。如果不携带,则终止流程。(2) After determining the AUSF for the second method of selecting AUSF in step 710, if the AUSF is not AUSF#1, since the AUSF#2 has not received the indication information that the UE supports the AKMA service, the AUSF#2 It cannot be confirmed whether the UE supports the AKMA service. Then AUSF#2 needs to request the UDM whether the UE supports the AKMA service. This process may be that AUSF#2 sends a request message to the UDM, the request message is used to request the UDM whether the U supports AKMA, and the message carries the permanent identifier SUPI of the user. The UDM can directly reply a response message indicating support or non-support, or carry AKMA indication information in the response message. AUSF#2 determines whether the UE supports the AKMA service according to the response message or the indication information in the response message. For example, if the response message is a success message or carries AKMA indication information, it is determined that the UE supports the AKMA service. In another possible implementation manner, the foregoing steps 302-303 need to be passed between AUSF#2 and the UDM, so that AUSF#2 obtains the AKMA service indication information of the UE. This process may occur in the second main authentication process, or may be issued before step 712 . If it occurs before step 712, it means that the AUSF needs to determine that the UE can support the AKMA service, and then proceed to step 712, that is, request to trigger the main authentication process. If this process occurs in the step-master authentication process, after receiving the authentication response message, the AUSF should first check whether the message carries AKMA indication information, and if so, continue the process. If not carried, terminate the process.
确定UE是否支持AKMA是为了防止一个AAnF随机携带SUPI发起密钥更新流程。因为主鉴权流程影响UE当前业务,所以要做一定的确定性检查。The purpose of determining whether the UE supports AKMA is to prevent an AAnF from randomly carrying SUPI to initiate a key update process. Because the main authentication process affects the current service of the UE, certain deterministic checks are required.
AUSF确定为该UE提供服务的AMF后,AUSF回复响应消息至AAnF,该响应消息与第二密钥请求消息对应。After the AUSF determines the AMF serving the UE, the AUSF replies to the AAnF with a response message corresponding to the second key request message.
712、AUSF向AMF发送第三鉴权请求消息,AMF在收到该第三鉴权请求消息后,向AUSF发送响应消息。712. The AUSF sends a third authentication request message to the AMF, and after receiving the third authentication request message, the AMF sends a response message to the AUSF.
可选地,该第三鉴权请求消息指示AMF确定是否激活第二安全上下文。具体的,该第三鉴权请求消息用于请求AMF触发主鉴权流程。该第三鉴权请求消息中携带UE的永久身份信息,可选地,该第三鉴权请求消息携带指示信息,该指示信息用于指示需要触发主鉴权流程的原因值。Optionally, the third authentication request message instructs the AMF to determine whether to activate the second security context. Specifically, the third authentication request message is used to request the AMF to trigger the main authentication process. The third authentication request message carries the permanent identity information of the UE. Optionally, the third authentication request message carries indication information, where the indication information is used to indicate a reason value that needs to trigger the main authentication process.
AMF可以根据该第三鉴权请求消息,或者根据该第三鉴权请求消息中携带的指示信息确定主鉴权流程是为了更新AKMA相关密钥,则AMF确定不激活第二安全上下文。该第三鉴权请求消息可以是“initial primary authentication Request”。可选地,或者,AMF根据该指示信息判断是否需要激活第二安全上下文。若AMF判断NAS COUNT即将翻转,即 NAS COUNT翻转需要激活第二安全上下文,则AMF确定要激活第二安全上下文。The AMF may determine, according to the third authentication request message or the indication information carried in the third authentication request message, that the primary authentication process is to update the AKMA-related key, and the AMF determines not to activate the second security context. The third authentication request message may be "initial primary authentication Request". Optionally, or, the AMF determines whether the second security context needs to be activated according to the indication information. If the AMF determines that the NAS COUNT is about to be rolled over, that is, the rollover of the NAS COUNT requires the activation of the second security context, the AMF determines that the second security context is to be activated.
由于步骤709确定不存在A-KID#1,因此,该第三鉴权请求消息的最终目的是用于请求更新Kakma,即请求获取Kakma#2。可选的,该第三鉴权请求消息中携带的指示信息为该AF的标识信息,AMF可根据该AF的标识信息指示判断不激活第二安全上下文。即指示信息被用于AMF判断不激活第二安全上下文。Since it is determined in step 709 that A-KID#1 does not exist, the final purpose of the third authentication request message is to request to update Kakma, that is, to request to obtain Kakma#2. Optionally, the indication information carried in the third authentication request message is the identification information of the AF, and the AMF may determine not to activate the second security context according to the indication of the identification information of the AF. That is, the indication information is used for the AMF to judge that the second security context is not activated.
可选的,步骤712前,AUSF从UDM获取鉴权向量,具体方式与前述步骤302-303一直,此处不做赘述。Optionally, before step 712, the AUSF obtains the authentication vector from the UDM, and the specific manner is the same as the foregoing steps 302-303, which will not be repeated here.
需要说明的是,AUSF还可以通过其它消息指示AMF确定是否激活第二安全上下文,此处不作限制。该第三鉴权请求消息仅是一种示例。It should be noted that the AUSF may also instruct the AMF to determine whether to activate the second security context through other messages, which is not limited here. The third authentication request message is just an example.
713、触发第二主鉴权流程。713. Trigger the second primary authentication process.
AMF接收第三鉴权请求消息后,触发第二主鉴权流程。After receiving the third authentication request message, the AMF triggers the second main authentication process.
需要说明的是,AMF接收AUSF发送的第三鉴权请求消息仅是一种可能的示例。AMF还可以接收第一网元发送的第三鉴权请求消息,该第三鉴权请求消息携带终端设备的永久标识信息,该第三鉴权请求消息用于触发UE与网络之间的第二鉴权。It should be noted that it is only a possible example that the AMF receives the third authentication request message sent by the AUSF. The AMF may also receive a third authentication request message sent by the first network element, where the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message is used to trigger the second authentication request message between the UE and the network. Authentication.
第一网元包括以下任一个但不限于:AUSF、NEF、AAnF、ECS、EES或AF。The first network element includes any one of but not limited to: AUSF, NEF, AAnF, ECS, EES or AF.
714、AMF向UE发送第二密钥标识符。714. The AMF sends the second key identifier to the UE.
步骤715是步骤713中的一部分,具体的,AMF确定发起主鉴权流程,AMF向AUSF请求对UE进行鉴权,AUSF向UDM请求鉴权向量,UDM发送鉴权向量给AUSF,AUSF将鉴权向量经过处理发送给AMF。AMF在收到经过处理的鉴权向量后生成第二密钥标识符,并将第二密钥标识符随着经过处理的鉴权向量发送给UE。Step 715 is a part of step 713. Specifically, the AMF determines to initiate the main authentication process, the AMF requests the AUSF to authenticate the UE, the AUSF requests the authentication vector from the UDM, the UDM sends the authentication vector to the AUSF, and the AUSF authenticates the UE. The vector is processed and sent to the AMF. The AMF generates a second key identifier after receiving the processed authentication vector, and sends the second key identifier to the UE along with the processed authentication vector.
示例性的,AMF通过“Authentication Request”消息向UE发送该第二密钥标识符。该第二密钥标识符可以是ngKSI#2。Exemplarily, the AMF sends the second key identifier to the UE through an "Authentication Request" message. The second key identifier may be ngKSI#2.
715、UE和AMF交互完成第二主鉴权流程(AUSF获取第二密钥标识符)。715. The UE interacts with the AMF to complete the second primary authentication process (the AUSF obtains the second key identifier).
UE、AMF和AUSF继续完成第二主鉴权流程。The UE, AMF and AUSF continue to complete the second primary authentication process.
步骤715后,分别执行步骤716a与步骤720,需要说明的是,步骤716a与步骤720的执行顺序此处不做限定。After step 715, step 716a and step 720 are executed respectively. It should be noted that the execution order of step 716a and step 720 is not limited here.
716a、存储第二中间密钥。716a. Store the second intermediate key.
AUSF存储该第二密钥标识符对应的中间密钥,该第二中间密钥是Kausf#2。AUSF根据该第二中间密钥,生成Kakma#2和A-KID#2。The AUSF stores the intermediate key corresponding to the second key identifier, and the second intermediate key is Kausf#2. The AUSF generates Kakma#2 and A-KID#2 based on the second intermediate key.
716b、发送该UE的标识信息、A-KID#2和Kakma#2。716b. Send the identification information of the UE, A-KID#2 and Kakma#2.
AUSF向AAnF发送该UE的永久标识信息(SUPI)、A-KID#2和Kakma#2。The AUSF sends the UE's Permanent Identity Information (SUPI), A-KID#2 and Kakma#2 to the AAnF.
717、AAnF使用Kakma#2生成Kaf#2。717. AAnF uses Kakma#2 to generate Kaf#2.
718、AAnF向AF发送第一密钥请求响应消息,该第一密钥请求消息携带A-KID#2、Kaf#2和Kaf#2的过期时间。718. The AAnF sends a first key request response message to the AF, where the first key request message carries the expiration time of A-KID#2, Kaf#2, and Kaf#2.
AAnF向AF发送第一密钥请求响应消息,第一密钥请求响应消息可以是“Naanf_AKMA_ApplicationKey_Get response”消息。The AAnF sends a first key request response message to the AF, where the first key request response message may be a "Naanf_AKMA_ApplicationKey_Get response" message.
该第一密钥请求消息携带A-KID#2、Kaf#2和Kaf#2的过期时间。The first key request message carries the expiration time of A-KID#2, Kaf#2 and Kaf#2.
719、存储A-KID#2和Kaf#2。719. Store A-KID#2 and Kaf#2.
AF存储A-KID#2和Kaf#2。AF stores A-KID#2 and Kaf#2.
720、AMF确定是否激活第二安全上下文。720. The AMF determines whether to activate the second security context.
AMF可以在步骤712中确定,可以在步骤712到步骤721之间的任何时机确定。比如在步骤720中确定。步骤720可以理解为马上要发送721之前的动作。详细内容可以参考步骤712中的描述。The AMF may be determined in step 712 , and may be determined at any time between steps 712 and 721 . For example, it is determined in step 720 . Step 720 can be understood as an action immediately before sending 721 . For details, please refer to the description in step 712.
即,步骤712后,AMF根据来自AUSF的该第三鉴权请求消息,综合判断后,确定不激活该第二安全上下文。That is, after step 712, the AMF determines not to activate the second security context after comprehensive judgment according to the third authentication request message from the AUSF.
721、确定不激活,则NAS SMC流程#2携带第一密钥标识符。721. It is determined that it is not activated, and the NAS SMC process #2 carries the first key identifier.
若不激活,则在NAS SMC流程#2中,AMF向UE发送第一密钥标识符。If not activated, in NAS SMC procedure #2, the AMF sends the first key identifier to the UE.
示例性的,AMF通过NAS SMC消息(“NAS Security Mode Command”消息)向UE发送该第一密钥标识符。即该NAS SMC消息中携带该第一密钥标识符(例如ngKSI#1)。Exemplarily, the AMF sends the first key identifier to the UE through a NAS SMC message ("NAS Security Mode Command" message). That is, the NAS SMC message carries the first key identifier (eg, ngKSI#1).
可选的,AMF还可以向UE发送更新Kakma的指示信息,该更新Kakma的指示信息用于指示UE生成Kakma#2和A-KID#2。可选的,该更新Kakma的指示信息可以是AF的标识信息(AF_ID),也可以是一个指示信息。该AF的标识信息还可以用于指示UE生成新的Kaf,即Kaf#2(UE根据AF_ID生成Kaf#2)。Optionally, the AMF may also send indication information for updating Kakma to the UE, where the indication information for updating Kakma is used to instruct the UE to generate Kakma#2 and A-KID#2. Optionally, the indication information for updating the Kakma may be the identification information (AF_ID) of the AF, or may be an indication information. The identification information of the AF can also be used to instruct the UE to generate a new Kaf, that is, Kaf#2 (the UE generates Kaf#2 according to the AF_ID).
722、UE存储与第二密钥标识符对应的Kausf#2。722. The UE stores the Kausf#2 corresponding to the second key identifier.
当UE存储Kausf#2成功后,UE回复NAS SMP消息(“NAS Security Mode complete”消息)至AMF。该NAS SMP消息采用该第二密钥标识符(ngKSI#2)对应的完整性保护密钥和加密密钥进行机密性保护和完整性保护。When the UE stores Kausf#2 successfully, the UE replies a NAS SMP message ("NAS Security Mode complete" message) to the AMF. The NAS SMP message uses the integrity protection key and encryption key corresponding to the second key identifier (ngKSI#2) to perform confidentiality protection and integrity protection.
723、UE基于Kausf#2生成Kakma#2和Kaf#2,并将该AF的标识信息对应的密钥更新为Kaf#2。可选地,UE根据更新Kakma的指示信息生成Kakma#2和Kaf#2。723. The UE generates Kakma#2 and Kaf#2 based on Kausf#2, and updates the key corresponding to the identification information of the AF to Kaf#2. Optionally, the UE generates Kakma#2 and Kaf#2 according to the indication information for updating the Kakma.
724、UE向AF发送第一激活请求消息,该第一激活请求消息携带A-KID#2,该第一激活请求消息指示AF激活Kaf#2。724. The UE sends a first activation request message to the AF, where the first activation request message carries A-KID#2, and the first activation request message instructs the AF to activate Kaf#2.
当UE生成新的Kaf(即Kaf#2)后,UE发起该Kaf#2的激活流程。具体的,UE向AF发送第一激活请求消息,该第一激活请求消息携带A-KID#2,该第一激活请求消息指示AF激活Kaf#2。After the UE generates a new Kaf (ie, Kaf#2), the UE initiates the activation process of the Kaf#2. Specifically, the UE sends a first activation request message to the AF, where the first activation request message carries A-KID#2, and the first activation request message instructs the AF to activate Kaf#2.
UE根据NAS SMC携带的AF ID确定要跟哪个AF发送第一激活请求消息,即发起Kaf更新流程。The UE determines which AF to send the first activation request message with according to the AF ID carried by the NAS SMC, that is, initiates the Kaf update process.
第一激活请求消息中携带A-KID#2.The first activation request message carries A-KID#2.
可选的,步骤724与步骤723之间的时间间隔可以尽可能的小,以保证AF的正常运行。Optionally, the time interval between step 724 and step 723 may be as small as possible to ensure the normal operation of the AF.
示例性的,第一激活请求消息可以是“application session reestablishment request”消息。Exemplarily, the first activation request message may be an "application session reestablishment request" message.
725、AF向UE发送第一激活响应消息。725. The AF sends a first activation response message to the UE.
当AF接收第一激活请求消息后,AF根据A-KID#2确定本地是否已经存储有A-KID#2对应的Kaf#2,如果有,则激活Kaf#2。激活操作具体如下:创建安全功能函数,并将更新的密钥放置入该安全函数中使用。AF删除或停止之前使用的安全函数(放置Kaf#1的安全 函数)。After the AF receives the first activation request message, the AF determines whether the Kaf#2 corresponding to the A-KID#2 has been stored locally according to the A-KID#2, and if so, activates the Kaf#2. The activation operation is as follows: create a security function function, and put the updated key into the security function for use. AF removes or stops the safety function used before (put the safety function of Kaf#1).
激活成功后,AF向UE发送第一激活响应消息。After the activation is successful, the AF sends a first activation response message to the UE.
示例性的,第一激活响应消息可以是“application session reestablishment response”消息。Exemplarily, the first activation response message may be an "application session reestablishment response" message.
图7示意的应用场景中,AF激活新的密钥(Kaf#2)由UE指示,UE自身激活该Kaf#2。基于此,本申请实施例还提出一种应用场景,请参阅图8,图8为本申请实施例提出的又一种应用场景示意图。图8所示的应用场景中,AF自身激活Kaf#2,UE本地的Kaf#2由AF指示激活。具体的,该应用场景包括:In the application scenario illustrated in FIG. 7 , the new key (Kaf#2) for AF activation is indicated by the UE, and the UE itself activates the Kaf#2. Based on this, an embodiment of the present application further proposes an application scenario, please refer to FIG. 8 , and FIG. 8 is a schematic diagram of another application scenario proposed by the embodiment of the present application. In the application scenario shown in FIG. 8 , the AF itself activates Kaf#2, and the local Kaf#2 of the UE is instructed to activate by the AF. Specifically, the application scenarios include:
801、UE向AMF发送注册请求消息。801. The UE sends a registration request message to the AMF.
802、AMF向UE发送第一密钥标识符。802. The AMF sends the first key identifier to the UE.
803、UE和AMF交互完成第一主鉴权流程。803. The UE interacts with the AMF to complete the first primary authentication process.
804、NAS SMC流程#1。804. NAS SMC process #1.
805、存储Kausf#1,并生成Kakma#1。805. Store Kausf#1, and generate Kakma#1.
806、生成Kakma#1。806. Generate Kakma#1.
807、生成Kaf#1(A-KID#1)。807. Generate Kaf#1 (A-KID#1).
808、当Kaf#1即将过期,AF向AAnF发送第一密钥请求消息,该第一密钥请求消息携带A-KID#1。808. When the Kaf#1 is about to expire, the AF sends a first key request message to the AAnF, where the first key request message carries the A-KID#1.
809、AAnF根据该第一密钥请求消息,确定A-KID#1是否存在。809. The AAnF determines whether A-KID#1 exists according to the first key request message.
810、若存在A-KID#1,则AAnF向AUSF发送第二密钥请求消息,该第二密钥请求消息携带UE的永久标识信息。810. If A-KID#1 exists, the AAnF sends a second key request message to the AUSF, where the second key request message carries the permanent identification information of the UE.
811、AUSF确定为该UE提供服务的AMF。811. The AUSF determines the AMF that serves the UE.
812、AUSF向AMF发送第三鉴权请求消息,AMF在收到该第三鉴权请求消息后,向AUSF发送响应消息。812. The AUSF sends a third authentication request message to the AMF, and after receiving the third authentication request message, the AMF sends a response message to the AUSF.
813、触发第二主鉴权流程。813. Trigger the second primary authentication process.
814、AMF向UE发送第二密钥标识符。814. The AMF sends the second key identifier to the UE.
815、UE和AMF交互完成第二主鉴权流程(AUSF获取第二密钥标识符)。815. The UE and the AMF interact to complete the second primary authentication process (the AUSF obtains the second key identifier).
816a、存储第二中间密钥。816a. Store the second intermediate key.
816b、发送该UE的标识信息、A-KID#2和Kakma#2。816b. Send the identification information of the UE, A-KID#2 and Kakma#2.
817、AAnF使用Kakma#2生成Kaf#2。817. AAnF uses Kakma#2 to generate Kaf#2.
818、AAnF向AF发送第一密钥请求响应消息,该第一密钥请求消息携带A-KID#2、Kaf#2和Kaf#2的过期时间。818. The AAnF sends a first key request response message to the AF, where the first key request message carries the expiration time of A-KID#2, Kaf#2, and Kaf#2.
819、存储A-KID#2和Kaf#2。819. Store A-KID#2 and Kaf#2.
820、AMF确定是否激活第二安全上下文。820. The AMF determines whether to activate the second security context.
821、若确定不激活,则NAS SMC流程#2中携带第一密钥标识符。821. If it is determined not to activate, the NAS SMC process #2 carries the first key identifier.
822、UE存储与第二密钥标识符对应的Kausf#2。822. The UE stores the Kausf#2 corresponding to the second key identifier.
步骤801-822与前述步骤701-722一致,此处不作赘述。Steps 801-822 are the same as the aforementioned steps 701-722, and are not repeated here.
823、AF向UE发送第二激活请求消息,该第二激活请求消息携带A-KID#2,该第二 激活请求消息指示UE生成新的Kaf。823. The AF sends a second activation request message to the UE, where the second activation request message carries A-KID#2, and the second activation request message instructs the UE to generate a new Kaf.
824、若UE还没有生成A-KID#2,则UE基于Kausf#2生成Kakma#2和A-KID#2,若UE已经生成A-KID#2,则UE对比本地生成的A-KID#2与来自AF的A-KID#2是否相同,若相同,则该AF的标识信息对应的密钥更新为Kaf#2。824. If the UE has not generated A-KID#2, the UE generates Kakma#2 and A-KID#2 based on Kausf#2. If the UE has generated A-KID#2, the UE compares the locally generated A-KID# 2 is the same as the A-KID#2 from the AF, if it is the same, the key corresponding to the identification information of the AF is updated to Kaf#2.
825、AF向UE发送第二激活响应消息。825. The AF sends a second activation response message to the UE.
当AF激活Kaf#2成功后,AF向UE发送第二激活响应消息。After the AF activates Kaf#2 successfully, the AF sends a second activation response message to the UE.
激活操作具体如下:创建安全功能函数,并将更新的密钥放置入该安全函数中使用。AF删除或停止之前使用的安全函数(放置Kaf#1的安全函数)。The activation operation is as follows: create a security function function, and put the updated key into the security function for use. AF removes or stops the safe function used before (put the safe function of Kaf#1).
基于前述实施例,本申请实施例还提出一种应用场景,请参阅图9,图9为本申请实施例提出的又一种应用场景示意图。图9的应用场景中,AMF不发起NAS SMC流程,使得UE并不长期保存新的中间密钥。具体的,该应用场景包括:Based on the foregoing embodiments, an embodiment of the present application further proposes an application scenario, please refer to FIG. 9 , and FIG. 9 is a schematic diagram of another application scenario proposed by an embodiment of the present application. In the application scenario of Figure 9, the AMF does not initiate the NAS SMC process, so that the UE does not store the new intermediate key for a long time. Specifically, the application scenarios include:
901、UE向AMF发送注册请求消息。901. The UE sends a registration request message to the AMF.
902、AMF向UE发送第一密钥标识符。902. The AMF sends the first key identifier to the UE.
903、UE和AMF交互完成第一主鉴权流程。903. The UE interacts with the AMF to complete the first primary authentication process.
904、NAS SMC流程#1。904. NAS SMC process #1.
905、存储Kausf#1,并生成Kakma#1。905. Store Kausf#1, and generate Kakma#1.
906、生成Kakma#1。906. Generate Kakma#1.
907、生成Kaf#1(A-KID#1)。907. Generate Kaf#1 (A-KID#1).
908、当Kaf#1即将过期,AF向AAnF发送第一密钥请求消息,该第一密钥请求消息携带A-KID#1。908. When Kaf#1 is about to expire, the AF sends a first key request message to AAnF, where the first key request message carries A-KID#1.
909、AAnF根据该第一密钥请求消息,确定A-KID#1是否存在。909. The AAnF determines whether A-KID#1 exists according to the first key request message.
910、若存在A-KID#1,则AAnF向AUSF发送第二密钥请求消息,该第二密钥请求消息携带UE的永久标识信息。910. If A-KID#1 exists, the AAnF sends a second key request message to the AUSF, where the second key request message carries the permanent identification information of the UE.
911、AUSF确定为该UE提供服务的AMF。911. The AUSF determines the AMF that serves the UE.
912、AUSF向AMF发送第三鉴权请求消息,AMF在收到该第三鉴权请求消息后,向AUSF发送响应消息。912. The AUSF sends a third authentication request message to the AMF, and after receiving the third authentication request message, the AMF sends a response message to the AUSF.
913、触发第二主鉴权流程。913. Trigger the second primary authentication process.
914、AMF向UE发送第二密钥标识符。914. The AMF sends the second key identifier to the UE.
915、UE和AMF交互完成第二主鉴权流程(AUSF获取第二密钥标识符)。915. The UE interacts with the AMF to complete the second primary authentication process (the AUSF obtains the second key identifier).
916a、存储第二中间密钥。916a. Store the second intermediate key.
916b、发送该UE的标识信息、A-KID#2和Kakma#2。916b. Send the identification information of the UE, A-KID#2 and Kakma#2.
917、AAnF使用Kakma#2生成Kaf#2。917. AAnF uses Kakma#2 to generate Kaf#2.
918、AAnF向AF发送第一密钥请求响应消息,该第一密钥请求消息携带A-KID#2、Kaf#2和Kaf#2的过期时间。918. The AAnF sends a first key request response message to the AF, where the first key request message carries the expiration time of A-KID#2, Kaf#2, and Kaf#2.
919、存储A-KID#2和Kaf#2。919. Store A-KID#2 and Kaf#2.
步骤901-919与前述步骤701-719一致,此处不作赘述。Steps 901-919 are the same as the aforementioned steps 701-719, and are not repeated here.
920、AMF确定不发起NAS SMC流程。920. The AMF determines not to initiate the NAS SMC process.
当AMF获知只需要更新Kakma和Kaf时,AMF确定不发起NAS SMC流程,以保证不影响现有的密钥架构,降低密钥更新的复杂度。When AMF learns that only Kakma and Kaf need to be updated, AMF determines not to initiate the NAS SMC process to ensure that the existing key structure is not affected and the complexity of key update is reduced.
921、由于UE未收到NAS SMC消息,因此UE仅缓存Kausf#2。921. Since the UE has not received the NAS SMC message, the UE only caches Kausf#2.
由于AMF不发起NAS SMC流程,AMF并不会向UE发送NAS SMC消息。因此,UE仅缓存Kausf#2。具体的,UE的缓存区域中存储该Kausf#2,UE的长期存储区域中并不存储该Kausf#2.Since the AMF does not initiate the NAS SMC process, the AMF does not send the NAS SMC message to the UE. Therefore, the UE only caches Kausf#2. Specifically, the Kausf#2 is stored in the cache area of the UE, and the Kausf#2 is not stored in the long-term storage area of the UE.
922、AF向UE发送第二激活请求消息,该第二激活请求消息携带A-KID#2,该第二激活请求消息指示AF生成新的Kaf。922. The AF sends a second activation request message to the UE, where the second activation request message carries A-KID#2, and the second activation request message instructs the AF to generate a new Kaf.
当AF收到新的Kaf(即Kaf#2)后,AF发起该Kaf#2的激活流程。具体的,AF向UE发送第二激活请求消息,该第二激活请求消息携带A-KID#2,该激活请求消息指示UE生成Kaf#2。After the AF receives the new Kaf (ie, Kaf#2), the AF initiates the activation process of the Kaf#2. Specifically, the AF sends a second activation request message to the UE, where the second activation request message carries A-KID#2, and the activation request message instructs the UE to generate Kaf#2.
可选的,步骤922与步骤919之间的时间间隔可以尽可能的小,以保证AF的正常运行。Optionally, the time interval between step 922 and step 919 may be as small as possible to ensure the normal operation of the AF.
示例性的,第二激活请求消息可以是“application session reestablishment request”消息。Exemplarily, the second activation request message may be an "application session reestablishment request" message.
923、UE基于Kausf#2生成Kakma#2和A-KID#2,若UE本地生成的A-KID#2与来自AF的A-KID#2相同,则该AF的标识信息对应的密钥更新为Kaf#2。923. The UE generates Kakma#2 and A-KID#2 based on Kausf#2. If the A-KID#2 locally generated by the UE is the same as the A-KID#2 from the AF, the key corresponding to the identification information of the AF is updated for Kaf#2.
924、AF向UE发送第二激活响应消息。924. The AF sends a second activation response message to the UE.
当AF激活Kaf#2成功后,AF向UE发送第二激活响应消息。After the AF activates Kaf#2 successfully, the AF sends a second activation response message to the UE.
激活操作具体如下:创建安全功能函数,并将更新的密钥放置入该安全函数中使用。AF删除或停止之前使用的安全函数(放置Kaf#1的安全函数)。The activation operation is as follows: create a security function function, and put the updated key into the security function for use. AF removes or stops the safe function used before (put the safe function of Kaf#1).
上述主要以方法的角度对本申请实施例提供的方案进行了介绍。可以理解的是,通信装置为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。The solutions provided by the embodiments of the present application are described above mainly from the perspective of methods. It can be understood that, in order to realize the above-mentioned functions, the communication apparatus includes corresponding hardware structures and/or software modules for executing each function. Those skilled in the art should easily realize that the present application can be implemented in hardware or in the form of a combination of hardware and computer software. Whether a function is performed by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
本申请实施例可以根据上述方法示例对通信装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个收发模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In this embodiment of the present application, the communication device may be divided into functional modules according to the foregoing method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one transceiver module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. It should be noted that, the division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.
下面对本申请中的通信装置进行详细描述,请参阅图10,图10为本申请实施例中通信装置的一种实施例示意图。通信装置可以部署于网络设备或芯片或芯片系统中,通信装置1000包括:The communication device in the present application will be described in detail below, please refer to FIG. 10 , which is a schematic diagram of an embodiment of the communication device in the embodiment of the present application. The communication apparatus can be deployed in a network device or a chip or a chip system, and the communication apparatus 1000 includes:
处理模块1001,用于生成第二安全上下文,所述第二安全上下文与第一安全上下文不一致,所述第一安全上下文为接入和移动性管理功能当前使用的安全上下文;A processing module 1001, configured to generate a second security context, where the second security context is inconsistent with the first security context, and the first security context is the security context currently used by the access and mobility management function;
所述处理模块1001,还用于确定是否激活所述第二安全上下文。The processing module 1001 is further configured to determine whether to activate the second security context.
在一种可能的实现方式中,In one possible implementation,
收发模块1002,用于向所述终端设备发送包含第二密钥标识符的第二鉴权请求消息,所述第二鉴权请求消息用于触发所述终端设备和网络之间的第二鉴权;The transceiver module 1002 is configured to send a second authentication request message including a second key identifier to the terminal device, where the second authentication request message is used to trigger a second authentication between the terminal device and the network. right;
所述处理模块1001,还用于在所述第二鉴权成功之后,确定是否需要激活所述第二鉴权过程中生成的第二安全上下文;The processing module 1001 is further configured to, after the second authentication succeeds, determine whether to activate the second security context generated in the second authentication process;
所述收发模块1002,还用于在不需要激活所述第二安全上下文的情况下,向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第一密钥标识符;其中,所述第一密钥标识符为所述接入和移动性管理功能当前使用的所述第一安全上下文的密钥标识符。The transceiver module 1002 is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device without activating the second security context, where the second NAS SMC message includes a first key identifier; wherein the first key identifier is the key identifier of the first security context currently used by the access and mobility management function.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1002,还用于向所述终端设备发送包含所述第一密钥标识符的第一鉴权请求消息,所述第一鉴权请求消息用于触发所述终端设备和网络之间的第一鉴权;The transceiver module 1002 is further configured to send a first authentication request message including the first key identifier to the terminal device, where the first authentication request message is used to trigger the communication between the terminal device and the network. the first authentication between
所述收发模块1002,还用于在所述第一鉴权成功之后,向所述终端设备发送第一NAS SMC消息以激活在所述第一鉴权过程中生成的所述第一安全上下文,所述第一NAS SMC消息包括所述第一密钥标识符。The transceiver module 1002 is further configured to, after the first authentication succeeds, send a first NAS SMC message to the terminal device to activate the first security context generated in the first authentication process, The first NAS SMC message includes the first key identifier.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1002,还用于接收来自所述终端设备的注册请求消息。The transceiver module 1002 is further configured to receive a registration request message from the terminal device.
在一种可能的实现方式中,In one possible implementation,
所述处理模块1001,还用于当确定不更新非接入层NAS密钥和/或接入层AS密钥时,确定不激活所述第二安全上下文,The processing module 1001 is further configured to determine not to activate the second security context when it is determined not to update the non-access stratum NAS key and/or the access stratum AS key,
或者,or,
所述处理模块1001,还用于当确定非接入层NAS计数器翻转时,确定激活所述第二安全上下文,The processing module 1001 is further configured to determine to activate the second security context when it is determined that the non-access stratum NAS counter rolls over,
或者,or,
所述处理模块1001,还用于当确定更新所述终端设备的非接入层NAS密钥上下文和/或接入层AS密钥上下文时,确定激活所述第二安全上下文;The processing module 1001 is further configured to determine to activate the second security context when it is determined to update the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device;
或者,or,
所述处理模块1001,还用于当确定所述第二鉴权由第一网元触发,则不激活所述第二安全上下文,所述第一网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF;The processing module 1001 is further configured to not activate the second security context when it is determined that the second authentication is triggered by a first network element, and the first network element includes any one of the following: an authentication management function AUSF , Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF;
或者,or,
所述处理模块1001,还用于当确定所述第二鉴权仅需要对所述终端设备进行鉴权,则不激活所述第二安全上下文;The processing module 1001 is further configured to not activate the second security context when it is determined that the second authentication only needs to authenticate the terminal device;
或者,or,
所述处理模块1001,还用于当确定所述第二鉴权由所述终端设备触发,则不激活所述 第二安全上下文。The processing module 1001 is further configured to not activate the second security context when it is determined that the second authentication is triggered by the terminal device.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1002,还用于当确定激活所述第二安全上下文后,向所述终端设备发送所述第二密钥标识符。The transceiver module 1002 is further configured to send the second key identifier to the terminal device after it is determined that the second security context is activated.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1002,还用于当确定激活所述第二安全上下文后,向所述终端设备发送第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;The transceiver module 1002 is further configured to, after determining to activate the second security context, send first indication information to the terminal device, where the first indication information is associated with a second network element, and the first indication information instructing the terminal device to update the communication key between the terminal device and the second network element;
所述第二网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1002,还用于当确定激活所述第二安全上下文后,所述接入和移动性管理功能激活第二中间密钥的非接入层NAS密钥,所述第二安全上下文对应所述第二中间密钥;The transceiver module 1002 is further configured to activate, by the access and mobility management function, a non-access stratum NAS key of a second intermediate key after determining to activate the second security context, the second security context corresponding to the second intermediate key;
所述接入和移动性管理功能不激活所述第二中间密钥的接入层AS密钥。The access and mobility management function does not activate the access stratum AS key of the second intermediate key.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1002,还用于接收第一网元发送的第三鉴权请求消息,其中,所述第三鉴权请求消息携带所述终端设备的永久标识信息,所述第三鉴权请求消息用于触发所述终端设备与网络之间的所述第二鉴权;The transceiver module 1002 is further configured to receive a third authentication request message sent by the first network element, wherein the third authentication request message carries the permanent identification information of the terminal device, and the third authentication request message The message is used to trigger the second authentication between the terminal device and the network;
所述第一网元包括以下任一个:AUSF、NEF、AAnF、ECS、EES或AF。The first network element includes any one of the following: AUSF, NEF, AAnF, ECS, EES or AF.
在一种可能的实现方式中,In one possible implementation,
所述处理模块1001,还用于选择安全算法对所述接入和移动性管理功能向所述终端设备发送的第二NAS SMC消息进行完整性保护和机密性保护;The processing module 1001 is further configured to select a security algorithm to perform integrity protection and confidentiality protection on the second NAS SMC message sent by the access and mobility management function to the terminal device;
所述处理模块1001,还用于当所述接入和移动性管理功能选择的安全算法与所述第一安全上下文对应的安全算法相同,则确定不激活所述第二安全上下文;The processing module 1001 is further configured to determine not to activate the second security context when the security algorithm selected by the access and mobility management function is the same as the security algorithm corresponding to the first security context;
所述收发模块1002,还用于向所述终端设备发送所述第二NAS SMC消息,所述第二NAS SMC消息包括所述第一密钥标识符。The transceiver module 1002 is further configured to send the second NAS SMC message to the terminal device, where the second NAS SMC message includes the first key identifier.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1002,还用于向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第二指示信息,所述第二指示信息指示所述终端设备生成Kamf#2,并激活Kamf#2对应的所述第二安全上下文,所述Kamf#2为更新的Kamf。The transceiver module 1002 is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device, where the second NAS SMC message includes second indication information, and the second indication information indicates the The terminal device generates Kamf#2, and activates the second security context corresponding to Kamf#2, where Kamf#2 is the updated Kamf.
在一种可能的实现方式中,In one possible implementation,
所述第二NAS SMC消息还包括第三指示信息,所述第三指示信息指示所述终端设备继续使用所述第一安全上下文中的NAS安全上下文和所述第一安全上下文中的AS安全上下文。The second NAS SMC message further includes third indication information, where the third indication information instructs the terminal device to continue to use the NAS security context in the first security context and the AS security context in the first security context .
在一种可能的实现方式中,In one possible implementation,
所述第二安全上下文包括以下一项或多项:Kseaf#2、Kamf#2、Kaf#2、Kakma#2、K NASint#2、K NASenc#2、K gNB#2、K RRCint#2、K RRCenc#2或者K N3IWF#2The second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, K NASint#2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 or K N3IWF#2 .
请参阅图11,图11为本申请实施例中通信装置的一种实施例示意图。通信装置可以部署于终端设备或芯片或芯片系统中,通信装置1100包括:Please refer to FIG. 11 . FIG. 11 is a schematic diagram of an embodiment of a communication device according to an embodiment of the present application. The communication apparatus can be deployed in a terminal device or a chip or a chip system, and the communication apparatus 1100 includes:
收发模块1101,用于接收来自接入和移动性管理功能AMF的第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息携带来自所述来自AMF的密钥标识符;A transceiver module 1101, configured to receive a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, where the second NAS SMC message carries the key identifier from the AMF;
处理模块1102,用于当所述密钥标识符与所述终端设备正在使用的第一安全上下文的第一密钥标识符相同时,确定不激活第二安全上下文,所述第二安全上下文与所述第一安全上下文不一致。The processing module 1102 is configured to determine not to activate the second security context when the key identifier is the same as the first key identifier of the first security context being used by the terminal device, and the second security context is the same as the first security context. The first security contexts are inconsistent.
在一种可能的实现方式中,In one possible implementation,
所述处理模块1102,还用于确定不激活所述第二安全上下文中的NAS安全上下文和/或所述第二安全上下文中的AS安全上下文。The processing module 1102 is further configured to determine not to activate the NAS security context in the second security context and/or the AS security context in the second security context.
在一种可能的实现方式中,In one possible implementation,
所述处理模块1102,还用于验证所述来自AMF的密钥标识符对应的安全算法,与所述第一安全上下文对应的安全算法是否相同,所述来自AMF的密钥标识符对应的安全算法为所述接入和移动性管理功能选择的安全算法;The processing module 1102 is further configured to verify whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the same. algorithm is the security algorithm selected by the access and mobility management function;
所述处理模块1102,还用于当所述来自AMF的密钥标识符对应的安全算法与所述第一安全上下文对应的安全算法相同,确定不更新第一安全上下文。The processing module 1102 is further configured to determine not to update the first security context when the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context.
在一种可能的实现方式中,In one possible implementation,
所述收发模块1101,还用于接收所述接入和移动性管理功能发送的第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;The transceiver module 1101 is further configured to receive first indication information sent by the access and mobility management function, where the first indication information is associated with a second network element, and the first indication information indicates the terminal device updating the communication key between the terminal device and the second network element;
所述第二网元包括以下任一个:网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
上述实施例中的通信装置,可以是网络设备,也可以是应用于网络设备中的芯片或者其他可实现上述网络设备功能的组合器件、部件等。当通信装置是网络设备时,收发模块可以是收发器,该收发器可以包括天线和射频电路等,处理模块可以是处理器,例如基带芯片等。当通信装置是具有上述网络设备功能的部件时,收发模块可以是射频单元,处理模块可以是处理器。当通信装置是芯片系统时,收发模块可以是芯片系统的输入端口,收发模块可以是芯片系统的输出接口、处理模块可以是芯片系统的处理器,例如:中央处理器(central processing unit,CPU)。The communication device in the foregoing embodiment may be a network device, or may be a chip applied in the network device, or other combined devices or components that can implement the functions of the foregoing network device. When the communication device is a network device, the transceiver module may be a transceiver, the transceiver may include an antenna and a radio frequency circuit, etc., and the processing module may be a processor, such as a baseband chip. When the communication device is a component having the above-mentioned network equipment function, the transceiver module may be a radio frequency unit, and the processing module may be a processor. When the communication device is a chip system, the transceiver module may be an input port of the chip system, the transceiver module may be an output interface of the chip system, and the processing module may be a processor of the chip system, such as a central processing unit (CPU) .
上述实施例中的通信装置,可以是终端设备,也可以是应用于终端设备中的芯片或者其他可实现上述终端设备功能的组合器件、部件等。当通信装置是终端设备时,收发模块可以是收发器,该收发器可以包括天线和射频电路等,处理模块可以是处理器,例如基带芯片等。当通信装置是具有上述终端设备功能的部件时,收发模块可以是射频单元,处理模块可以是处理器。当通信装置是芯片系统时,收发模块可以是芯片系统的输入端口,收 发模块可以是芯片系统的输出接口、处理模块可以是芯片系统的处理器,例如:中央处理器。The communication device in the above-mentioned embodiment may be a terminal device, or a chip applied in the terminal device or other combined devices, components, etc. that can realize the functions of the above-mentioned terminal device. When the communication device is a terminal device, the transceiver module may be a transceiver, the transceiver may include an antenna and a radio frequency circuit, and the like, and the processing module may be a processor, such as a baseband chip. When the communication device is a component having the functions of the above terminal equipment, the transceiver module may be a radio frequency unit, and the processing module may be a processor. When the communication device is a chip system, the transceiver module may be an input port of the chip system, the transceiver module may be an output interface of the chip system, and the processing module may be a processor of the chip system, such as a central processing unit.
需要说明的是,通信装置各模块/或元器件之间的信息交互、执行过程等内容,与本申请中图6-图9对应的方法实施例基于同一构思,具体内容可参见本申请前述所示的方法实施例中的叙述,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the modules/or components of the communication device are based on the same concept as the method embodiments corresponding to FIGS. 6 to 9 in this application. The descriptions in the method embodiments shown are not repeated here.
需要说明的是,对于通信装置的具体实现方式以及带来的有益效果,均可以参考图6-图9对应的各个方法实施例中的叙述,此处不再一一赘述。It should be noted that, for the specific implementation manner of the communication device and the beneficial effects brought about, reference may be made to the descriptions in the respective method embodiments corresponding to FIG. 6 to FIG. 9 , which will not be repeated here.
本申请实施例还提供了一种处理装置,处理装置包括处理器和接口;该处理器,用于执行上述任一方法实施例的有限域的编码或译码方法。An embodiment of the present application further provides a processing apparatus, where the processing apparatus includes a processor and an interface; the processor is configured to execute the finite field encoding or decoding method according to any of the foregoing method embodiments.
应理解,上述处理装置可以是一个芯片,该处理器可以通过硬件实现也可以通过软件来实现,当通过硬件实现时,该处理器可以是逻辑电路、集成电路等;当通过软件来实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现,该存储器可以集成在处理器中,可以位于该处理器之外,独立存在。It should be understood that the above-mentioned processing device may be a chip, and the processor may be implemented by hardware or software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc.; when implemented by software, The processor may be a general-purpose processor, and is implemented by reading software codes stored in a memory, which may be integrated in the processor, or located outside the processor, and exists independently.
其中,“通过硬件实现”是指通过不具有程序指令处理功能的硬件处理电路来实现上述模块或者单元的功能,该硬件处理电路可以通过分立的硬件元器件组成,也可以是集成电路。为了减少功耗、降低尺寸,通常会采用集成电路的形式来实现。硬件处理电路可以包括ASIC(application-specific integrated circuit,专用集成电路),或者PLD(programmable logic device,可编程逻辑器件);其中,PLD又可包括FPGA(field programmable gate array,现场可编程门阵列)、CPLD(complex programmable logic device,复杂可编程逻辑器件)等等。这些硬件处理电路可以是单独封装的一块半导体芯片(如封装成一个ASIC);也可以跟其他电路(如CPU、DSP)集成在一起后封装成一个半导体芯片,例如,可以在一个硅基上形成多种硬件电路以及CPU,并单独封装成一个芯片,这种芯片也称为SoC,或者也可以在硅基上形成用于实现FPGA功能的电路以及CPU,并单独封闭成一个芯片,这种芯片也称为SoPC(system on a programmable chip,可编程片上系统)。Wherein, "implemented by hardware" means that the functions of the above-mentioned modules or units are realized by a hardware processing circuit that does not have the function of processing program instructions. The hardware processing circuit can be composed of discrete hardware components or an integrated circuit. In order to reduce power consumption and reduce size, it is usually implemented in the form of integrated circuits. The hardware processing circuit may include ASIC (application-specific integrated circuit, application-specific integrated circuit), or PLD (programmable logic device, programmable logic device); wherein, PLD may include FPGA (field programmable gate array, field programmable gate array) , CPLD (complex programmable logic device, complex programmable logic device) and so on. These hardware processing circuits can be a single semiconductor chip packaged separately (such as packaged into an ASIC); they can also be integrated with other circuits (such as CPU, DSP) and packaged into a semiconductor chip, for example, can be formed on a silicon substrate A variety of hardware circuits and CPUs are individually packaged into a chip, which is also called SoC, or circuits and CPUs for implementing FPGA functions can also be formed on a silicon substrate and individually enclosed into a single chip. Also known as SoPC (system on a programmable chip, programmable system on a chip).
本申请还提供一种通信系统,其包括发送端、接收端和中间节点中的至少一种或多种。The present application also provides a communication system, which includes at least one or more of a sender, a receiver, and an intermediate node.
本申请实施例还提供的一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机控制网络装置执行如前述方法实施例所示任一项实现方式。An embodiment of the present application further provides a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to control a network device to execute any one of the implementations shown in the foregoing method embodiments.
本申请实施例还提供的一种计算机程序产品,计算机程序产品包括计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行如前述方法实施例所示任一项实现方式。An embodiment of the present application also provides a computer program product, the computer program product includes computer program code, and when the computer program code runs on a computer, the computer can execute any one of the implementations shown in the foregoing method embodiments.
本申请实施例还提供一种芯片系统,包括存储器和处理器,存储器用于存储计算机程序,处理器用于从存储器中调用并运行计算机程序,使得芯片执行如前述方法实施例所示任一项实现方式。An embodiment of the present application further provides a chip system, including a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the chip executes any one of the implementations shown in the foregoing method embodiments. Way.
本申请实施例还提供一种芯片系统,包括处理器,处理器用于调用并运行计算机程序,使得芯片执行如前述方法实施例所示任一项实现方式。Embodiments of the present application further provide a chip system, including a processor, where the processor is configured to call and run a computer program, so that the chip executes any one of the implementations shown in the foregoing method embodiments.
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以 不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。In addition, it should be noted that the device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be A physical unit, which can be located in one place or distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. In addition, in the drawings of the device embodiments provided in the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备执行本申请各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware. Special components, etc. to achieve. Under normal circumstances, all functions completed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structures used to implement the same function can also be various, such as analog circuits, digital circuits or special circuit, etc. However, a software program implementation is a better implementation in many cases for this application. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that make contributions to the prior art. The computer software products are stored in a readable storage medium, such as a floppy disk of a computer. , U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, etc., including several instructions to make a computer device execute the methods described in the various embodiments of the present application.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。In the above-mentioned embodiments, it may be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented in software, it can be implemented in whole or in part in the form of a computer program product.
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、通信装置、计算设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、通信装置、计算设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的通信装置、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer may be a general purpose computer, special purpose computer, computer network, or other programmable device. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be downloaded from a website, computer, communication device, computing equipment or data center to another website site, computer, communication device, computing device, or data center by wire (eg, coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (eg, infrared, wireless, microwave, etc.) transmission. The computer-readable storage medium can be any available medium that can be stored by a computer, or a data storage device such as a communication device, a data center, or the like that includes one or more available media integrated. The usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVD), or semiconductor media (eg, Solid State Disk (SSD)), and the like.
应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本申请的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本申请的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It is to be understood that reference throughout the specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic associated with the embodiment is included in at least one embodiment of the present application. Thus, appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not be dealt with in the embodiments of the present application. implementation constitutes any limitation.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、计算机软件或者二者的结合来实现,为了清楚地说明硬件和软件的可互换性,在上述说明中已经按照功能一般性地描述了各示例的组成及步骤。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应 认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. Interchangeability, the above description has generally described the components and steps of each example in terms of function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。The integrated unit, if implemented as a software functional unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.

Claims (29)

  1. 一种通信方法,其特征在于,包括:A communication method, comprising:
    接入和移动性管理功能向终端设备发送包含第二密钥标识符的第二鉴权请求消息,所述第二鉴权请求消息用于触发所述终端设备和网络之间的第二鉴权;The access and mobility management function sends a second authentication request message containing a second key identifier to the terminal device, the second authentication request message being used to trigger a second authentication between the terminal device and the network ;
    在所述第二鉴权成功之后,所述接入和移动性管理功能确定是否需要激活所述第二鉴权过程中生成的第二安全上下文;After the second authentication is successful, the access and mobility management function determines whether the second security context generated during the second authentication needs to be activated;
    在不需要激活所述第二安全上下文的情况下,所述接入和移动性管理功能向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第一密钥标识符;其中,所述第一密钥标识符为所述接入和移动性管理功能当前使用的述第一安全上下文的密钥标识符。In the case where activation of the second security context is not required, the access and mobility management function sends a second non-access stratum security mode command NAS SMC message to the terminal device, the second NAS SMC message including a first key identifier; wherein the first key identifier is the key identifier of the first security context currently used by the access and mobility management function.
  2. 根据权利要求1所述的方法,其特征在于,在所述接入和移动性管理功能向所述终端设备发送包含所述第二密钥标识符的所述第二鉴权请求消息之前,所述方法还包括:The method of claim 1, wherein before the access and mobility management function sends the second authentication request message containing the second key identifier to the terminal device, the The method also includes:
    所述接入和移动性管理功能向所述终端设备发送包含所述第一密钥标识符的第一鉴权请求消息,所述第一鉴权请求消息用于触发所述终端设备和网络之间的第一鉴权;The access and mobility management function sends a first authentication request message containing the first key identifier to the terminal device, and the first authentication request message is used to trigger an exchange between the terminal device and the network. the first authentication between
    在所述第一鉴权成功之后,向所述终端设备发送第一NAS SMC消息以激活在所述第一鉴权过程中生成的所述第一安全上下文,所述第一NAS SMC消息包括所述第一密钥标识符。After the first authentication is successful, a first NAS SMC message is sent to the terminal device to activate the first security context generated during the first authentication process, the first NAS SMC message includes the the first key identifier.
  3. 根据权利要求2所述的方法,其特征在于,所述接入和移动性管理功能向所述终端设备发送包含所述第一密钥标识符的所述第一鉴权请求消息之前,所述方法还包括:The method of claim 2, wherein before the access and mobility management function sends the first authentication request message containing the first key identifier to the terminal device, the Methods also include:
    所述接入和移动性管理功能接收来自所述终端设备的注册请求消息。The access and mobility management function receives a registration request message from the terminal device.
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述接入和移动性管理功能确定是否需要激活所述第二鉴权过程中生成的所述第二安全上下文,包括:The method according to any one of claims 1-3, wherein the access and mobility management function determines whether the second security context generated in the second authentication process needs to be activated, comprising: :
    所述接入和移动性管理功能确定不需要更新非接入层NAS密钥和/或接入层AS密钥时,所述接入和移动性管理功能确定不激活所述第二安全上下文,When the access and mobility management function determines that it is not necessary to update the non-access stratum NAS key and/or the access stratum AS key, the access and mobility management function determines not to activate the second security context,
    或者,or,
    所述接入和移动性管理功能确定非接入层NAS计数器翻转时,所述接入和移动性管理功能确定激活所述第二安全上下文,when the access and mobility management function determines that the non-access stratum NAS counter rolls over, the access and mobility management function determines to activate the second security context,
    或者,or,
    所述接入和移动性管理功能确定需要更新所述终端设备的非接入层NAS密钥上下文和/或接入层AS密钥上下文时,所述接入和移动性管理功能确定激活所述第二安全上下文;When the access and mobility management function determines that it is necessary to update the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device, the access and mobility management function determines to activate the the second security context;
    或者,or,
    所述接入和移动性管理功能确定所述第二鉴权由第一网元触发,则所述接入和移动性管理功能确定不激活所述第二安全上下文,所述第一网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF;The access and mobility management function determines that the second authentication is triggered by the first network element, the access and mobility management function determines not to activate the second security context, and the first network element includes Any of the following: Authentication Management Function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF;
    或者,or,
    所述接入和移动性管理功能确定所述第二鉴权仅需要对所述终端设备进行鉴权,则所 述接入和移动性管理功能确定不激活所述第二安全上下文;The access and mobility management function determines that the second authentication only needs to authenticate the terminal device, then the access and mobility management function determines not to activate the second security context;
    或者,or,
    所述接入和移动性管理功能确定所述第二鉴权由所述终端设备触发,则所述接入和移动性管理功能确定不激活所述第二安全上下文。The access and mobility management function determines that the second authentication is triggered by the terminal device, and the access and mobility management function determines not to activate the second security context.
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-4, wherein the method further comprises:
    在所述接入和移动性管理功能确定需要激活所述第二安全上下文的情况下,所述接入和移动性管理功能向所述终端设备发送所述第二密钥标识符。In the event that the access and mobility management function determines that activation of the second security context is required, the access and mobility management function sends the second key identifier to the terminal device.
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1-5, wherein the method further comprises:
    在所述接入和移动性管理功能确定需要激活所述第二安全上下文的情况下,所述接入和移动性管理功能向所述终端设备发送第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;In the case that the access and mobility management function determines that the second security context needs to be activated, the access and mobility management function sends first indication information to the terminal device, where the first indication information is related to The second network element is associated, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element;
    所述第二网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,The method according to any one of claims 1-6, wherein,
    所述第二安全上下文包括以下一项或多项:Kseaf#2、Kamf#2、Kaf#2、Kakma#2、K NASint#2、K NASenc#2、K gNB#2、K RRCint#2、K RRCenc#2或者K N3IWF#2The second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, K NASint#2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 or K N3IWF#2 .
  8. 一种通信方法,其特征在于,所述方法应用于终端设备,所述方法包括:A communication method, characterized in that the method is applied to a terminal device, and the method includes:
    所述终端设备接收来自接入和移动性管理功能AMF的第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息携带来自所述来自AMF的密钥标识符;the terminal device receives a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, the second NAS SMC message carrying the key identifier from the AMF;
    当所述密钥标识符与所述终端设备正在使用的第一安全上下文的第一密钥标识符相同时,所述终端设备确定不激活第二安全上下文,所述第二安全上下文与所述第一安全上下文不一致。When the key identifier is the same as the first key identifier of the first security context being used by the terminal device, the terminal device determines not to activate the second security context, the second security context and the The first security context is inconsistent.
  9. 根据权利要求8所述的方法,其特征在于,所述终端设备确定不激活所述第二安全上下文,包括:The method according to claim 8, wherein determining by the terminal device not to activate the second security context comprises:
    所述终端设备确定不激活所述第二安全上下文中的NAS安全上下文和/或所述第二安全上下文中的AS安全上下文。The terminal device determines not to activate the NAS security context in the second security context and/or the AS security context in the second security context.
  10. 根据权利要求8-9中任一项所述的方法,其特征在于,所述终端设备确定不激活所述第二安全上下文之前,所述方法还包括:The method according to any one of claims 8-9, wherein before the terminal device determines not to activate the second security context, the method further comprises:
    所述终端设备验证所述来自AMF的密钥标识符对应的安全算法,与所述第一安全上下文对应的安全算法是否相同,所述来自AMF的密钥标识符对应的安全算法为所述接入和移动性管理功能选择的安全算法;The terminal device verifies whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the security algorithms selected for ingress and mobility management functions;
    当所述来自AMF的密钥标识符对应的安全算法与所述第一安全上下文对应的安全算法相同,所述终端设备确定不更新第一安全上下文。When the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, the terminal device determines not to update the first security context.
  11. 根据权利要求8-10中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 8-10, wherein the method further comprises:
    所述终端设备接收所述接入和移动性管理功能发送的发送第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第 二网元之间的通信密钥;The terminal device receives the first indication information sent by the access and mobility management function, the first indication information is associated with the second network element, and the first indication information instructs the terminal device to update the terminal the communication key between the device and the second network element;
    所述第二网元包括以下任一个:网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  12. 一种通信装置,其特征在于,包括:A communication device, characterized in that it includes:
    收发模块,用于向终端设备发送包含第二密钥标识符的第二鉴权请求消息,所述第二鉴权请求消息用于触发所述终端设备和网络之间的第二鉴权;a transceiver module, configured to send a second authentication request message including a second key identifier to the terminal device, where the second authentication request message is used to trigger the second authentication between the terminal device and the network;
    处理模块,用于在所述第二鉴权成功之后,确定是否需要激活所述第二鉴权过程中生成的第二安全上下文;a processing module, configured to determine whether the second security context generated in the second authentication process needs to be activated after the second authentication is successful;
    所述收发模块,还用于在不需要激活所述第二安全上下文的情况下,向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第一密钥标识符;其中,所述第一密钥标识符为所述接入和移动性管理功能当前使用的所述第一安全上下文的密钥标识符。The transceiver module is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device without activating the second security context, where the second NAS SMC message includes the first NAS SMC message. a key identifier; wherein the first key identifier is the key identifier of the first security context currently used by the access and mobility management function.
  13. 根据权利要求12所述的通信装置,其特征在于,The communication device according to claim 12, wherein:
    所述收发模块,还用于向所述终端设备发送包含所述第一密钥标识符的第一鉴权请求消息,所述第一鉴权请求消息用于触发所述终端设备和网络之间的第一鉴权;The transceiver module is further configured to send a first authentication request message containing the first key identifier to the terminal device, where the first authentication request message is used to trigger the connection between the terminal device and the network the first authentication;
    所述收发模块,还用于在所述第一鉴权成功之后,向所述终端设备发送第一NAS SMC消息以激活在所述第一鉴权过程中生成的所述第一安全上下文,所述第一NAS SMC消息包括所述第一密钥标识符。The transceiver module is further configured to, after the first authentication succeeds, send a first NAS SMC message to the terminal device to activate the first security context generated in the first authentication process, so the The first NAS SMC message includes the first key identifier.
  14. 根据权利要求13所述的通信装置,其特征在于,The communication device according to claim 13, wherein:
    所述收发模块,还用于接收来自所述终端设备的注册请求消息。The transceiver module is further configured to receive a registration request message from the terminal device.
  15. 根据权利要求12-14中任一项所述的通信装置,The communication device according to any one of claims 12-14,
    所述处理模块,还用于当确定不需要更新非接入层NAS密钥和/或接入层AS密钥时,确定不激活所述第二安全上下文,The processing module is further configured to determine not to activate the second security context when it is determined that the non-access stratum NAS key and/or the access stratum AS key need not be updated,
    或者,or,
    所述处理模块,还用于当确定非接入层NAS计数器翻转时,确定激活所述第二安全上下文,The processing module is further configured to determine to activate the second security context when it is determined that the non-access stratum NAS counter rolls over,
    或者,or,
    所述处理模块,还用于当确定需要更新所述终端设备的非接入层NAS密钥上下文和/或接入层AS密钥上下文时,确定激活所述第二安全上下文;The processing module is further configured to determine to activate the second security context when it is determined that the non-access stratum NAS key context and/or the access stratum AS key context of the terminal device needs to be updated;
    或者,or,
    所述处理模块,还用于当确定所述第二鉴权由第一网元触发,则不激活所述第二安全上下文,所述第一网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF;The processing module is further configured to not activate the second security context when it is determined that the second authentication is triggered by a first network element, and the first network element includes any one of the following: an authentication management function AUSF, Network Open Function NEF, Authentication and Key Management Anchor Function AAnF, Edge Configuration Server ECS, Edge Enablement Server EES, Mobile Edge Computing MEC or Application Function AF;
    或者,or,
    所述处理模块,还用于当确定所述第二鉴权仅需要对所述终端设备进行鉴权,则不激活所述第二安全上下文;The processing module is further configured to not activate the second security context when it is determined that the second authentication only needs to authenticate the terminal device;
    或者,or,
    所述处理模块,还用于当确定所述第二鉴权由所述终端设备触发,则不激活所述第二安全上下文。The processing module is further configured to not activate the second security context when it is determined that the second authentication is triggered by the terminal device.
  16. 根据权利要求12-15中任一项所述的通信装置,The communication device according to any one of claims 12-15,
    所述收发模块,还用于当确定激活所述第二安全上下文后,向所述终端设备发送所述第二密钥标识符。The transceiver module is further configured to send the second key identifier to the terminal device after it is determined that the second security context is activated.
  17. 根据权利要求12-16中任一项所述的通信装置,The communication device according to any one of claims 12-16,
    所述收发模块,还用于当确定激活所述第二安全上下文后,向所述终端设备发送第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;The transceiver module is further configured to, after determining to activate the second security context, send first indication information to the terminal device, where the first indication information is associated with the second network element, and the first indication information indicates The terminal device updates the communication key between the terminal device and the second network element;
    所述第二网元包括以下任一个:鉴权管理功能AUSF、网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: an authentication management function AUSF, a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  18. 根据权利要求12-17中任一项所述的通信装置,其特征在于,The communication device according to any one of claims 12-17, characterized in that,
    所述处理模块,还用于选择安全算法对所述接入和移动性管理功能向所述终端设备发送的第二NAS SMC消息进行完整性保护和机密性保护;The processing module is further configured to select a security algorithm to perform integrity protection and confidentiality protection on the second NAS SMC message sent by the access and mobility management function to the terminal device;
    所述处理模块,还用于当所述接入和移动性管理功能选择的安全算法与所述第一安全上下文对应的安全算法相同,则确定不激活所述第二安全上下文;The processing module is further configured to determine that the second security context is not activated when the security algorithm selected by the access and mobility management function is the same as the security algorithm corresponding to the first security context;
    所述收发模块,还用于向所述终端设备发送所述第二NAS SMC消息,所述第二NAS SMC消息包括所述第一密钥标识符。The transceiver module is further configured to send the second NAS SMC message to the terminal device, where the second NAS SMC message includes the first key identifier.
  19. 根据权利要求12所述的通信装置,其特征在于,The communication device according to claim 12, wherein:
    所述收发模块,还用于向所述终端设备发送第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息包括第二指示信息,所述第二指示信息指示所述终端设备生成Kamf#2,并激活Kamf#2对应的所述第二安全上下文,所述Kamf#2为更新的Kamf。The transceiver module is further configured to send a second non-access stratum security mode command NAS SMC message to the terminal device, where the second NAS SMC message includes second indication information, and the second indication information indicates the terminal The device generates Kamf#2, and activates the second security context corresponding to Kamf#2, which is the updated Kamf.
  20. 根据权利要求19所述的通信装置,其特征在于,所述第二NAS SMC消息还包括第三指示信息,所述第三指示信息指示所述终端设备继续使用所述第一安全上下文中的NAS安全上下文和所述第一安全上下文中的AS安全上下文。The communication apparatus according to claim 19, wherein the second NAS SMC message further includes third indication information, wherein the third indication information instructs the terminal device to continue to use the NAS in the first security context A security context and an AS security context in the first security context.
  21. 根据权利要求12-20中任一项所述的通信装置,其特征在于,The communication device according to any one of claims 12-20, characterized in that,
    所述第二安全上下文包括以下一项或多项:Kseaf#2、Kamf#2、Kaf#2、Kakma#2、K NASint#2、K NASenc#2、K gNB#2、K RRCint#2、K RRCenc#2或者K N3IWF#2The second security context includes one or more of the following: Kseaf#2, Kamf#2, Kaf#2, Kakma#2, K NASint#2 , K NASenc#2 , K gNB#2 , K RRCint#2 , K RRCenc#2 or K N3IWF#2 .
  22. 一种通信装置,其特征在于,A communication device, characterized in that:
    收发模块,用于接收来自接入和移动性管理功能AMF的第二非接入层安全模式命令NAS SMC消息,所述第二NAS SMC消息携带来自所述来自AMF的密钥标识符;a transceiver module for receiving a second non-access stratum security mode command NAS SMC message from the access and mobility management function AMF, where the second NAS SMC message carries the key identifier from the AMF;
    处理模块,用于当所述密钥标识符与所述终端设备正在使用的第一安全上下文的第一密钥标识符相同时,确定不激活第二安全上下文,所述第二安全上下文与所述第一安全上下文不一致。A processing module, configured to determine that the second security context is not activated when the key identifier is the same as the first key identifier of the first security context being used by the terminal device, and the second security context is the same as the first security context. The first security context described above is inconsistent.
  23. 根据权利要求22所述的通信装置,其特征在于,The communication device according to claim 22, wherein,
    所述处理模块,还用于确定不激活所述第二安全上下文中的NAS安全上下文和/或所述第二安全上下文中的AS安全上下文。The processing module is further configured to determine not to activate the NAS security context in the second security context and/or the AS security context in the second security context.
  24. 根据权利要求22-23中任一项所述的通信装置,其特征在于,The communication device according to any one of claims 22-23, characterized in that,
    所述处理模块,还用于验证所述来自AMF的密钥标识符对应的安全算法,与所述第一安全上下文对应的安全算法是否相同,所述来自AMF的密钥标识符对应的安全算法为所述接入和移动性管理功能选择的安全算法;The processing module is further configured to verify whether the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context, and the security algorithm corresponding to the key identifier from the AMF is the same a security algorithm selected for the access and mobility management function;
    所述处理模块,还用于当所述来自AMF的密钥标识符对应的安全算法与所述第一安全上下文对应的安全算法相同,确定不更新第一安全上下文。The processing module is further configured to determine not to update the first security context when the security algorithm corresponding to the key identifier from the AMF is the same as the security algorithm corresponding to the first security context.
  25. 根据权利要求22-24中任一项所述的通信装置,其特征在于,The communication device according to any one of claims 22-24, characterized in that,
    所述收发模块,还用于接收所述接入和移动性管理功能发送的第一指示信息,所述第一指示信息与第二网元关联,所述第一指示信息指示所述终端设备更新所述终端设备与所述第二网元之间的通信密钥;The transceiver module is further configured to receive first indication information sent by the access and mobility management function, where the first indication information is associated with a second network element, and the first indication information instructs the terminal device to update the communication key between the terminal device and the second network element;
    所述第二网元包括以下任一个:网络开放功能NEF、认证和密钥管理锚点功能AAnF、边缘配置服务器ECS、边缘使能服务器EES、移动边缘计算MEC或应用功能AF。The second network element includes any one of the following: a network opening function NEF, an authentication and key management anchor function AAnF, an edge configuration server ECS, an edge enabling server EES, a mobile edge computing MEC or an application function AF.
  26. 一种通信装置,其特征在于,所述通信装置包括:存储器和处理器;A communication device, characterized in that the communication device comprises: a memory and a processor;
    所述处理器,用于执行所述存储器中存储的计算机程序或指令,以使所述通信装置执行如权利要求1-7、或权利要求8-11中任一项所述的方法。The processor is adapted to execute a computer program or instructions stored in the memory to cause the communication device to perform the method of any one of claims 1-7 or 8-11.
  27. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质具有程序指令,当所述程序指令被直接或者间接执行时,使得如权利要求1-7、或权利要求8-11中任一所述的方法被实现。A computer-readable storage medium, characterized in that the computer-readable storage medium has program instructions, and when the program instructions are directly or indirectly executed, the program instructions are as described in claims 1-7 or 8-11. Any of the described methods are implemented.
  28. 一种芯片系统,其特征在于,所述芯片系统包括至少一个处理器,所述处理器用于执行存储器中存储的计算机程序或指令,当所述计算机程序或所述指令在所述至少一个处理器中执行时,使得如权利要求1-7、或权利要求8-11中任一所述的方法被实现。A chip system, characterized in that the chip system includes at least one processor, and the processor is configured to execute a computer program or an instruction stored in a memory, when the computer program or the instruction is executed in the at least one processor When executed, the method as claimed in any one of claims 1-7, or any of claims 8-11 is implemented.
  29. 一种通信系统,其特征在于,所述通信系统包括终端设备、网络设备;A communication system, characterized in that the communication system includes terminal equipment and network equipment;
    所述网络设备用于实现权利要求1-7中任一项所述的方法;The network device is used to implement the method according to any one of claims 1-7;
    所述终端设备用于实现权利要求8-11中任一项所述的方法。The terminal device is used to implement the method of any one of claims 8-11.
PCT/CN2022/089520 2021-04-28 2022-04-27 Communication method and related apparatus WO2022228455A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110469602.1 2021-04-28
CN202110469602.1A CN115250469A (en) 2021-04-28 2021-04-28 Communication method and related device

Publications (1)

Publication Number Publication Date
WO2022228455A1 true WO2022228455A1 (en) 2022-11-03

Family

ID=83697001

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/089520 WO2022228455A1 (en) 2021-04-28 2022-04-27 Communication method and related apparatus

Country Status (2)

Country Link
CN (1) CN115250469A (en)
WO (1) WO2022228455A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021027439A1 (en) * 2019-08-14 2021-02-18 Mediatek Singapore Pte. Ltd. Apparatuses and methods for delivery of inter-system non-access stratum (nas) security algorithms
CN112654046A (en) * 2019-09-29 2021-04-13 华为技术有限公司 Method and device for registration

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021027439A1 (en) * 2019-08-14 2021-02-18 Mediatek Singapore Pte. Ltd. Apparatuses and methods for delivery of inter-system non-access stratum (nas) security algorithms
CN112654046A (en) * 2019-09-29 2021-04-13 华为技术有限公司 Method and device for registration

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
"3 Generation Partnership Project; Technical Specification Group Services and System Aspects; Security architecture and procedures for 5G system (Release 17)", 3GPP STANDARD; TECHNICAL SPECIFICATION; 3GPP TS 33.501, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG3, no. V17.1.0, 6 April 2021 (2021-04-06), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France , pages 1 - 256, XP052000595 *
INTEL: "Correction of handling of 5G security contexts during EPS to 5GS idle mode mobility", 3GPP DRAFT; S3-194076, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG3, no. Reno, USA; 20191118 - 20191122, 11 November 2019 (2019-11-11), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France , XP051824392 *
MEDIATEK INC., HUAWEI, HISILICON: "Correct NAS uplink COUNT for KgNB/KeNB derivation", 3GPP DRAFT; S3-210786, 3RD GENERATION PARTNERSHIP PROJECT (3GPP), MOBILE COMPETENCE CENTRE ; 650, ROUTE DES LUCIOLES ; F-06921 SOPHIA-ANTIPOLIS CEDEX ; FRANCE, vol. SA WG3, no. e-meeting; 20210118 - 20210129, 1 February 2021 (2021-02-01), Mobile Competence Centre ; 650, route des Lucioles ; F-06921 Sophia-Antipolis Cedex ; France, XP052182087 *

Also Published As

Publication number Publication date
CN115250469A (en) 2022-10-28

Similar Documents

Publication Publication Date Title
TWI724132B (en) Method of wireless communication, apparatus for wireless communication and computer program for performing the method
US10798082B2 (en) Network authentication triggering method and related device
WO2019019736A1 (en) Security implementation method, and related apparatus and system
WO2020248624A1 (en) Communication method, network device, user equipment and access network device
CN109691154B (en) On-demand network function re-authentication based on key refresh
WO2019134704A1 (en) Key updating method and apparatus
CN109788480B (en) Communication method and device
US10142840B2 (en) Method and apparatus for operating a user client wireless communication device on a wireless wide area network
US20210045050A1 (en) Communications method and apparatus
KR102205625B1 (en) Security of ciphering and integrity protection
WO2020056433A2 (en) SECURE COMMUNICATION OF RADIO RESOURCE CONTROL (RRC) REQUEST OVER SIGNAL RADIO BEARER ZERO (SRBo)
JP6651613B2 (en) Wireless communication
WO2022134089A1 (en) Method and apparatus for generating security context, and computer-readable storage medium
TWI799064B (en) Method and related device for generating key identification
WO2022228455A1 (en) Communication method and related apparatus
WO2020147602A1 (en) Authentication method, apparatus and system
CN115942305A (en) Session establishment method and related device
WO2019213925A1 (en) Key update method, device, and storage medium
WO2023213191A1 (en) Security protection method and communication apparatus
CN114600487B (en) Identity authentication method and communication device
CN113904781B (en) Slice authentication method and system
WO2023011401A1 (en) Communication method and related apparatus
US9043873B1 (en) Method and apparatus for rejecting untrusted network
WO2023217685A1 (en) A method of joining a communication network
CN116528234A (en) Virtual machine security and credibility verification method and device

Legal Events

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

Ref document number: 22794925

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE