Method and device for generating secret key
Patent Information
- Application Number
- CN202280070392.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-22
- Publication Date
- 2024-11-15
AI Technical Summary
The existing technology requires the terminal device to perform master authentication when updating the KAF key, which results in a complicated update process and may cause the KAF to be reused, affecting communication security.
By introducing random numbers or count values in the process of generating key KAF, it is ensured that the KAF generated is different each time, thereby updating the KAF without primary authentication and reducing the update complexity.
It effectively avoids the problem of KAF reuse, improves the security and efficiency of KAF updates, and simplifies the update process of terminal equipment.
Smart Images

Figure CN118975187A_ABST
Abstract
Description
Method and device for generating key Technical Field
[0001] The present application relates to the field of communication technology, and more specifically, to a method and device for generating a key. Background Art
[0002] K can be used between application function (AF) network elements and terminal devices AF Encrypted communication is performed to ensure the security of communication. AF Usually has an expiration date, AF When the validity period of K is about to expire or has expired, AF Currently, K AF The update requires the terminal device to re-authenticate the master, which is a more complicated update method. If a new master authentication is not performed, the newly generated K AF K before the update AF The same will result in K AF The problem of being reused.
[0003] Summary of the Invention
[0004] This application provides a method and device for generating a key, which can solve the problem of K AF The problem of being reused.
[0005] In a first aspect, a method for generating a key is provided, comprising: AAnF generates a first K based on first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between terminal devices and AF.
[0006] In a second aspect, a method for generating a key is provided, comprising: a terminal device generates a first K based on first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and AF.
[0007] In a third aspect, a method for generating a key is provided, comprising: AF receiving a first K sent by AAnF AF , the first K AF Generated based on first information, the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AFUsed for communication between the terminal device and the AF.
[0008] In a fourth aspect, a device for generating a key is provided, the device being an AAnF, and comprising: a generating unit for generating a first K based on first information; AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between terminal devices and application functions AF.
[0009] In a fifth aspect, a device for generating a key is provided, the device being a terminal device, the device comprising: a generating unit for generating a first K based on the first information; AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and the application function AF.
[0010] In a sixth aspect, a device for generating a key is provided, the device being an AF, the device comprising: a receiving unit for receiving a first K sent by an AAnF; AF , the first K AF Generated based on first information, the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and the AF.
[0011] In a seventh aspect, a device for generating a key is provided, comprising a memory and a processor, wherein the memory is used to store a program, and the processor is used to call the program in the memory to execute the method as described in any one of the first to third aspects.
[0012] In an eighth aspect, a device is provided, comprising a processor for calling a program from a memory to execute the method as described in any one of the first to third aspects.
[0013] In a ninth aspect, a chip is provided, comprising a processor for calling a program from a memory so that a device equipped with the chip executes the method described in any one of the first to third aspects.
[0014] In a tenth aspect, a computer-readable storage medium is provided, on which a program is stored, wherein the program enables a computer to execute the method as described in any one of the first to third aspects.
[0015] In an eleventh aspect, a computer program product is provided, comprising a program, wherein the program enables a computer to execute the method according to any one of the first to third aspects.
[0016] In a twelfth aspect, a computer program is provided, wherein the computer program enables a computer to execute the method as described in any one of the first to third aspects.
[0017] This application generates the key K AF In the process of generating different K AF Since the random number and the count value are changing, K AF When different random numbers or count values are generated, different K AF , thus avoiding the regeneration of K AF K before the update AF The same problem. In addition, since K AF A random number or count value is introduced in the process, so that the K can be verified even without a new master authentication on the terminal device. AF Update, thereby reducing K AF Update complexity. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 1A-1C are exemplary diagrams of communication systems to which embodiments of the present application may be applied.
[0019] Figure 2 shows how to generate K based on the master authentication AKMA Flow chart of the process.
[0020] Figure 3 shows the K AKMA Generate K AF Flow chart of the process.
[0021] FIG4 is a flow chart of a method for generating a key provided in an embodiment of the present application.
[0022] FIG5 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0023] FIG6 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0024] FIG7 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0025] FIG8 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0026] FIG9 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0027] FIG10 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0028] FIG11 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0029] FIG12 is a flow chart of another method for generating a key provided in an embodiment of the present application.
[0030] FIG13 is a schematic diagram of a method for determining key generation provided in an embodiment of the present application.
[0031] FIG14 is a schematic diagram of another method for determining key generation provided in an embodiment of the present application.
[0032] FIG15 is a schematic diagram of another method for determining key generation provided in an embodiment of the present application.
[0033] FIG16 is a schematic structural diagram of a device for generating a key provided in an embodiment of the present application.
[0034] FIG17 is a schematic structural diagram of another device for generating a key provided in an embodiment of the present application.
[0035] FIG18 is a schematic structural diagram of another device for generating a key provided in an embodiment of the present application.
[0036] FIG19 is a schematic structural diagram of the device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. With respect to the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0038] The technical solutions of the embodiments of the present application can be applied to various communication systems, such as: global system of mobile communication (GSM) system, code division multiple access (CDMA) system, wideband code division multiple access (WCDMA) system, general packet radio service (GPRS), long term evolution (LTE) system, advanced long term evolution (LTE-A) system, new radio (NR) system, evolution system of NR system, LTE-based access to unlicensed spectrum (LTE-U) system on unlicensed spectrum, NR-based access to unlicensed spectrum (NR-U) system on unlicensed spectrum, NTN system, universal mobile telecommunication system (UMTS), wireless local area networks (WLAN), wireless fidelity (WLAN), etc. fidelity, WiFi), fifth-generation communication (5G) systems or other communication systems, such as future communication systems, such as sixth-generation mobile communication systems, and satellite communication systems.
[0039] Generally speaking, traditional communication systems support a limited number of connections and are easy to implement. However, with the development of communication technology, mobile communication systems will not only support traditional communications, but will also support, for example, device-to-device (D2D) communication, machine-to-machine (M2M) communication, machine-type communication (MTC), vehicle-to-vehicle (V2V) communication, or vehicle-to-everything (V2X) communication, etc. The embodiments of the present application can also be applied to these communication systems.
[0040] The communication system in the embodiment of the present application can be applied to a carrier aggregation (CA) scenario, a dual connectivity (DC) scenario, and a standalone (SA) networking scenario.
[0041] The communication system in the embodiment of the present application can be applied to an unlicensed spectrum, where the unlicensed spectrum can also be considered as a shared spectrum; or, the communication system in the embodiment of the present application can also be applied to an authorized spectrum, where the authorized spectrum can also be considered as a dedicated spectrum.
[0042] The embodiments of the present application can be applied to NTN systems as well as terrestrial networks (TN) systems. As an example and not a limitation, NTN systems include NR-based NTN systems and IoT-based NTN systems.
[0043] The embodiments of the present application describe various embodiments in conjunction with network devices and terminal devices, where the terminal device may also be referred to as user equipment (UE), access terminal, user unit, user station, mobile station, mobile station (MS), mobile terminal (MT), remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, etc.
[0044] In an embodiment of the present application, the terminal device may be a station (STATION, ST) in a WLAN, a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a wireless local loop (WLL) station, a personal digital assistant (PDA) device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, a vehicle-mounted device, a wearable device, a terminal device in a next-generation communication system such as an NR network, or a terminal device in a future-evolved public land mobile network (PLMN) network, etc.
[0045] In an embodiment of the present application, a terminal device may be a device that provides voice and / or data connectivity to a user and can be used to connect people, objects, and machines, such as a handheld device with wireless connection capabilities, an in-vehicle device, etc. The terminal device in the embodiment of the present application may be a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, etc. Optionally, a UE may be used to act as a base station. For example, a UE may act as a scheduling entity that provides sidelink signals between UEs in V2X or D2D, etc. For example, a cellular phone and a car communicate with each other using sidelink signals. Cellular phones and smart home devices communicate with each other without relaying the communication signal through a base station.
[0046] In an embodiment of the present application, the terminal device can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted; it can also be deployed on the water surface (such as ships, etc.); it can also be deployed in the air (such as airplanes, balloons and satellites, etc.).
[0047] In the embodiments of the present application, the terminal device may be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal device in industrial control, a wireless terminal device in self-driving, a wireless terminal device in remote medical, a wireless terminal device in a smart grid, a wireless terminal device in transportation safety, a wireless terminal device in a smart city, or a wireless terminal device in a smart home, etc. The terminal device involved in the embodiments of the present application may also be referred to as a terminal, user equipment (UE), an access terminal device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote terminal device, a mobile device, a UE terminal device, a wireless communication device, a UE agent, or a UE device, etc. The terminal device may also be fixed or mobile.
[0048] As an example and not a limitation, in the embodiment of the present application, the terminal device may also be a wearable device. Wearable devices may also be called wearable smart devices, which are a general term for wearable devices that are intelligently designed and developed using wearable technology for daily wear, such as glasses, gloves, watches, clothing, and shoes. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not only hardware devices, but also achieve powerful functions through software support, data interaction, and cloud interaction. Broadly speaking, wearable smart devices include those that are fully functional, large in size, and can achieve complete or partial functions without relying on smartphones, such as smart watches or smart glasses, as well as those that only focus on a certain type of application function and need to be used in conjunction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0049] The network device in the embodiments of the present application may be a device for communicating with a terminal device, and may also be referred to as an access network device or a radio access network device. For example, the network device may be a base station. The network device in the embodiments of the present application may refer to a radio access network (RAN) node (or device) that connects a terminal device to a wireless network. A base station may broadly cover various names as follows, or be replaced with the following names, such as: NodeB, evolved NodeB (eNB), next generation NodeB (gNB), relay station, access point, transmitting and receiving point (TRP), transmitting point (TP), master station MeNB, secondary station SeNB, multi-standard radio (MSR) node, home base station, network controller, access node, wireless node, access point (AP), transmission node, transceiver node, baseband unit (BBU), remote radio unit (RRU), active antenna unit (AAU), remote radio head (RRH), central unit (CU), distributed unit (DU), positioning node, etc. A base station may be a macro base station, a micro base station, a relay node, a donor node, or the like, or a combination thereof. The base station may also refer to a communication module, modem or chip provided in the aforementioned device or apparatus. The base station may also be a mobile switching center and a device-to-device D2D, vehicle-to-everything (V2X), machine-to-machine (M2M) communication device that performs the base station function, a network side device in a 6G network, a device that performs the base station function in a future communication system, etc. The base station may support networks with the same or different access technologies. The embodiments of the present application do not limit the specific technology and specific device form adopted by the network equipment.
[0050] Base stations can be fixed or mobile. For example, a helicopter or drone can be configured to act as a mobile base station, and one or more cells can move based on the location of the mobile base station. In other examples, a helicopter or drone can be configured to act as a device that communicates with another base station.
[0051] In some deployments, the network device in the embodiments of the present application may refer to a CU or a DU, or the network device may include a CU and a DU. The gNB may also include an AAU.
[0052] The network equipment and terminal devices can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; they can also be deployed on water; they can also be deployed in the air on aircraft, balloons, and satellites. The embodiments of this application do not limit the scenarios in which the network equipment and terminal devices are located.
[0053] As an example and not a limitation, in an embodiment of the present application, the network device may have a mobile feature, for example, the network device may be a mobile device. In some embodiments of the present application, the network device may be a satellite or a balloon station. For example, the satellite may be a low earth orbit (LEO) satellite, a medium earth orbit (MEO) satellite, a geostationary earth orbit (GEO) satellite, a high elliptical orbit (HEO) satellite, etc. In some embodiments of the present application, the network device may also be a base station set up in a location such as land or water.
[0054] In an embodiment of the present application, the network device can provide services for a cell, and the terminal device communicates with the network device through the transmission resources used by the cell (for example, frequency domain resources, or spectrum resources). The cell can be a cell corresponding to the network device (for example, a base station). The cell can belong to a macro base station or a base station corresponding to a small cell. The small cells here may include: metro cells, micro cells, pico cells, femto cells, etc. These small cells have the characteristics of small coverage and low transmission power, and are suitable for providing high-speed data transmission services.
[0055] For example, Figure 1A is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application. As shown in Figure 1A, the communication system 100 may include a network device 110, which may be a device that communicates with a terminal device 120 (or also referred to as a communication terminal or terminal). The network device 110 may provide communication coverage for a specific geographic area and may communicate with terminal devices located within the coverage area.
[0056] Figure 1A exemplarily shows a network device and two terminal devices. In some embodiments of the present application, the communication system 100 may include multiple network devices and each network device may include other number of terminal devices within its coverage area, which is not limited in the embodiments of the present application.
[0057] For example, FIG1B is a schematic diagram of the architecture of another communication system provided in an embodiment of the present application. Referring to FIG1B , a terminal device 1101 and a satellite 1102 are included, and wireless communication can be performed between the terminal device 1101 and the satellite 1102. The network formed between the terminal device 1101 and the satellite 1102 can also be referred to as an NTN. In the architecture of the communication system shown in FIG1B , the satellite 1102 can have the function of a base station, and the terminal device 1101 and the satellite 1102 can communicate directly. In the system architecture, the satellite 1102 can be referred to as a network device. In some embodiments of the present application, a plurality of network devices 1102 may be included in the communication system, and each network device 1102 may include other number of terminal devices within its coverage area, which is not limited in the embodiments of the present application.
[0058] For example, FIG1C is a schematic diagram of the architecture of another communication system provided in an embodiment of the present application. Referring to FIG1C , it includes a terminal device 1201, a satellite 1202, and a base station 1203. Wireless communication can be performed between the terminal device 1201 and the satellite 1202, and communication can be performed between the satellite 1202 and the base station 1203. The network formed between the terminal device 1201, the satellite 1202, and the base station 1203 can also be referred to as an NTN. In the architecture of the communication system shown in FIG1C , the satellite 1202 may not have the function of a base station, and the communication between the terminal device 1201 and the base station 1203 needs to be transferred through the satellite 1202. In this system architecture, the base station 1203 can be referred to as a network device. In some embodiments of the present application, a plurality of network devices 1203 may be included in the communication system, and each network device 1203 may include other number of terminal devices within its coverage area, which is not limited in the embodiments of the present application.
[0059] It should be noted that Figures 1A-1C are only examples of the system to which this application is applicable. Of course, the method shown in the embodiment of this application can also be applied to other systems, such as 5G communication systems, LTE communication systems, etc., and the embodiment of this application does not make specific limitations on this.
[0060] In some embodiments of the present application, the wireless communication system shown in Figures 1A-1C may also include a mobility management entity (MME), an access and mobility management function (AMF), authentication and key management for applications (AKMA), an authentication server function (AUSF), UDM, an AKMA anchor function (AAnF), AF and other network entities, but the embodiments of the present application are not limited to this.
[0061] It should be understood that in the embodiments of the present application, a device having a communication function in a network / system may be referred to as a communication device. Taking the communication system 100 shown in FIG1A as an example, the communication device may include a network device 110 and a terminal device 120 having a communication function. The network device 110 and the terminal device 120 may be the specific devices described above and will not be described in detail here. The communication device may also include other devices in the communication system 100, such as a network controller, a mobility management entity, and other network entities, which are not limited in the embodiments of the present application.
[0062] It should be understood that the "indication" mentioned in the embodiments of this application can be a direct indication, an indirect indication, or an indication of an association. For example, "A indicates B" can mean that A directly indicates B, for example, B can be obtained through A; it can also mean that A indirectly indicates B, for example, A indicates C, and B can be obtained through C; it can also mean that there is an association between A and B.
[0063] In the description of the embodiments of the present application, the term "corresponding" may indicate a direct or indirect correspondence between the two, or an association relationship between the two, or a relationship between indication and indication, configuration and configuration, etc.
[0064] The “configuration” in the embodiment of the present application may include configuration through at least one of system messages, radio resource control (RRC) signaling and media access control element (MAC CE).
[0065] In some embodiments of the present application, "predefined" or "preset" may be implemented by pre-storing corresponding codes, tables, or other methods that can be used to indicate relevant information in a device (e.g., a terminal device or a network device). This application does not limit the specific implementation method. For example, predefined may refer to information defined in a protocol.
[0066] In some embodiments of the present application, the "protocol" may refer to a standard protocol in the field of communications, for example, it may include an LTE protocol, an NR protocol, and related protocols used in future communication systems, and this application does not limit this.
[0067] For ease of understanding, some relevant technical knowledge involved in the embodiments of this application is first introduced. The following related technologies can be combined with the technical solutions of the embodiments of this application as optional solutions, and they all fall within the scope of protection of the embodiments of this application. The embodiments of this application include at least part of the following contents.
[0068] The following is an introduction to the AKMA key architecture.
[0069] K can be used between UE and AF AF Key for communication, K AF Can be used to protect communications. AF The key generation process involves multiple functional network elements, such as AMF, AUSF, UDM, AAnF, AF, etc. These functional network elements are introduced below.
[0070] The AMF is mainly used for mobility management and access management. It can be used to implement other functions of the MME in addition to session management, such as lawful interception and access authorization / authentication.
[0071] AUSF is used for authentication services, key generation, and bidirectional authentication of UEs, supporting a unified authentication framework. In the embodiment of the present application, AUSF is mainly used for mutual authentication between UEs and the network, and generates security keys for use in subsequent processes.
[0072] UDM can be used to process UE identification, access authentication, registration, and mobility management.
[0073] AF is used for data routing at the application layer, accessing network open functions, and interacting with the policy framework for policy control.
[0074] AAnF is used to generate the AKMA anchor key K AKMA , and application key K AF AAnF and UE can generate K in the same way. AF . In generating K AFAfter that, AAnF can generate K AF Sent to AF. Thus, AF and UE can use the same key K AF To ensure the security of communication.
[0075] Next, we combine Figure 2 and Figure 3 to analyze K AF The generation process of K is introduced. AF The generation process of can be divided into two stages. The first stage is to generate K based on the master authentication. AKMA The first stage is as shown in Figure 2; the second stage is based on K AKMA Generate K AF The two stages are shown in Figure 3. These two stages are sometimes referred to as the key negotiation process in the following text. The following describes these two stages separately.
[0076] Referring to FIG. 2 , in step S201 , the UE and the AUSF perform a main authentication process.
[0077] The main authentication can be understood as the process in which the UE authenticates the AMF and / or AUSF, and the AUSF authenticates the UE during the process of registering with the core network. This process is also called two-way authentication. Specifically, the process can be that during the registration process, the core network device and the UE interact through messages, and the UE and the core network device respectively compare the parameters to be verified provided by the other party with another parameter generated by themselves. If the parameters to be verified provided by the other party are the same as the parameters generated by itself, the authentication between the UE and the core network device interacts through AUSF and UDM to obtain authentication information (see step S202 and step S203). For example, authentication credentials (AKA authentication vector (AV)), the authentication method uses the Nudm_UEAuthentication_Get Request service operation.
[0078] In step S202, the AUSF sends a UE authentication request to the UDM. The UE authentication request may include the UE's identification information. The UE's identification information may be one or more of a subscription permanent identifier (SUPI), a subscription concealed identifier (SUCI), and a generic public subscription identifier (GPSI).
[0079] In step S203, the UDM sends a UE authentication response to the AUSF. The UE authentication response may include an AV. In some embodiments, the UE authentication response may also include an AKMA Ind and / or a RID. In some embodiments, the UDM may also indicate to the AUSF whether an AKMA key needs to be generated for the UE.
[0080] In step S204, after completing the primary authentication, the UE and the AUSF obtain a common key K AUSF If AUSF receives the UDM instruction, and the instruction indicates that AUSF needs to generate an AKMA key for the UE, then AUSF stores K AUSF , and after the primary authentication is successful, based on K AUSF Generate AKMA anchor key K AKMA and K AKMA It is understandable that K AKMA It has a corresponding relationship with A-KID, and A-KID can uniquely identify the K AKMA In addition, UE can also use the same calculation method as AUSF to generate K AKMA and A-KID. That is, UE is based on K AUSF Generate K AKMA and A-KID approach, and AUSF based on K AUSF Generate K AKMA Same as A-KID. AKMA It is the UE-granular key, that is, each UE has its own unique K AKMA .
[0081] In step S205, AUSF generates K AKMA After receiving the A-KID, Naanf_AKMA_AnchorKey_Regfister is used to send the latest key material to AAnF. The latest key material may include, for example, the UE's identification information (such as SUPI), A-KID, and K AKMA . AAnF stores the latest key material.
[0082] In step S206, the AAnF sends a response message to the AUSF using Naanf_AKMA_AnchorKey_Regfister.
[0083] 3, in step S301, after successfully completing the primary authentication and generating K AKMA After that, the UE may send an application session establishment request to the AF. The application session establishment request may include the A-KID.
[0084] In step S302, the AF sends an AKMA application key acquisition request to the AAnF. The AKMA application key acquisition request may include the A-KID and the AF identity (AF-ID). The A-KID is the A-KID in the application session establishment request.
[0085] In step S303, after receiving the AKMA application key acquisition request, the AAnF can determine the corresponding K AKMA , and based on K AKMA Generate key K AF .
[0086] In step S304, AAnF sends K to AF. AF For example, AAnF may send an AKMA application key acquisition response to AF. The application key acquisition response may include K AF , K AF Validity period (K AF expTime), SUPI, etc. After receiving the AKMA application key acquisition response, AF can obtain the key K for communicating with UE. AF .
[0087] In step S305, the AF sends an application session establishment response to the UE.
[0088] It is understandable that the UE can also generate K in the same way as the AAnF. AF , that is, UE is based on K AKMA Generate K AF The method is similar to AAnF based on K AKMA Generate K AF Thus, UE and AF can use the same key K AF to communicate.
[0089] UE and AF obtain the symmetric key K AF After that, we can use K AF Generate a TLS premaster secret. Further, the UE and AF can generate a TLS session key based on the TLS premaster secret. The TLS session key can be used for communication between the UE and AF.
[0090] In the embodiment of the present application, the above-mentioned key (such as K AKMA、 A-KID, K AFThe method for generating the key (e.g., a key derivation function, KDF) is not specifically limited. For example, a key derivation function (KDF) can be used to generate the key. The KDF can be any key derivation function that meets computational security requirements, such as HMAC-SHA-256 or HMAC-SM3. The following uses KDF as an example to illustrate the key generation method.
[0091] For example, from K AUSF Generate K AKMA When , the following parameters can be used as the input S of KDF:
[0092] -FC=0xXX (e.g., 0x80);
[0093] -P0="AKMA";
[0094] - L0 = length of AKMA;
[0095] -P1=SUPI;
[0096] - L1 = length of SUPI;
[0097] The key entered is K AUSF .
[0098] For example, from K AKMA Generate K AF When , the following parameters can be used as the KDF input S, which is referred to as method 1 below:
[0099] -FC=0xXX (e.g., 0x82);
[0100] -P0=AF_ID;
[0101] - L0 = length of AF_ID;
[0102] The key entered is K AKMA .
[0103] AF_ID=AF's FQDN||Ua*security protocol identifier.
[0104] For another example, A-KID may include RID and A-TID. RID is included in SUPI, and A-TID may be based on K AUSF Generate. When AUSF When generating an A-TID, the following parameters can be used as the input S of the KDF:
[0105] -FC=0xXX (e.g., 0x81);
[0106] -P0="A-TID";
[0107] - L0 = length of "A-TID";
[0108] -P1=SUPI;
[0109] - L1 = length of SUPI;
[0110] The key entered is K AUSF .
[0111] In order to effectively ensure the communication security between the terminal device and AF, K AF Set the validity period. K AF The validity period indicates K AF Can last for a constant period of time. AF During the validity period, UE and AF can use the K AF To communicate. AF When the validity period of K is about to expire or has expired, the UE needs to regenerate a new K AF .
[0112] From the key generation process described above, we can see that K AF The update depends on K AUSF Only for K AUSF Updated, K AF To get the update. If K AUSF If there is no change, then K AF will not change. AUSF The update of K depends on the master authentication. Only after the new master authentication can a different K be generated. AUSF That is, currently, UE updates K by performing a new primary authentication. AF In K AF When the validity period of K is about to expire or has expired, the UE can generate a new K by performing a new primary authentication. AUSF , and then use the new K AUSF Generate a new K AKMA , and use the new K AKMA Generate updated K AF .
[0113] However, the above update K AF In the solution, UE needs to update K AF 2 and 3 need to be repeated, which will increase the time required to update K AF complexity.
[0114] In order to reduce the update K AF Due to the complexity, some communication protocols, such as those specified in 5.2 of TS 33.535, use K AFWhen it is about to expire or has expired, it can be based on the existing K AKMA Regenerate K AF .
[0115] However, based on the existing key generation method, if the UE does not re-authenticate, K AKMA There will be no change; K AKMA If there is no change, then K AF will not change. That is, if K AF When the UE is about to expire or has expired, if the UE does not re-authenticate the primary authentication, the UE will use the existing K AKMA Will generate the same K as before the update AF , which will result in K AF The problem of being reused. The UE uses the expired K AF Communicating with AF will affect the security of communication.
[0116] In order to solve the above problems, the present invention provides a new key generation method K AF In the way of generating the key K AF In the process of generating different K AF For example, when performing K AF When updating, K can be generated based on the dynamically changing parameters AF , so that K before and after the update AF Different. Since this parameter is changing, it is necessary to update K each time AF Different values can be generated when . Further, based on this parameter, different K AF , thereby achieving K AF This update enhances the security of data transmission between UE and AF.
[0117] The embodiment of the present application does not specifically limit the parameter. For example, the parameter can be a random number (Nonce). The random number can be generated using a random number generator. AF When K is generated, a random number is generated by a random number generator. For another example, the parameter can be a count value generated by a counter. The count value gradually increases with the increase of the number of updates. Each time the number of updates increases, the count value increases by 1. For example, when K is generated for the first time, AF When the count value is 0, the second time K is generated AF When the count value is 1, the third time K is generated AF When K is generated for the first time, the count value is 2, and so on. AFThe count value can also be other values, such as 1, 2 or 3.
[0118] Let's take random numbers as an example to generate K AF way of introduction.
[0119] Based on random numbers, generate K AF There are many ways to generate K, which is not specifically limited in the present embodiment. As an example, K can be generated based only on random numbers. AF As another example, in order to have better compatibility with the existing protocol and minimize changes to the existing protocol, the random number parameter can be added to the original calculation method (such as method 1) to generate K AF For example, based on K AKMA And random numbers, generate K AF As another example, the random number can also be combined with K AKMA Other parameters besides , to generate K AF As another example, another parameter can be generated based on a random number, and then K can be generated based on the parameter. AF The above-mentioned various implementation methods can be used alone or in combination with each other, and the present application embodiment does not make any specific restrictions on this. AKMA And random numbers, generate K AF exemplified in this way.
[0120] In some embodiments, the terminal device or AAnF may be based on a random number, K AKMA And the third parameter, which may include one or more of the following: random number, AF-ID, length of AF-ID and constant FC, together generate K AF .
[0121] Generate K using the KDF described above AF For example, in the embodiment of the present application, a random number can be added to the input parameter of KDF to generate K AF In this case, the input S of the KDF can be as follows, where P1 and L1 are additional input parameters related to the random number. This method is also referred to as Method 2 below.
[0122] FC = 0xXX (e.g. 0x82);
[0123] P0 = AF_ID;
[0124] L0 = length of AF_ID;
[0125] P1 = Nonce;
[0126] L1 = length of Nonce;
[0127] The key entered is K AKMA .
[0128] As can be seen from the above, the terminal device or AAnF can be based on the random number, the length of the random number, AF-ID, the length of AF-ID, K AKMA and the constant FC, together generate K AF .
[0129] It is understood that the above parameters are only an example and do not limit the solution of the embodiment of the present application. As long as the input parameters of the KDF include random numbers. For example, the input parameters of the KDF can only include the above P1 and L1, but not P0 and L0. For another example, the input key can be replaced by K AKMA Other parameters besides K to be updated AF .
[0130] Let's take the count value as an example to generate K AF way of introduction.
[0131] Based on the count value, generate K AF There are many ways to generate K, which is not specifically limited in the present embodiment. As an example, K can be generated based only on the count value. AF As another example, in order to have better compatibility with the existing protocol and minimize the changes to the existing protocol, the count value parameter can be added to the original calculation method (such as method 1) to generate K AF For example, based on K AKMA And the count value, generate K AF As another example, the count value can also be combined with K AKMA Other parameters besides , to generate K AF As another example, another parameter can be generated based on the count value, and then K can be generated based on the parameter. AF The above-mentioned various implementation methods can be used alone or in combination with each other, and the present application embodiment does not make any specific restrictions on this. AKMA And the count value, generate K AF exemplified in this way.
[0132] In some embodiments, the terminal device or AAnF may be based on the count value, K AKMA And the third parameter, which may include one or more of the following: count value, AF-ID, length of AF-ID and constant FC, together generate K AF .
[0133] Generate K using the KDF described above AFFor example, the embodiment of the present application can add a count value to the input parameter of KDF to generate K AF In this case, the input S of the KDF can be as follows, where P1 and L1 are the added input parameters related to the count value. This method is also referred to as method three below.
[0134] FC = 0xXX (e.g. 0x82);
[0135] P0 = AF_ID;
[0136] L0 = length of AF_ID;
[0137] P1 = count value;
[0138] L1 = length of the count value;
[0139] The key entered is K AKMA .
[0140] As can be seen from the above, the terminal device or AAnF can be based on the count value, the length of the count value, the AF-ID, the length of the AF-ID, K AKMA and the constant FC, together generate K AF .
[0141] It is understood that the above parameters are only an example and do not limit the solution of the embodiment of the present application. As long as the KDF input parameters include the count value. For example, the KDF input parameters can only include the above P1 and L1, but not P0 and L0. For another example, the input key can be replaced by K AKMA Other parameters besides K to be updated AF .
[0142] Of course, the embodiment of the present application can also combine the random number and the count value to jointly generate K AF .
[0143] For example, the input S of the KDF can be as follows, wherein P1 and L1 are additional input parameters related to the random number, and P2 and L2 are additional input parameters related to the count value. This method is also referred to as method 4 below.
[0144] FC = 0xXX (e.g. 0x82);
[0145] P0 = AF_ID;
[0146] L0 = length of AF_ID;
[0147] P1 = random number;
[0148] L1 = length of random number;
[0149] P2 = count value;
[0150] L2 = length of the count value;
[0151] The key entered is K AKMA .
[0152] As can be seen from the above, the terminal device or AAnF can be based on the random number, the length of the random number, the count value, the length of the count value, the AF-ID, the length of the AF-ID, K AKMA and the constant FC, together generate K AF .
[0153] It is understood that the above parameters are only an example and do not limit the solution of the embodiment of the present application. As long as the input parameters of KDF include random numbers and count values. For example, the input parameters of KDF can only include the above P1, L1, P2 and L2, but not P0 and L0. For another example, the input key can be replaced by K AKMA Other parameters besides K to be updated AF .
[0154] FIG4 is a flow chart of a key generation process provided by an embodiment of the present application. The method shown in FIG4 can be executed by a terminal device or an AAnF. The terminal device and the AAnF can generate a key based on the same method. AF The method shown in FIG4 may include step S410.
[0155] In step S410, based on the first information, a first K AF The first information may be a target first key identifier generated based on a random number, and / or the first information may be a target count value generated by a counter.
[0156] Since the first information is generated based on a random number or a counter, different first information can be generated each time the first information is generated. Different K AF , so that K can be authenticated without a new master authentication AF Update to avoid K AF The problem of reuse.
[0157] The solution of the embodiment of the present application can be used in the key negotiation process or in the key update process. The key negotiation process can be understood as the initial generation of K AF As an example, in the key negotiation process, K is still generated based on the traditional method. AF , that is, based on K AKMA Generate the first K AF In the key update process, based on the first information, the first K AFAs another example, whether in the key negotiation process or in the key update process, the first K is generated based on the first information. AF .
[0158] When the first information is a target count value, a first K is generated based on the target count value. AF The solutions can refer to the third and fourth methods described above.
[0159] The following describes the solution where the first information is the target first key identifier. The terminal device or AAnF can first generate the target first key identifier based on a random number; then generate the first K AF .
[0160] The first key identifier can be understood as a parameter, which is generated from a random number. AF In some embodiments, the first key identifier may also be referred to as K AF Key Identifier (K AF key identity, AF-KID). AKMA Similar to the corresponding relationship between AF-KID and K AF There is also a corresponding relationship.
[0161] The first key identifier may be generated using a KDF method. For example, the first key identifier may be generated in a manner similar to that of the A-KID.
[0162] In method a, when using KDF to generate the first key identifier, the following parameters can be used as KDF input:
[0163] -FC=0xXX (e.g. 0x83);
[0164] - P0 = "first key identifier";
[0165] - L0 = length of "first key identifier";
[0166] -P1=SUPI;
[0167] - L1 = length of SUPI;
[0168] -P2=Nonce;
[0169] - L2 = length of Nonce;
[0170] The key entered is K AKMA .
[0171] As can be seen from the above, the first key identifier can be based on the character string of the first key identifier, the length of the character string of the first key identifier, the SUPI, the length of the SUPI, the random number, the length of the random number, and K AKMA generate.
[0172] It is understood that the above parameters are only an example and do not limit the solution of the embodiment of the present application. As long as the input parameters of the KDF include the relevant data of the random number. For example, the input parameters of the KDF can also include only P2 and L2, without P0, L0, P1 and L1. For another example, the input key can also be replaced by K AKMA For another example, SUPI may also be replaced with other identification information of the terminal device, such as SUCI or GPSI.
[0173] In addition to the random number, the target first key identifier can also be generated based on other parameters, such as the K to be updated AF For example, based on the K to be updated AF , generate the target first key identifier. Alternatively, it can be based on the random number and the K to be updated AF , generate the target first key identifier. K to be updated AF It can be understood as the K that is about to expire or has expired. AF Due to the K to be updated AF It is also changing, that is, each time K is generated AF are different, therefore, based on the K to be updated AF , you can also generate a changing first key identifier, so that the first key identifiers before and after the update are different, and then the K before and after the update AF will also be different. By changing multiple parameters (such as random numbers and K to be updated AF ), generate the updated K AF , which can make the generated K AF More secure and less likely to be stolen.
[0174] For K based on random numbers and to be updated AF , a scheme for generating a target first key identifier, the target first key identifier can also be generated using a KDF method.
[0175] In method b, when using KDF to generate the target first key identifier, the following parameters can be used as KDF input:
[0176] -FC=0xXX (e.g. 0x83);
[0177] - P0 = "first key identifier";
[0178] - L0 = length of "first key identifier";
[0179] -P1=SUPI;
[0180] - L1 = length of SUPI;
[0181] -P2=Nonce;
[0182] - L2 = length of Nonce.
[0183] The key entered is the K to be updated AF .
[0184] As can be seen from the above, the first key identifier can be based on the character string of the first key identifier, the length of the character string of the first key identifier, the SUPI, the length of the SUPI, the random number, the length of the random number, and the K to be updated. AF generate.
[0185] It is understood that the above parameters are only an example and do not limit the solution of the embodiment of the present application. As long as the input parameters of KDF include the random number and the K to be updated AF For example, the input parameters of KDF can also include only P2 and L2, without P0, L0, P1 and L1. For another example, the input key can be replaced by K AKMA , and P3 = K to be updated AF and L3 = K to be updated AF The length of is used as the input parameter of KDF. For another example, SUPI can also be replaced with other identification information of the terminal device, such as SUCI or GPSI.
[0186] Based on the first key identifier, generate K AF There are many ways to do this, and this embodiment of the present application does not specifically limit this.
[0187] As an example, in the traditional generation of K AF In the method of adding the first key identifier as an input parameter, this method is used to identify the K AF The changes to the generating function are minor and the implementation is relatively simple.
[0188] Method 5: Generate K using KDF AF The following parameters can be used as input to the KDF:
[0189] -FC=0xXX (e.g., 0x82);
[0190] -P0=AF_ID;
[0191] - L0 = length of AF_ID;
[0192] - P1 = first key identifier;
[0193] - L1 = length of the first key identifier;
[0194] The key entered is K AKMA .
[0195] From the above, we can see that K AF The AF_ID, the length of the AF_ID, the first key identifier, the length of the first key identifier, and the K AKMA generate.
[0196] It is understandable that the above parameters are only an example and do not limit the solution of the embodiment of the present application. As long as the input parameters of the KDF include the relevant data of the first key identifier. For example, the input parameters of the KDF can also include only P1 and L1, without P0 and L0. For another example, the input key can be replaced by K AKMA Other parameters besides K to be updated AF .
[0197] As another example, K may be generated based on the first key identifier and a random number. AF . In generating K from the first key identifier AF In the process of increasing the random number parameter, the generated K AF security.
[0198] Method 6: Generate K using KDF AF The following parameters can be used as input to the KDF:
[0199] -FC=0xXX (e.g., 0x82);
[0200] -P0=AF_ID;
[0201] - L0 = length of AF_ID
[0202] - P1 = first key identifier;
[0203] - L1 = length of the first key identifier;
[0204] -P2=Nonce;
[0205] - L2 = length of Nonce;
[0206] The key entered is K AKMA .
[0207] From the above, we can see that K AF The random number may be based on the AF_ID, the length of the AF_ID, the first key identifier, the length of the first key identifier, the random number, the length of the random number, and the K AKMA generate.
[0208] It is understandable that the above parameters are only an example and do not limit the solution of the embodiment of the present application. As long as the input parameters of KDF include the first key identifier and the relevant data of the random number. For example, the input parameters of KDF can also include only P1, L1, P2 and L2, without P0 and L0. For another example, the input key can be replaced by K AKMA Other parameters besides K to be updated AF .
[0209] The above describes the generation of K based on the first key identifier and the count value. AF The following is a solution to generate K AF It should be noted that the following solution is equally applicable to the case where the first information is a counter and a first key identifier.
[0210] In some embodiments, the AF may send a first message to the AAnF to request the AAnF to generate a first K AF Under the trigger of the first message, or in response to the first message, AAnF generates a first K AF The first message can be in K AF The validity period of the key is about to expire or is sent after the expiration of the key. In the key update process, the first message can be K AF Update request message or application request message. In the key negotiation process, the first message may be an application request message. After receiving the first message sent by AF, AAnF generates a first K based on the method described above. AF That is, the first information and / or the first K AF It can be generated under the trigger of the first message. Of course, if AAnF can know K AF Validity period, AAnF can also actively judge K AF Whether it is due or about to expire, in determining K AF After expiration or imminent expiration, AAnF can directly generate the first K AF , without waiting for the first message sent by AF.
[0211] In some embodiments, the first message may carry an A-KID. The A-KID in the first message may be used by the AAnF to determine whether the terminal device has performed a new primary authentication. The A-KID may be sent by the terminal device to the AF in a session establishment request message, as shown in step S301 in FIG3 .
[0212] As can be seen from the foregoing, if the terminal device has not performed a new primary authentication, the A-KID in AAnF is still the A-KID used before, that is, it is consistent with the A-KID in the first message; if the terminal device has performed a new primary authentication, the A-KID in AAnF will be updated, and AF has not yet learned the updated A-KID, so the updated A-KID is different from the A-KID in the first message. Therefore, if the A-KID in the first message is inconsistent with the latest A-KID in AAnF, it means that the terminal device has performed a new primary authentication; if the A-KID in the first message is consistent with the latest A-KID in AAnF, it means that the terminal device has not performed a new primary authentication. Furthermore, AAnF can determine the generation of K based on whether the terminal device has performed a new primary authentication. AF If the terminal device performs a new master authentication, AAnF can generate K based on the traditional method. AF , that is, based on the latest K AKMA Generate the second K AF , as shown in Figures 2 and 3. If the terminal device does not perform a new primary authentication, the AAnF can generate a first K based on the first information. AF .
[0213] In order to enable the terminal device to generate K AF After determining the key generation method, AAnF can also send instruction information to the terminal device to instruct the terminal device to generate the key in the same way as AAnF. AF For example, if the A-KID in the first message is consistent with the latest A-KID in the AAnF, the AAnF may send a first indication message to the terminal device, which may be used to instruct the terminal device to generate a first KID based on the first message. AF In the case of receiving the first indication information sent by the AAnF, the terminal device can generate a first K based on the first information. AF For another example, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, the AAnF may send a second indication message to the terminal device, and the second indication message may be used to instruct the terminal device to update the A-KID based on the latest K AKMA Generate the second K AF In the case of receiving the second indication information sent by AAnF, the terminal device can AKMA Generate the second K AF .
[0214] Of course, since the terminal device itself can know whether a new master authentication has been performed, the terminal device can also independently determine the generation of K AFThat is, if the terminal device performs a new master authentication, the terminal device can AKMA Generate the second K AF If the terminal device does not perform a new primary authentication, the terminal device may generate a first K based on the first information. AF .
[0215] In addition to comparing the A-KID in the first message with the latest A-KID in AAnF, AAnF can further determine the legitimacy of the A-KID in the first message to prevent AF from using a forged A-KID to request an update. Alternatively, when AF sends the first message, there is a possibility that AF loses its latest A-KID, which will cause the A-KID received by AAnF to be inconsistent with the latest A-KID in AAnF, and this inconsistency is obviously not due to the occurrence of primary authentication. In order to avoid misjudgment, AAnF can compare the A-KID in the first message with the historical A-KID in AAnF to determine whether the A-KID in the first message is an A-KID that has been used before, where the historical A-KID can be understood as an A-KID that has been used before by AAnF, that is, other A-KIDs except the latest A-KID. If the A-KID in the first message is one of the historical A-KIDs in the AAnF, it means that the A-KID in the first message is legal; if the A-KID in the first message is not one of the historical A-KIDs in the AAnF, it means that the A-KID in the first message is illegal, and the AAnF can refuse to update the K AF For the convenience of description, hereinafter, the A-KID in the first message that is one of the historical A-KIDs in AAnF is referred to as a valid A-KID, and the A-KID in the first message that is not one of the historical A-KIDs in AAnF is referred to as an invalid A-KID.
[0216] In some embodiments, if the A-KID in the first message is consistent with the latest A-KID in the AAnF, the AAnF may generate a first KID based on the first information. AF In order to prevent AF from replaying the previous message, AAnF can determine whether the A-KID in the first message is the latest one among the historical A-KIDs in AAnF. That is, if the A-KID in the first message is inconsistent with the latest A-KID in AAnF, and the A-KID in the first message is the latest one among the historical A-KIDs in AAnF, AAnF will determine whether the A-KID in the first message is the latest one among the historical A-KIDs in AAnF. AKMA , generate the second K AF The latest one among the historical A-KIDs in AAnF can be understood as the A-KID used last time by AAnF.
[0217] In order to enable the terminal device to generate K AF In a manner consistent with the above, the AAnF may send second indication information to the terminal device to instruct the terminal device to select the A-KID based on the latest A-KID when the A-KID in the first message is one of the historical A-KIDs in the AAnF (or the latest one of the historical A-KIDs) and the A-KID in the first message is inconsistent with the latest A-KID in the AAnF. AKMA Generate the second K AF In the case of receiving the second indication information sent by AAnF, the terminal device can AKMA Generate the second K AF .
[0218] The second indication information may be generated under the triggering of a second event, which may include one or more of the following: AKMA The key identifier is the same as the latest K in AAnF AKMA The key identifiers of the first message are inconsistent; K AKMA The key identifier is the historical K in AAnF AKMA One of the key identifiers.
[0219] Of course, in some embodiments, regardless of whether the terminal device performs a new primary authentication, the AAnF and the terminal device can generate K based on the first information. AF .
[0220] In some embodiments, the first message may carry a first key identifier. The first key identifier may be used by the AAnF to determine whether the first message (such as an update request) from the AF is legal. If the first key identifier in the first message is consistent with the latest first key identifier in the AAnF, it indicates that the first message from the AF is legal, and the AAnF may generate a first K based on the first information. AF If the first key identifier in the first message is inconsistent with the latest first key identifier in the AAnF, it indicates that the first message of the AF is illegal. In this case, the AAnF can refuse to send the K AF Further, AAnF may also send a second message to AF to indicate K AF Update failed.
[0221] In order for the terminal device and AAnF to generate the first K AF If the first key identifier in the first message is consistent with the latest first key identifier in the AAnF, the AAnF may send a first indication information to the terminal device to instruct the terminal device to generate a first K based on the first information. AFIn the case of receiving the first indication information sent by the AAnF, the terminal device can generate a first K based on the first information. AF .
[0222] In some embodiments, the first message may not include the first key identifier. For example, when the traditional key agreement process (ie, the scheme shown in FIG. 2 and FIG. 3 ) is used to generate the first K AF In the case of the first key identifier, the terminal device and the AAnF have not yet generated the first key identifier, and the AF cannot obtain the first key identifier. In this case, the first message may not carry the first key identifier. If the first message does not include the first key identifier, the AAnF may also consider the first message to be legal, and the AAnF may generate the first key identifier based on the first information. AF In some embodiments, if the first message does not include the first key identifier and the AAnF does not have the first key identifier, the AAnF may generate the first K based on the first information. AF .
[0223] In order to enable the terminal device to generate K AF If the first message does not include the first key identifier, the AAnF may send first indication information to the terminal device to instruct the terminal device to generate the first K based on the first information. AF In the case of receiving the first indication information sent by the AAnF, the terminal device can generate a first K based on the first information. AF .
[0224] In some embodiments, the first message may carry a count value. The count value may be used by the AAnF to determine whether the first message (such as an update request) from the AF is legal. If the count value in the first message is correct, it indicates that the first message from the AF is legal, and the AAnF may generate a first K based on the first information. AF If the count value in the first message is incorrect, it indicates that the first message of AF is illegal. In this case, AAnF can refuse to send K AF Further, AAnF may also send a second message to AF to indicate K AF Update failed. The count value in the first message being correct can be understood as being equal to the count value in AAnF, or being the next count value after the count value in AAnF. For example, if the AF increments the count value by 1 when sending the first message to the AAnF, the count value in AAnF is the next count value after the count value in AAnF. If the AF does not increment the count value by 1 when sending the first message to the AAnF, the count value in AAnF is equal to the count value in AAnF.
[0225] In order for the terminal device and AAnF to generate the first K AF If the count value in the first message is correct, the AAnF may send a first indication message to the terminal device to instruct the terminal device to generate a first K based on the first information. AF In the case of receiving the first indication information sent by the AAnF, the terminal device can generate a first K based on the first information. AF .
[0226] The above multiple determinations generate the first K AF The methods can be used alone or in combination. For example, the AAnF can judge both the A-KID and the first key identifier in the first message to determine the first K AF For example, the AAnF can judge both the A-KID and the count value in the first message to determine the first K AF way.
[0227] The following takes A-KID and the first key identifier as an example to determine the generation of the first K AF way of introduction.
[0228] As an example, if the A-KID in the first message is consistent with the latest A-KID in the AAnF, and the first key identifier in the first message is consistent with the latest first key identifier in the AAnF, the AAnF generates a first KID based on the first information. AF In this case, the AAnF may also send a first instruction information to the terminal device to instruct the terminal device to generate a first K based on the first information. AF .
[0229] As another example, if the A-KID in the first message is consistent with the latest A-KID in the AAnF, and the first key identifier in the first message is inconsistent with the latest first key identifier in the AAnF, the AAnF may refuse to update the K AF Furthermore, AAnF may also send a second message to AF to indicate K AF Update failed.
[0230] As another example, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, and the first key identifier in the first message is consistent with the latest first key identifier in the AAnF, the AAnF may AKMA Generate the second K AF In this case, the AAnF may send a second indication message to the terminal device to instruct the terminal device to perform the operation based on the latest K AKMA Generate the second K AFIn some embodiments, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF and the A-KID in the first message is valid, and the first key identifier in the first message is consistent with the latest first key identifier in the AAnF, the AAnF may AKMA Generate the second K AF .
[0231] As another example, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, and the first key identifier in the first message is inconsistent with the latest first key identifier in the AAnF, the AAnF may refuse to update the K AF Furthermore, AAnF may also send a second message to AF to indicate K AF In some embodiments, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF and the A-KID in the first message is valid, and the first key identifier in the first message is inconsistent with the latest first key identifier in the AAnF, the AAnF may refuse to update the K AF .
[0232] As another embodiment, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, and the A-KID in the first message is illegal, then the AAnF may refuse to update the KID regardless of whether the first key identifier in the first message is consistent with the latest first key identifier in the AAnF. AF .
[0233] The embodiment of the present application does not specifically limit the order of determining the A-KID and the first key identifier in the first message.
[0234] For example, the AAnF may first determine the A-KID in the first message, and then determine the first key identifier in the first message. If the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, or if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF and the A-KID in the first message is valid, the AAnF may directly determine the A-KID based on the latest K AKMA Generate the second K AF , without having to determine whether the first key identifier in the first message is consistent with the latest first key identifier in AAnF. If the A-KID in the first message is consistent with the latest A-KID in AAnF, AAnF can further determine whether the first key identifier in the first message is consistent with the first key identifier in AAnF. If they are consistent, AAnF can generate a first KID based on the first information. AF ; If not, AAnF can refuse to update K AF .
[0235] For another example, the AAnF may first determine the first key identifier in the first message, and then determine the A-KID in the first message. If the first key identifier in the first message is inconsistent with the latest first key identifier in the AAnF, the AAnF may refuse to update. If the first key identifier in the first message is consistent with the latest first key identifier in the AAnF, the AAnF may further determine whether the A-KID in the first message is consistent with the latest A-KID in the AAnF. If they are consistent, the AAnF may generate a first KID based on the first information. AF If not, or if not and the A-KID in the first message is valid, then AAnF can be based on the latest K AKMA Generate the second K AF .
[0236] The following takes A-KID and count value as an example to determine the generated K AF way of introduction.
[0237] As an example, if the A-KID in the first message is consistent with the latest A-KID in the AAnF, and the count value in the first message is correct, the AAnF generates a first KID based on the first information. AF In this case, the AAnF may also send a first instruction information to the terminal device to instruct the terminal device to generate a first K based on the first information. AF .
[0238] As another example, if the A-KID in the first message is consistent with the latest A-KID in the AAnF, and the count value in the first message is incorrect, the AAnF may refuse to update the K AF Furthermore, AAnF may also send a second message to AF to indicate K AF Update failed.
[0239] As another example, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, and the count value in the first message is correct, the AAnF may calculate the A-KID based on the latest K AKMA Generate the second K AF In this case, the AAnF may send a second indication message to the terminal device to instruct the terminal device to perform the operation based on the latest K AKMA Generate the second K AF In some embodiments, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF and the A-KID in the first message is valid, and the count value in the first message is correct, the AAnF may calculate the A-KID based on the latest K AKMA Generate the second K AF .
[0240] As yet another example, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, and the count value in the first message is incorrect, the AAnF may refuse to update the K AF Furthermore, AAnF may also send a second message to AF to indicate K AF In some embodiments, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF and the A-KID in the first message is valid, and the count value in the first message is incorrect, the AAnF may refuse to update the K AF .
[0241] As another embodiment, if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF and the A-KID in the first message is illegal, the AAnF may refuse to update the KID regardless of whether the count value in the first message is correct. AF .
[0242] The embodiment of the present application does not specifically limit the order of determining the A-KID and the count value in the first message.
[0243] For example, the AAnF may first determine the A-KID in the first message and then determine the count value in the first message. If the A-KID in the first message is inconsistent with the latest A-KID in the AAnF, or if the A-KID in the first message is inconsistent with the latest A-KID in the AAnF and the A-KID in the first message is valid, the AAnF may directly determine the A-KID based on the latest K AKMA Generate the second K AF , without having to determine whether the count value in the first message is correct. If the A-KID in the first message is consistent with the latest A-KID in the AAnF, the AAnF can further determine whether the count value in the first message is correct. If correct, the AAnF can generate a first KID based on the first information. AF ; If not, AAnF can refuse to update K AF .
[0244] For another example, the AAnF may first determine the count value in the first message, and then determine the A-KID in the first message. If the count value in the first message is incorrect, the AAnF may refuse to update. If the count value in the first message is correct, the AAnF may further determine whether the A-KID in the first message is consistent with the latest A-KID in the AAnF. If they are consistent, the AAnF may generate a first KID based on the first information. AFIf not, or if not and the A-KID in the first message is valid, then AAnF can be based on the latest K AKMA Generate the second K AF .
[0245] In some embodiments, the first message may also include identification information of the terminal device, such as one or more of SUPI, SUCI, and GPSI. Since the AAnF may store key material for multiple terminal devices, carrying the identification information of the terminal device in the first message can facilitate the AAnF to find one or more of the A-KID, first key identifier, and count value corresponding to the terminal device, thereby determining one or more of the A-KID, first key identifier, and count value in the first message.
[0246] If the first information is a target count value, the target count value may be generated by the terminal device and / or the AAnF. The target count value may be generated by the terminal device and the AAnF respectively, and the terminal device and the AAnF may generate the first K based on the target count values generated by each. AF For example, both the terminal device and the AAnF can maintain a counter. AF During a key negotiation (or key negotiation process), the counter values in the terminal device and the AAnF are equal, for example, both are initialized. For example, the initialization value can be 0. Subsequently, with each update, the terminal device and the AAnF update the counter value, for example, by incrementing the counter value by 1. This ensures that the counter value used by the terminal device and the AAnF is the same each time. Furthermore, there is no need to transmit the counter value between the terminal device and the AAnF, thereby saving signaling overhead.
[0247] The embodiments of the present application do not specifically limit the timing for the terminal device and the AAnF to update the count value. For example, the AAnF may update the count value after receiving the first message sent by the AF. For another example, the terminal device may update the count value after receiving the first indication information sent by the AAnF.
[0248] In addition, the AF may also maintain a timer that is synchronized with the timers in the terminal device and the AAnF. The timer maintained by the AF may be used for the AF to send a count value to the AAnF, ie, the count value in the first message described above.
[0249] The random number described above can be generated by the terminal device or by the AAnF, and this embodiment of the present application does not specifically limit this. If the random number is generated by the AAnF, the AAnF can send the random number to the terminal device to ensure that the terminal device and the target first key identifier generated by the AAnF are the same. If the random number is generated by the terminal device, the terminal device can send the random number to the AAnF to ensure that the target first key identifier generated by the AAnF and the terminal device are the same. In some embodiments, the terminal device and the AAnF can communicate through the AUSF, such as transmitting random numbers.
[0250] The random number and / or target count value may be generated under the triggering of the first message. For example, the random number and / or target count value may be generated when the first event is satisfied. The first event may be that the AAnF is required to generate the first K based on the first information. AF The first event may include one or more of the following: the first key identifier is not included in the first message; there is no first key identifier in the AAnF; the first key identifier in the first message is consistent with the latest first key identifier in the AAnF; the A-KID in the first message is consistent with the latest A-KID in the AAnF; the count value in the first message is correct. In some embodiments, the first event may include: the first key identifier is not included in the first message and the A-KID in the first message is consistent with the latest A-KID in the AAnF. In other embodiments, the first event may include: the first key identifier in the first message is consistent with the latest first key identifier in the AAnF, and the A-KID in the first message is consistent with the latest A-KID in the AAnF. In other embodiments, the first event may include: the A-KID in the first message is consistent with the latest A-KID in the AAnF, and the count value in the first message is correct.
[0251] Taking the example of a terminal device generating a random number and / or a target count value, the generation of the random number and / or target count value by the terminal device may be triggered by first indication information sent by the AAnF. Upon receiving the first indication information sent by the AAnF, the terminal device generates a random number and / or a target count value. In other words, in response to the first indication information, the terminal device generates a random number and / or a target count value. If the terminal device generates a random number, the terminal device may also send the generated random number to the AAnF. The AAnF may send the first indication information to the terminal device if the first event is satisfied.
[0252] Taking the AAnF generating a random number and / or a target count value as an example, the AAnF may generate a random number and / or a target count value when the first event is satisfied.
[0253] Generate the first K in AAnFAF After that, the AAnF may further send second information to the AF, where the second information includes one or more of the following: AF , the first K AF The validity period of the target first key, the target first key identifier, and the identifier of the terminal device. Optionally, the second information can be carried in an application response message, such as a Naanf_AKMA application response message.
[0254] If the first K AF Based on the target count value generation, or, although the first K AF If the target first key identifier is generated based on the target first key identifier, but the terminal device has already sent the target first key identifier to the AF, the second information may not include the target first key identifier.
[0255] The terminal device's identifier can be used by AF to establish a connection between the terminal device and the first K AF The corresponding relationship between them is to facilitate the next K AF to update.
[0256] The AAnF may send the second information to the AF under the triggering of the third message. For example, the AF may send the third message to the AAnF; in response to the third message, the AAnF sends the second information to the AF. The third message may be an application request message.
[0257] In order to more clearly describe the solution of the embodiment of the present application, the following is a diagram of generating the first K with reference to FIG. 5 to FIG. 12. AF The process is described in detail. It is understood that the following scheme is mainly intended to illustrate the complete interaction process and should not limit the scheme of the embodiment of this application. For schemes not described in detail below, please refer to the description above. For ease of description, the following description will be based on the first key identifier being AF-KID.
[0258] Figures 5 to 8 show the generation of K in the key negotiation process. AF Figures 9 to 12 show the process of generating K in the key update process. AF Flow chart of the process.
[0259] Figure 5 shows a scheme for generating the first information after the primary authentication. Figures 6 to 8 show a scheme for generating the first information after the session establishment request. Figures 5 and 6 show a scheme for generating a random number by the terminal device. Figure 7 shows a scheme for generating a random number by AAnF. Figure 8 shows a scheme for generating K based on the count value. AF plan.
[0260] Figures 9 and 10 show the scheme of generating random numbers by the terminal device. Figure 11 shows the scheme of generating random numbers by AAnF. Figure 12 shows the scheme of generating K based on the count value. AF plan.
[0261] The schemes of Figures 5 to 12 are respectively introduced in detail below.
[0262] Figure 5 shows the key negotiation process between UE and AAnF. AF Flow chart of the process.
[0263] In step S510, a key negotiation is performed between the UE, the AUSF, and the AAnF. After the key negotiation, the UE and the AAnF obtain the same K AKMA .
[0264] In step S512, the UE generates a random number.
[0265] In step S514, the UE sends a random number to the AAnF.
[0266] In step S520, the UE performs the following operations based on K AKMA And random number generation AF-KID. Similarly, AAnF is also based on K AKMA and random number generation AF-KID.
[0267] For the key negotiation process, that is, the first generation of K AF In the process, the UE may not generate a random number, that is, the method shown in FIG5 may not include step S512 and step S514. In this case, the random number is empty, and the UE and AAnF may generate an AF-KID based on the empty random number.
[0268] In step S530, the UE sends a session establishment request message to the AF. The session establishment request message may carry the A-KID and the AF-KID.
[0269] In step S540, after the AF receives the session establishment request message sent by the UE, it can send the A-KID and AF-KID in the session establishment request message to the AAnF. For example, the AF sends a Naanf_AKMA application request message to the AAnF, and the Naanf_AKMA application request message may include the A-KID, AF-KID, and AF-ID.
[0270] In step S550, after receiving the A-KID and AF-KID, the AAnF can search for the KID corresponding to the A-KID. AKMA , then based on K AKMA Generate K AF In some embodiments, AAnF can be based on KAKMA And AF-KID generates K AF AAnF can be based on K AKMA And AF-KID generates K AF For the method described above, please refer to method 5 and method 6.
[0271] In step S560, AAnF can AF For example, AAnF can send a Naanf_AKMA application response message to AF, and the Naanf_AKMA application request message includes K AF , K AF validity period and UE identification.
[0272] In step S570, after receiving the Naanf_AKMA application response message sent by the AAnF, the AF may send a session establishment response message to the UE.
[0273] Figure 6 shows the key negotiation process between UE and AAnF, which generates K based on AF-KID. AF Figure 6 differs from Figure 5 in that the random number is generated after the session establishment request in Figure 6, while in Figure 5 it is generated after the primary authentication but before the session establishment request. In this case, the AF-KID in Figure 6 is sent from the AAnF to the AF, while in Figure 5 it is sent from the UE to the AF.
[0274] 6, in step 610, a key negotiation is performed between the UE, the AUSF, and the AAnF. After the key negotiation, the UE and the AAnF obtain the same K AKMA .
[0275] In step S620, the UE sends a session establishment request message to the AF. The session establishment request message may carry the A-KID.
[0276] In step S630, the UE generates a random number. Further, the UE may generate an AF-KID based on the random number; and generate a K AF .
[0277] In step S640, the UE may send a random number to the AUSF. While sending the random number to the AUSF, the UE may also send the UE's identifier. The UE's identifier may be one or more of SUPI, SUCI, and GPSI. In some embodiments, during the key negotiation process, if the AUSF stores the UE's key material information, different UEs may also be distinguished by A-KID. For example, the UE sends the random number and A-KID to the AUSF.
[0278] In step S650, AUSF sends a random number to AAnF. In some embodiments, AUSF may send the random number and the UE's identifier to AAnF. In some embodiments, in order to reduce the complexity of AUSF, AUSF may only be responsible for forwarding information, that is, AUSF sends the same information to AAnF as the UE sends to AUSF. For example, if the UE sends a random number to AUSF, AUSF sends the random number to AAnF. For another example, if the UE sends a random number and the UE's identifier to AUSF, AUSF sends the random number and the UE's identifier to AAnF.
[0279] In step S660, after receiving the session establishment request message sent by the UE, the AF may send the A-KID in the session establishment request message to the AAnF. For example, the AF sends a Naanf_AKMA application request message to the AAnF, and the Naanf_AKMA application request message may include the A-KID and the AF-ID.
[0280] In step S670, after the AAnF receives the Naanf_AKMA application request message sent by the AF, it can generate a target AF-KID based on the random number sent by the UE. Further, the AAnF can generate a K based on the target AF-KID. AF In addition, AAnF can search for the K corresponding to A-KID based on the A-KID in the Naanf_AKMA application request message. AKMA In some embodiments, AAnF can be based on K AKMA And the target AF-KID generates K AF It is understandable that AAnF and UE generate K AF The AAnF and UE generate K based on the target AF-KID. AF The methods can refer to the methods 5 and 6 described above.
[0281] In step S680, AAnF can AF For example, AAnF can send a Naanf_AKMA application response message to AF, and the Naanf_AKMA application request message includes K AF , K AF The validity period, UE identification, and target AF-KID. The target AF-KID is used in the next K AF When updating, AAnF sends the first message to use.
[0282] In step S690, after receiving the Naanf_AKMA application response message sent by the AAnF, the AF may send a session establishment response message to the UE.
[0283] Figure 7 shows the process of key negotiation between UE and AAnF, which generates K based on AF-KID. AF The difference between FIG7 and FIG6 is that the random number in FIG7 is generated by the AAnF, while the random number in FIG6 is generated by the UE.
[0284] 7, in step S710, a key negotiation is performed between the UE, the AUSF, and the AAnF. After the key negotiation, the UE and the AAnF obtain the same K AKMA .
[0285] In step S720, the UE sends a session establishment request message to the AF. The session establishment request message may carry the A-KID.
[0286] In step S730, after receiving the session establishment request message sent by the UE, the AF may send the A-KID in the session establishment request message to the AAnF. For example, the AF sends a Naanf_AKMA application request message to the AAnF, and the Naanf_AKMA application request message may include the A-KID and the AF-ID.
[0287] In step S740, after receiving the Naanf_AKMA application request message, the AAnF may generate a random number. Further, the AAnF may generate a target AF-KID based on the random number, and generate a K based on the target AF-KID. AF In addition, AAnF can search for the K corresponding to A-KID based on the A-KID in the Naanf_AKMA application request message. AKMA In some embodiments, AAnF can be based on K AKMA And the target AF-KID generates K AF AAnF generates K based on the target AF-KID AF For the method described above, please refer to method 5 and method 6.
[0288] In step S750, AAnF can AF For example, AAnF can send a Naanf_AKMA application response message to AF, and the Naanf_AKMA application request message includes K AF , K AF validity period, UE identification, target AF-KID and other information.
[0289] In step S760, the AAnF may send the random number to the AUSF. While sending the random number, the AAnF may also send the UE's identifier to the AUSF so that the AUSF knows to which UE the random number should be forwarded. The UE's identifier may be one or more of SUPI, SUCI, and GPSI. In some embodiments, during the key negotiation process, if the AUSF stores the UE's key material information, different UEs may also be distinguished by A-KID. For example, the AUSF sends the random number and A-KID to the UE.
[0290] In step S770, the AAnF sends the random number to the UE. In some embodiments, to reduce the complexity of the AUSF, the AUSF may only be responsible for forwarding information, that is, whatever information the AAnF sends to the AUSF, the AUSF sends to the UE. For example, if the AAnF sends the random number to the AUSF, the AUSF sends the random number to the UE. For another example, if the AAnF sends the random number and the UE's identifier to the AUSF, the AUSF sends the random number and the UE's identifier to the UE.
[0291] In step S780, the UE generates a target AF-KID based on the random number. Further, the UE may generate a K based on the target AF-KID. AF In some embodiments, the UE may be based on K AKMA And the target AF-KID generates K AF It is understandable that UE and AAnF generate K AF The method remains consistent.
[0292] In step S790, after receiving the Naanf_AKMA application response message sent by the AAnF, the AF may send a session establishment response message to the UE.
[0293] FIG8 shows the generation of K based on the count value AF plan.
[0294] 8, in step S810, a key negotiation is performed between the UE, the AUSF, and the AAnF. After the key negotiation, the UE and the AAnF obtain the same K AKMA .
[0295] In step S820, the UE sends a session establishment request message to the AF. The session establishment request message may carry the A-KID.
[0296] In step S830, after receiving the session establishment request message sent by the UE, the AF may send the A-KID in the session establishment request message to the AAnF. For example, the AF sends a Naanf_AKMA application request message to the AAnF, and the Naanf_AKMA application request message may include the A-KID and the AF-ID.
[0297] In step S840, after receiving the Naanf_AKMA application request message, the AAnF may generate a count value. The count value may be, for example, 0. Further, the AAnF may generate K based on the count value. AF In addition, AAnF can search for the K corresponding to A-KID based on the A-KID in the Naanf_AKMA application request message. AKMA In some embodiments, AAnF can be based on K AKMA And the count value generates K AF AAnF can generate K based on the count value AF For the method described above, please refer to method three and method four.
[0298] In step S850, AAnF can AF For example, AAnF can send a Naanf_AKMA application response message to AF, and the Naanf_AKMA application request message includes K AF , K AF The validity period, UE identification and other information.
[0299] In step S860, after the UE sends a session establishment request message to the AF, the UE may also generate a count value. The value of the count value may be, for example, 0. Further, the UE may generate K based on the count value. AF In some embodiments, the UE may be based on K AKMA And the count value generates K AF It is understandable that UE and AAnF generate K AF The method remains consistent.
[0300] In step S870, after receiving the Naanf_AKMA application response message sent by the AAnF, the AF may send a session establishment response message to the UE.
[0301] In K AF When the validity period is about to expire or has expired, AF can trigger K AF See Figures 9 to 12 for the update process. Figure 9 shows that the terminal device generates a random number to update K AF plan.
[0302] 9, in step S902, AF sends K to AAnFAF Update request message. AF The update request message may include A-KID, AF-KID, AF-ID and UP indicator Among them, UP indicator is an indication message used to distinguish it from the Naanf_AKMA application request message in step S916. AF The update request message is used to request the K AF To update, the Naanf_AKMA application request message in step S916 is used to obtain K AF Of course, if the messages in step S902 and step S916 can be distinguished, it is not necessary to AF The update request message carries UP indicator .
[0303] In step S904, AAnF receives K AF After the update request message, you can AF The A-KID and AF-KID in the update request message are checked. The process of AAnF checking the A-KID and AF-KID will be described below in conjunction with Figures 13 and 14.
[0304] In step S906, the AAnF may send a KID to the UE and / or AF according to the check result of the A-KID and AF-KID. AF Update response message: The update response message may be the second message described above, the message carrying the first indication information, or the message carrying the second indication information.
[0305] In step S908, if the UE receives the first indication information sent by the AUSF, the UE may generate a random number and send the random number to the AUSF. In some embodiments, after receiving the first indication information, the UE may also check whether there is a K AUSF There is K locally AUSF In the case of , the UE sends a random number to the AUSF. In addition, the UE can also send the UE identifier when sending the random number. The UE identifier can be one or more of SUPI, SUCI, and GPSI. For example, the UE can send K to the AUSF. AF Update news, the K AF The update message includes a random number and SUCI.
[0306] In step S910, after AUSF receives the random number sent by the UE, it may forward the random number to the AAnF. The random number may be carried in a key material update message. While sending the random number to the AAnF, the AUSF may also send the UE's identifier. For example, the AUSF sends a key material update message to the AAnF, and the key material update message includes a random number and the UE's identifier. In some embodiments, in order to reduce the complexity of the AUSF, the AUSF may only be responsible for forwarding information, that is, whatever information the UE sends to the AUSF, the AUSF sends to the AAnF. For example, if the UE sends a random number to the AUSF, the AUSF sends the random number to the AAnF. For another example, if the UE sends a random number and the UE's identifier to the AUSF, the AUSF sends the random number and the UE's identifier to the AAnF.
[0307] In step S912, after the AAnF receives the random number, it may generate a target AF-KID based on the random number. The method in which the AAnF generates the target AF-KID may be any of the methods described above. For example, the method a and method b described above. In addition, the UE may also generate a target AF-KID based on the random number. The method in which the UE generates the target AF-KID is the same as the method in which the AAnF generates the target AF-KID. The UE may further generate a K based on the target AF-KID. AF .
[0308] In step S914, the UE sends an application session establishment request to the AF. The application session establishment request may also be an application session reestablishment request. The application session establishment request includes the A-KID and the target AF-KID. The A-KID and the target AF-KID may be the latest local A-KID and AF-KID of the UE.
[0309] In step S916, after receiving the application session establishment request sent by the UE, the AF may send a Naanf_AKMA application request message to the AF. The Naanf_AKMA application request message may include the A-KID, the target AF-KID, and the AF-ID.
[0310] In step S918, the AAnF may generate a K based on the target AF-KID. AF AAnF generates K based on the target AF-KID AF Please refer to the above description, such as the above described method 5 and method 6.
[0311] In step S920, AAnF sends a Naanf_AKMA application response message to AF. The Naanf_AKMA application response message may include K AF , K AF The validity period and UE identification.
[0312] At step S922, after receiving the Naanf_AKMA application response message sent by the AAnF, the AF may send an application session establishment response to the UE. The application session establishment response may also be an application session reestablishment response.
[0313] FIG9 shows that the terminal device generates a random number to update K AF The difference between Figure 10 and Figure 9 lies in step S902, step S913 and step S920. In Figure 9, AAnF generates K after step S912, step S914, step S916 and step S918. AF In FIG10 , AAnF can directly generate K in step S913. AF In addition, since step S916 is omitted, the UP indicator , that is, there is no need to AF For the sake of brevity, only the different steps are introduced here. For other steps, please refer to the description of Figure 9.
[0314] 10, in step S913, after receiving the random number sent by the UE, the AAnF can directly generate a target AF-KID based on the random number; and generate a K based on the target AF-KID. AF .
[0315] In step S920, AAnF generates K AF , you can send the K to AF AF For example, AAnF sends Naanf_AKMA application response message to AF, and the application response message may include K AF , K AF The validity period, UE identity and target AF-KID. Different from Figure 9, the target AF-KID in Figure 10 is sent by the AAnF to the AF through the Naanf_AKMA application response message, while the target AF-KID in Figure 9 is sent by the UE to the AF through the application session reestablishment request.
[0316] Figure 11 shows that AAnF generates random numbers to update K AF The steps in Figure 11 are described below.
[0317] In step S1102, AF sends K to AAnF. AF Update request message. AF The update request message may include A-KID, AF-KID, and AF-ID.
[0318] In step S1104, AAnF receives K AF After the update request message, you can AF The A-KID and AF-KID in the update request message are checked. The process of AAnF checking the A-KID and AF-KID will be described below in conjunction with Figures 13 and 14.
[0319] In step S1106, the AAnF may determine whether to generate a random number based on the results of the A-KID and AF-KID inspection. If a random number needs to be generated, the AAnF generates a random number and generates a target AF-KID based on the random number; and generates a KID based on the target AF-KID. AF .
[0320] In step S1108, the AAnF may send a KID to the UE and / or AF according to the check result of the A-KID and AF-KID. AF Update response message. AF The update response message may be the second message described above, a message carrying the first indication information, or a message carrying the second indication information.
[0321] In step S1110, AAnF sends K to AF. AF For example, AAnF may send a Naanf_AKMA application response message to AF, and the Naanf_AKMA application response message may include K AF In addition, the Naanf_AKMA application response message may also include K AF The validity period, UE identification and target AF-KID. The target AF-KID is used in the next K AF When updating, AAnF sends the first message to use.
[0322] In step S1112, the AAnF sends a random number to the AUSF. The random number can be carried in a key material update message. In addition, the AAnF can also send the UE identifier while sending the random number. The UE identifier can be one or more of SUPI, SUCI, and GPSI. The UE identifier can be one or more of SUPI, SUCI, and GPSI. The UE identifier can be used by the AUSF to determine to which UE the random number should be sent. For example, the AAnF sends a key material update message to the AUSF, and the key material update message includes a random number and the UE identifier.
[0323] In step S1114, after receiving the random number sent by AAnF, AUSF can forward the random number to UE. AFUpdate message. AUSF can also send the UE's identity while sending the random number to the UE. For example, AUSF sends K AF Update news, the K AF The update message includes a random number and the UE's identifier. In some embodiments, in order to reduce the complexity of AUSF, AUSF may only be responsible for forwarding information, that is, whatever information the AAnF sends to the AUSF, the AUSF will send the same information to the UE. For example, if the AAnF sends a random number to the AUSF, the AUSF will send the random number to the UE. For another example, if the AAnF sends a random number and the UE's identifier to the AUSF, the AUSF will send the random number and the UE's identifier to the UE.
[0324] In some embodiments, the method shown in FIG. 11 may also not have step S1112 and step S1114, and AAnF may be performed by K AF Update response message sends random number to UE. For example, AAnF sends random number to UE through K AF When the update response message sends the first indication information to the UE, the K AF Alternatively, in some embodiments, the AAnF may not send the first indication information to the UE, but only send a random number, which may be used to instruct the UE to generate K based on the first information. AF After receiving the random number, the UE can generate K based on the first information. AF .
[0325] In step S1116, after receiving the random number, the UE may generate a target AF-KID based on the random number. The UE may further generate a K AF .
[0326] At step S1118, after receiving the Naanf_AKMA application response message sent by the AAnF, the AF may send an application session establishment response to the UE. The application session establishment response may also be an application session reestablishment response.
[0327] FIG12 shows the generation of K based on the count value. AF The steps in FIG12 are described below.
[0328] In step S1202, AF sends K to AAnF. AF Update request message. AF The update request message may include A-KID, count value and AF-ID. The count value is generated by the counter in AF. UE, AAnF and AF maintain a counter. The initialization values of these three counters are the same. AFWhen updating, UE, AAnF and AF add 1 to their respective counters. For example, AF can send K AF After the update request message, the counter is incremented by 1; or AF can send K to AAnF. AF Before sending the update request message, the counter is incremented by 1.
[0329] In step S1204, AAnF receives K AF After the update request message, you can AF The A-KID and the count value in the update request message are checked. The process of the AAnF checking the A-KID and the count value will be described below in conjunction with Figures 13 and 14.
[0330] In step S1206, the AAnF may send a K ID to the UE and / or AF based on the check result of the A-KID and the count value. AF Update response message. AF The update response message may be the second message described above, a message carrying the first indication information, or a message carrying the second indication information.
[0331] In step S1208, AAnF generates a target count value. For example, AAnF can add 1 to the counter to generate the target count value. Further, AAnF can generate K based on the target count value. AF Since the UE can generate the target count value by itself, the AAnF does not need to send the target count value to the UE.
[0332] In step S1210, the UE generates a target count value. For example, the UE may add 1 to the counter to generate the target count value. Further, the UE may generate K based on the target count value. AF The UE may generate a target count value upon receiving the first indication information sent by the AAnF.
[0333] In step S1212, AAnF sends K to AF. AF For example, AAnF may send a Naanf_AKMA application response message to AF, and the Naanf_AKMA application response message may include K AF In addition, the Naanf_AKMA application response message may also include K AF Of course, in some embodiments, since the AF can generate the target count value by itself, the AAnF may not send the target count value to the AF.
[0334] At step S1214, after receiving the Naanf_AKMA application response message sent by the AAnF, the AF may send an application session establishment response to the UE. The application session establishment response may also be an application session reestablishment response.
[0335] The following describes in detail the process of AAnF checking A-KID and AF-KID with reference to FIG13 and FIG14.
[0336] In step S1310, AAnF can first determine K AF Whether the A-KID in the update request message is consistent with the latest A-KID in the AAnF. If they are consistent, the AAnF can execute the process of step S1320. If they are inconsistent, the AAnF can determine that the UE has performed a new primary authentication. In this case, the AAnF can follow the traditional method (as shown in Figures 2 and 3) based on the latest K AKMA Generate the second K AF In addition, the AAnF may also send a second indication message to the UE to instruct the UE to AKMA Generate the second K AF .
[0337] In step S1320, AAnF determines K AF Update the AF-KID in the request message and the latest AF-KID in the AAnF. If they are consistent, the AAnF generates the K AF If not, AAnF may reject the update and send a second message to AF to indicate K AF Update failed.
[0338] Of course, in addition to the above inspection methods, AAnF can also AF Check whether the update request message contains AF-KID. In this case, the process of AAnF checking A-KID and AF-KID can be seen in Figure 8.
[0339] In step S1410, AAnF can first determine K AF Whether the A-KID in the update request message is consistent with the latest A-KID in the AAnF. If they are consistent, the AAnF can continue to execute the process of step S1420. If they are inconsistent, the AAnF can determine that the UE has performed a new primary authentication. In this case, the AAnF can follow the traditional method (as shown in Figures 2 and 3) based on the latest K AKMA Generate the second K AF In addition, the AAnF may also send a second indication message to the UE to instruct the UE to AKMA Generate the second K AF .
[0340] In step S1420, AAnF determines K AF Is there AF-KID in the update request message? AF There is no AF-KID in the update request message and there is no AF-KID in the AAnF, then the AAnF can generate the K AF If K AF If the update request message contains AF-KID, the AAnF may continue to execute the process of step S1430.
[0341] In step S1430, AAnF determines K AF Whether the AF-KID in the update request message is consistent with the latest AF-KID in the AAnF. If they are consistent, the AAnF can generate the K AF If not, AAnF may reject the update and send a second message to AF to indicate K AF Update failed.
[0342] The following describes in detail the process of AAnF checking the A-KID and the count value with reference to FIG15 .
[0343] In step S1510, AAnF can first determine K AF Whether the A-KID in the update request message is consistent with the latest A-KID in the AAnF. If they are consistent, the AAnF can execute the process of step S1520. If they are inconsistent, the AAnF can determine that the UE has performed a new primary authentication. In this case, the AAnF can follow the traditional method (as shown in Figures 2 and 3) based on the latest K AKMA Generate the second K AF In addition, the AAnF may also send a second indication message to the UE to instruct the UE to AKMA Generate the second K AF .
[0344] In step S1520, AAnF determines K AF Update the count value in the request message to determine whether it is correct. If correct, the AAnF can generate a first K based on the first information. AF If not, AAnF may reject the update and send a second message to AF to indicate K AF Update failed.
[0345] It is understood that the KDF input parameters described above are merely examples, and embodiments of the present application are not limited to the aforementioned parameters and may also include other optional parameters, such as fixed parameters set by the application system. Furthermore, the aforementioned interaction process is merely an example, and embodiments of the present application may also include optional information elements required by the application system.
[0346] The method embodiment of the present application is described in detail above in conjunction with Figures 4 to 15 , and the device embodiment of the present application is described in detail below in conjunction with Figures 16 to 19 . It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, and therefore, for portions not described in detail, reference can be made to the above method embodiment.
[0347] FIG16 is a schematic structural diagram of a device for generating a key according to an embodiment of the present application. The device 900 shown in FIG16 may be an AAnF. The device 1600 may include a generating unit 1610.
[0348] Generating unit 1610, configured to generate a first K based on the first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between terminal devices and application functions AF.
[0349] In some embodiments, the apparatus 1600 further includes: a receiving unit 1620, configured to receive a first message sent by the AF; wherein the first K AF It is generated under the trigger of the first message.
[0350] In some embodiments, the random number and / or the target count value is generated under the triggering of the first message.
[0351] In some embodiments, the random number and / or the target count value is generated when a first event is satisfied, wherein the first event includes one or more of the following: the first message does not include the first key identifier; the AAnF does not contain the first key identifier; the first key identifier in the first message is consistent with the latest first key identifier in the AAnF; the K in the first message is consistent with the latest first key identifier in the AAnF; AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; the count value in the first message is correct.
[0352] In some embodiments, the apparatus 1600 further includes: a sending unit configured to send first indication information to the terminal device, wherein the first indication information is configured to instruct the terminal device to generate the first K based on the first information. AF .
[0353] In some embodiments, the generating unit 1610 is configured to: when the second event is satisfied, generate the AKMA , generate the second K AF The second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers of the first message are inconsistent; K AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
[0354] In some embodiments, the apparatus 1600 further includes a sending unit configured to: send second indication information to the terminal device, wherein the second indication information is used to instruct the terminal device to perform the operation based on the latest K AKMA , generate the second K AF .
[0355] In some embodiments, the apparatus 1600 further includes a sending unit configured to: send a second message to the AF when a third event is satisfied, wherein the second message is configured to indicate that the K AF Update failure; the third event includes one or more of the following: the first information in the first message is inconsistent with the first information in the AAnF; the count value in the first message is incorrect.
[0356] In some embodiments, the random number is generated by the AAnF.
[0357] In some embodiments, the apparatus 1600 further includes a sending unit configured to send the random number to the terminal device.
[0358] In some embodiments, the random number is generated by the terminal device.
[0359] In some embodiments, the apparatus 1600 further includes a receiving unit configured to receive the random number sent by the terminal device.
[0360] In some embodiments, the target first key identifier is based on the random number and the K to be updated. AF generate.
[0361] In some embodiments, the apparatus 1600 further includes a sending unit configured to send second information to the AF, wherein the second information includes one or more of the following: the first K AF 、The first K AF validity period, the target first key identifier, the target count value, and the identifier of the terminal device.
[0362] In some embodiments, the apparatus 1600 further includes a receiving unit configured to: before the AAnF sends the second information to the AF, receive a third message sent by the AF, wherein the third message is used to obtain the first K AF .
[0363] FIG17 is a schematic structural diagram of a device for generating a key according to an embodiment of the present application. The device 1700 shown in FIG17 may be a terminal device. The device 1700 may include a generating unit 1710.
[0364] Generating unit 1710, configured to generate a first K based on the first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and AF.
[0365] In some embodiments, the first K AF It is generated under the trigger of the first message, which is sent by the AF to the authentication and key management anchor function AAnF of the application.
[0366] In some embodiments, the random number and / or the target count value is generated under the triggering of the first message.
[0367] In some embodiments, the random number is generated when a first event is satisfied, wherein the first event includes one or more of the following: the first message does not include the first key identifier; the AAnF does not contain the first key identifier; the first key identifier in the first message is consistent with the latest first key identifier in the AAnF; the K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; the count value in the first message is correct.
[0368] In some embodiments, the apparatus 1700 further includes a receiving unit 1720 configured to: receive first indication information sent by the AAnF, wherein the first indication information is configured to instruct the terminal device to generate the first K based on the first information. AF .
[0369] In some embodiments, the generating unit 1710 is configured to: when the second event is satisfied, based on the latest K AKMA , generate the second K AF The second event includes one or more of the following: K in the first message AKMAThe key identifier is the latest K in the AAnF AKMA The key identifiers of the first message are inconsistent; K AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
[0370] In some embodiments, the apparatus 1700 further includes a receiving unit configured to: receive second indication information sent by the AAnF, wherein the second indication information is configured to instruct the terminal device to perform the operation based on the latest K AKMA , generate the second K AF .
[0371] In some embodiments, the random number is generated by AAnF.
[0372] In some embodiments, the apparatus 1700 further includes a receiving unit configured to receive the random number sent by the AAnF.
[0373] In some embodiments, the target random number is generated by the terminal device.
[0374] In some embodiments, the apparatus 1700 further includes a sending unit configured to send the random number to the AAnF.
[0375] In some embodiments, the target first key identifier is based on the random number and the K to be updated. AF generate.
[0376] FIG18 is a schematic structural diagram of a device for generating a key provided by an embodiment of the present application. The device 1800 shown in FIG18 may be an AF. The device 1800 may include a receiving unit 1810.
[0377] Receiving unit 1810, configured to receive the first K sent by AAnF AF , the first K AF Generated based on first information, the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and the AF.
[0378] In some embodiments, the apparatus 1800 further includes a sending unit 1820 configured to: send a first message to the AAnF; wherein the first K AF It is generated under the trigger of the first message.
[0379] In some embodiments, the random number and / or the target count value is generated under the triggering of the first message.
[0380] In some embodiments, the random number and / or the target count value is generated when a first event is satisfied, wherein the first event includes one or more of the following: the first message does not include the first key identifier; the AAnF does not contain the first key identifier; the first key identifier in the first message is consistent with the latest first key identifier in the AAnF; the K in the first message is consistent with the latest first key identifier in the AAnF; AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; the count value in the first message is correct.
[0381] In some embodiments, the receiving unit 1810 is configured to: receive the second K sent by the AAnF AF , the second K AF Based on the latest K AKMA Generate the second K AF is generated when a second event is satisfied, wherein the second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers of the first message are inconsistent; K AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
[0382] In some embodiments, the receiving unit 1810 is configured to: receive a second message sent by the AAnF, wherein the second message is configured to indicate that K AF The update fails, and the second message is generated when a third event is satisfied, and the third event includes one or more of the following: the first information in the first message is inconsistent with the first information in the AAnF; the count value in the first message is incorrect.
[0383] In some embodiments, the random number is generated by the AAnF.
[0384] In some embodiments, the random number is generated by the terminal device.
[0385] In some embodiments, the target first key identifier is based on the random number and the K to be updated. AF generate.
[0386] In some embodiments, the receiving unit 1810 is configured to: receive second information sent by the AAnF, where the second information includes one or more of the following: AF 、The first K AF validity period, the target first key identifier, the target count value, and the identifier of the terminal device.
[0387] In some embodiments, the apparatus 1800 further includes a sending unit configured to: before the AF receives the second information sent by the AAnF, send a third message to the AAnF, wherein the third message is used to obtain the first K AF .
[0388] Figure 19 is a schematic block diagram of a device for generating a key according to an embodiment of the present application. The dashed lines in Figure 19 indicate that the unit or module is optional. Device 1900 can be used to implement the method described in the above method embodiment. Device 1900 can be a chip, a terminal device, an AF, or an AAnF.
[0389] The device 1900 may include one or more processors 1910. The processor 1910 may support the device 1900 to implement the method described in the above method embodiment. The processor 1910 may be a general-purpose processor or a special-purpose processor. For example, the processor may be a central processing unit (CPU). Alternatively, the processor may be another general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0390] The apparatus 1900 may further include one or more memories 1920. The memories 1920 store programs that can be executed by the processor 1910, causing the processor 1910 to perform the methods described in the above method embodiments. The memories 1920 may be independent of the processor 1910 or integrated into the processor 1910.
[0391] The apparatus 1900 may further include a transceiver 1930. The processor 1910 may communicate with other devices or chips via the transceiver 1930. For example, the processor 1910 may transmit and receive data with other devices or chips via the transceiver 1930.
[0392] The present application also provides a computer-readable storage medium for storing a program. The computer-readable storage medium can be applied to a terminal or network device provided in the present application, and the program enables a computer to execute the method performed by the terminal or network device in each embodiment of the present application.
[0393] The present application also provides a computer program product. The computer program product includes a program. The computer program product can be applied to a terminal or network device provided in the present application, and the program causes a computer to execute the method performed by the terminal or network device in each embodiment of the present application.
[0394] The embodiments of the present application also provide a computer program. The computer program can be applied to the terminal or network device provided in the embodiments of the present application, and the computer program enables a computer to execute the method performed by the terminal or network device in each embodiment of the present application.
[0395] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A, but B can also be determined based on A and / or other information.
[0396] It should be understood that the term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the related objects are in an "or" relationship.
[0397] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0398] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for generating a key, characterized in that: include: The application authentication and key management anchor function AAnF generates a first K based on the first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between terminal devices and application functions AF.
2. The method according to claim 1, characterized in that The method further comprises: The AAnF receives a first message sent by the AF; Among them, the first K AF It is generated under the trigger of the first message.
3. The method according to claim 2, characterized in that The random number and / or the target count value are generated under the triggering of the first message.
4. The method according to claim 3, characterized in that The random number and / or the target count value are generated when a first event is satisfied, where the first event includes one or more of the following: The first message does not include a first key identifier; There is no first key identifier in the AAnF; The first key identifier in the first message is consistent with the latest first key identifier in the AAnF; K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; The count value in the first message is correct.
5. The method according to claim 4, characterized in that The method further comprises: The AAnF sends first indication information to the terminal device, where the first indication information is used to instruct the terminal device to generate the first K based on the first information. AF .
6. The method according to claim 4 or 5, characterized in that The method further comprises: When the second event is satisfied, the AAnF is based on the latest K AKMA , generate the second K AF ; The second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers are inconsistent; K in the first message AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
7. The method according to claim 6, characterized in that The method further comprises: The AAnF sends second indication information to the terminal device, and the second indication information is used to instruct the terminal device to AKMA , generate the second K AF .
8. The method according to any one of claims 4 to 7, characterized in that The method further comprises: When the third event is met, the AAnF sends a second message to the AF, where the second message is used to indicate K AF Update failed; The third event includes one or more of the following: The first information in the first message is inconsistent with the first information in the AAnF; The count value in the first message is incorrect.
9. The method according to any one of claims 1 to 8, characterized in that The random number is generated by the AAnF.
10. The method according to claim 9, characterized in that The method further comprises: The AAnF sends the random number to the terminal device.
11. The method according to any one of claims 1 to 8, characterized in that The random number is generated by the terminal device.
12. The method according to claim 11, characterized in that The method further comprises: The AAnF receives the random number sent by the terminal device.
13. The method according to any one of claims 1 to 12, characterized in that The target first key identifier is based on the random number and the K to be updated AF generate.
14. The method according to any one of claims 1 to 13, characterized in that The method further comprises: The AAnF sends second information to the AF, where the second information includes one or more of the following: AF 、The first K AF validity period, the target first key identifier, the target count value, and the identifier of the terminal device.
15. The method according to claim 14, characterized in that Before the AAnF sends the second information to the AF, the method further includes: The AAnF receives a third message sent by the AF, where the third message is used to obtain the first K AF .
16. A method for generating a key, characterized in that: include: The terminal device generates a first K based on the first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and the application function AF.
17. The method according to claim 16, characterized in that The first K AF It is generated under the trigger of the first message, which is sent by the AF to the authentication and key management anchor function AAnF of the application.
18. The method according to claim 17, characterized in that The random number and / or the target count value are generated under the triggering of the first message.
19. The method according to claim 18, characterized in that The random number is generated when a first event is satisfied, wherein the first event includes one or more of the following: The first message does not include a first key identifier; There is no first key identifier in the AAnF; The first key identifier in the first message is consistent with the latest first key identifier in the AAnF; K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; The count value in the first message is correct.
20. The method according to claim 19, wherein The method further comprises: The terminal device receives first indication information sent by the AAnF, where the first indication information is used to instruct the terminal device to generate the first K based on the first information. AF .
21. The method according to claim 19 or 20, characterized in that The method further comprises: When the second event is met, the terminal device AKMA , generate the second K AF ; The second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers are inconsistent; K in the first message AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
22. The method according to claim 21, characterized in that The method further comprises: The terminal device receives the second indication information sent by the AAnF, and the second indication information is used to instruct the terminal device to AKMA , generate the second K AF .
23. The method according to any one of claims 16 to 22, characterized in that The random number is generated by AAnF.
24. The method according to claim 23, wherein The method further comprises: The terminal device receives the random number sent by the AAnF.
25. The method according to any one of claims 16 to 22, characterized in that The target random number is generated by the terminal device.
26. The method according to claim 25, characterized in that The method further comprises: The terminal device sends the random number to the AAnF.
27. The method according to any one of claims 16 to 26, characterized in that The target first key identifier is based on the random number and the K to be updated AF generate.
28. A method for generating a key, characterized in that: include: The application function AF receives the first K sent by the application's authentication and key management anchor function AAnF AF , the first K AF Generated based on first information, the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and the AF.
29. The method according to claim 28, characterized in that The method further comprises: The AF sends a first message to the AAnF; Among them, the first K AF It is generated under the trigger of the first message.
30. The method according to claim 29, wherein The random number and / or the target count value are generated under the triggering of the first message.
31. The method according to claim 30, wherein The random number and / or the target count value are generated when a first event is satisfied, where the first event includes one or more of the following: The first message does not include a first key identifier; There is no first key identifier in the AAnF; The first key identifier in the first message is consistent with the latest first key identifier in the AAnF; K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; The count value in the first message is correct.
32. The method according to claim 30 or 31, characterized in that The method further comprises: The AF receives the second K sent by the AAnF AF , the second K AF Based on the latest K AKMA generate, The second K AF It is generated when a second event is satisfied, where the second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers are inconsistent; K in the first message AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
33. The method according to any one of claims 29 to 32, characterized in that The method further comprises: The AF receives the second message sent by the AAnF, wherein the second message is used to indicate K AF The update fails, and the second message is generated when the third event is satisfied. The third event includes one or more of the following: The first information in the first message is inconsistent with the first information in the AAnF; The count value in the first message is incorrect.
34. The method according to any one of claims 28 to 33, wherein: The random number is generated by the AAnF.
35. The method according to any one of claims 28 to 33, wherein The random number is generated by the terminal device.
36. The method according to any one of claims 28 to 35, characterized in that The target first key identifier is based on the random number and the K to be updated AF generate.
37. The method according to any one of claims 28 to 36, characterized in that The method further comprises: The AF receives the second information sent by the AAnF, where the second information includes one or more of the following: AF 、The first K AF validity period, the target first key identifier, the target count value, and the identifier of the terminal device.
38. The method according to claim 37, wherein Before the AF receives the second information sent by the AAnF, the method further includes: The AF sends a third message to the AAnF, wherein the third message is used to obtain the first K AF .
39. A device for generating a key, characterized in that: The device is an application authentication and key management anchor function AAnF, and the device includes: A generating unit, configured to generate a first K based on the first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between terminal devices and application functions AF.
40. The device according to claim 39, characterized in that The device further comprises: a receiving unit, configured to receive a first message sent by the AF; Among them, the first K AF It is generated under the trigger of the first message.
41. The device according to claim 40, characterized in that The random number and / or the target count value are generated under the triggering of the first message.
42. The device according to claim 41, characterized in that The random number and / or the target count value are generated when a first event is satisfied, where the first event includes one or more of the following: The first message does not include a first key identifier; There is no first key identifier in the AAnF; The first key identifier in the first message is consistent with the latest first key identifier in the AAnF; K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; The count value in the first message is correct.
43. The device according to claim 42, characterized in that The device further comprises: A sending unit, configured to send first indication information to the terminal device, wherein the first indication information is used to instruct the terminal device to generate the first K AF .
44. The device according to claim 42 or 43, characterized in that The generating unit is used for: When the second event is met, based on the latest K AKMA , generate the second K AF ; The second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers are inconsistent; K in the first message AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
45. The device according to claim 44, characterized in that The device further includes a sending unit, configured to: Sending second indication information to the terminal device, wherein the second indication information is used to instruct the terminal device to AKMA , generate the second K AF .
46. The device according to any one of claims 42 to 45, characterized in that The device further includes a sending unit, configured to: When the third event is met, a second message is sent to the AF, wherein the second message is used to indicate K AF Update failed; The third event includes one or more of the following: The first information in the first message is inconsistent with the first information in the AAnF; The count value in the first message is incorrect.
47. The device according to any one of claims 39 to 46, characterized in that The random number is generated by the AAnF.
48. The device according to claim 47, characterized in that The device further includes a sending unit, configured to: Sending the random number to the terminal device.
49. The device according to any one of claims 39 to 46, characterized in that The random number is generated by the terminal device.
50. The device according to claim 49, characterized in that The device further includes a receiving unit, configured to: Receive the random number sent by the terminal device.
51. The device according to any one of claims 39-50, characterized in that The target first key identifier is based on the random number and the K to be updated AF generate.
52. The device according to any one of claims 39 to 51, characterized in that The device further includes a sending unit, configured to: Sending second information to the AF, the second information including one or more of the following: the first K AF 、The first K AF validity period, the target first key identifier, the target count value, and the identifier of the terminal device.
53. The device according to claim 52, characterized in that The device further includes a receiving unit configured to: before the AAnF sends the second information to the AF, receive a third message sent by the AF, wherein the third message is used to obtain the first K AF .
54. A device for generating a key, characterized in that The device is a terminal device, and the device includes: A generating unit, configured to generate a first K based on the first information AF , the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and the application function AF.
55. The device according to claim 54, characterized in that The first K AF It is generated under the trigger of the first message, which is sent by the AF to the authentication and key management anchor function AAnF of the application.
56. The device according to claim 55, characterized in that The random number and / or the target count value are generated under the triggering of the first message.
57. The device according to claim 56, characterized in that The random number is generated when a first event is satisfied, wherein the first event includes one or more of the following: The first message does not include a first key identifier; There is no first key identifier in the AAnF; The first key identifier in the first message is consistent with the latest first key identifier in the AAnF; K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; The count value in the first message is correct.
58. The device according to claim 57, characterized in that The device further includes a receiving unit, configured to: Receive the first indication information sent by the AAnF, where the first indication information is used to instruct the terminal device to generate the first K based on the first information. AF .
59. The device according to claim 57 or 58, characterized in that The generating unit is used for: When the second event is met, based on the latest K AKMA , generate the second K AF ; The second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers are inconsistent; K in the first message AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
60. The device according to claim 59, characterized in that The device further includes a receiving unit, configured to: Receive the second indication information sent by the AAnF, the second indication information is used to instruct the terminal device to AKMA , generate the second K AF .
61. The device according to any one of claims 54 to 60, characterized in that The random number is generated by AAnF.
62. The device according to claim 61, characterized in that The device further includes a receiving unit, configured to: Receive the random number sent by the AAnF.
63. The device according to any one of claims 54 to 60, characterized in that The target random number is generated by the terminal device.
64. The device according to claim 63, characterized in that The device further includes a sending unit, configured to: The random number is sent to AAnF.
65. The device according to any one of claims 54 to 64, characterized in that The target first key identifier is based on the random number and the K to be updated AF generate.
66. A device for generating a key, characterized in that The device is an application function AF, and the device includes: The receiving unit is used to receive the first K sent by the application authentication and key management anchor function AAnF AF , the first K AF Generated based on first information, the first information is a target first key identifier generated based on a random number, and / or the first information is a target count value generated by a counter, the first K AF Used for communication between the terminal device and the AF.
67. The device according to claim 66, characterized in that The device further includes a sending unit, configured to: Sending a first message to the AAnF; Among them, the first K AF It is generated under the trigger of the first message.
68. The device according to claim 67, characterized in that The random number and / or the target count value are generated under the triggering of the first message.
69. The device according to claim 68, characterized in that The random number and / or the target count value are generated when a first event is satisfied, where the first event includes one or more of the following: The first message does not include a first key identifier; There is no first key identifier in the AAnF; The first key identifier in the first message is consistent with the latest first key identifier in the AAnF; K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifier is consistent; The count value in the first message is correct.
70. The device according to claim 68 or 69, characterized in that The receiving unit is used for: Receive the second K sent by the AAnF AF , the second K AF Based on the latest K AKMA generate, The second K AF It is generated when a second event is satisfied, where the second event includes one or more of the following: K in the first message AKMA The key identifier is the latest K in the AAnF AKMA The key identifiers are inconsistent; K in the first message AKMA The key identifier is the historical K in the AAnF AKMA One of the key identifiers.
71. The device according to any one of claims 67 to 70, characterized in that The receiving unit is used for: Receive a second message sent by the AAnF, the second message being used to indicate K AF The update fails, and the second message is generated when the third event is satisfied. The third event includes one or more of the following: The first information in the first message is inconsistent with the first information in the AAnF; The count value in the first message is incorrect.
72. The device according to any one of claims 66 to 71, characterized in that The random number is generated by the AAnF.
73. The device according to any one of claims 66 to 71, characterized in that The random number is generated by the terminal device.
74. The device according to any one of claims 66 to 73, characterized in that The target first key identifier is based on the random number and the K to be updated AF generate.
75. The device according to any one of claims 66 to 74, characterized in that The receiving unit is used for: Receive the second information sent by the AAnF, the second information including one or more of the following: the first K AF 、The first K AF validity period, the target first key identifier, the target count value, and the identifier of the terminal device.
76. The device according to claim 75, characterized in that The device further includes a sending unit configured to: before the AF receives the second information sent by the AAnF, send a third message to the AAnF, wherein the third message is used to obtain the first K AF .
77. A device for generating a key, characterized in that The device comprises a memory, a processor and a communication interface, wherein the memory is used to store a program, and the processor is used to call the program in the memory, so that the device executes the method according to any one of claims 1 to 15.
78. A device for generating a key, characterized in that The device comprises a memory, a processor and a communication interface, wherein the memory is used to store a program, and the processor is used to call the program in the memory, so that the device executes the method according to any one of claims 16 to 27.
79. A device for generating a key, characterized in that The device comprises a memory, a processor and a communication interface, wherein the memory is used to store a program, and the processor is used to call the program in the memory, so that the device executes the method according to any one of claims 28 to 38.
80. A device, characterized in that The device comprises a processor, configured to call a program from a memory to execute the method according to any one of claims 1 to 15.
81. A device, characterized in that The device comprises a processor configured to call a program from a memory to execute the method according to any one of claims 16 to 27.
82. A device, characterized in that The device comprises a processor configured to call a program from a memory to execute the method according to any one of claims 28 to 38.
83. A chip, characterized in that The device comprises a processor configured to call a program from a memory so that a device equipped with the chip executes the method according to any one of claims 1 to 15.
84. A chip, characterized in that The device comprises a processor configured to call a program from a memory so that a device equipped with the chip executes the method according to any one of claims 16 to 27.
85. A chip, characterized in that The device comprises a processor configured to call a program from a memory so that a device equipped with the chip executes the method according to any one of claims 28 to 38.
86. A computer-readable storage medium, characterized in that A program is stored thereon, and the program causes a computer to execute the method according to any one of claims 1 to 15.
87. A computer-readable storage medium, characterized in that A program is stored thereon, the program causing a computer to execute the method according to any one of claims 16 to 27.
88. A computer-readable storage medium, characterized in that A program is stored thereon, the program causing a computer to execute the method according to any one of claims 28 to 38.
89. A computer program product, characterized in that The method comprises a program for causing a computer to execute the method according to any one of claims 1 to 15.
90. A computer program product, characterized in that The method comprises a program for causing a computer to execute the method according to any one of claims 16 to 27.
91. A computer program product, characterized in that The method comprises a program for causing a computer to execute the method according to any one of claims 28 to 38.
92. A computer program, characterized in that The computer program enables a computer to execute the method according to any one of claims 1 to 15.
93. A computer program, characterized in that The computer program causes a computer to execute the method according to any one of claims 16 to 27.
94. A computer program, characterized in that The computer program causes a computer to execute the method according to any one of claims 28 to 38.
