Method for generating key and related device

By negotiating the key derivation function between the key management system and the terminal under the universal boot architecture, combining the terminal and network application function keys to generate the session key, and dynamically updating the key lifetime, the session key problem under the universal boot architecture is solved. It solves the problem of difficulty in ensuring key security and achieves efficient security protection of session keys.

CN114584289BActive Publication Date: 2024-09-27CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011379901.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-01
Publication Date
2024-09-27
Estimated Expiration
2040-12-01

AI Technical Summary

Technical Problem

Under the universal boot architecture, the security of session keys is difficult to guarantee and is vulnerable to network attacks and leakage.

Method used

By negotiating the key derivation function between the key management system and the terminal, the session key is generated by combining the terminal and network application function keys, and the key lifetime is dynamically updated to ensure that the session key is not stored in the intermediate platform to avoid leakage .

Benefits of technology

The security of the session key under the universal boot architecture is improved to prevent key leakage. Even if the intermediate platform is attacked, the final generated session key will not be affected.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114584289B
    Figure CN114584289B
Patent Text Reader

Abstract

The present disclosure provides a method, system, device, network application function and non-transient computer-readable storage medium for generating keys, and relates to the field of communication technology. The method for generating keys includes: the network application function responds to a communication request initiated by a target application on a terminal, and sends a key request of the target application on the terminal to a key management system; the network application function receives the key of the target application on the terminal sent by the key management system; the network application function generates a session key used when communicating with the target application on the terminal according to a key derivation function negotiated with the terminal, the key of the target application on the terminal, and the network application function key received from a binding support function. The present disclosure can improve the security of session keys under a universal boot architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a method, system, device, network application function and non-transitory computer-readable storage medium for generating a key. Background Art

[0002] In the Internet age, people have an urgent need for communication security. The security and reliability of session keys are the basic guarantee for communication security.

[0003] The 3GPP TS33.220 standard describes a method for distributing shared keys to network application functions using GBA (Generic Bootstrapping Architecture). The terminal uses the root key data of the SIM (Subscriber Identity Module) card to derive the session key of the NAF (Network Application Function), which is then passed to the network application function by the BSF (Bootstrapping Server Function) in the GBA, so that the terminal and the network application function have the same session key and use the same session key for communication. Summary of the invention

[0004] A technical problem solved by the present disclosure is how to improve the security of session keys under a universal bootstrapping architecture.

[0005] According to a first aspect of the present disclosure, a method for generating a key is provided, comprising: a network application function sends a key request of a target application on a terminal to a key management system in response to a communication request initiated by a target application on a terminal; the network application function receives the key of the target application on the terminal sent by the key management system; the network application function generates a session key used when communicating with the target application on the terminal based on a key derivation function negotiated with the terminal, the key of the target application on the terminal, and the network application function key received from a binding support function.

[0006] In some embodiments, the method for generating a key also includes: the network application function receives the lifetime of the key of the target application on the terminal sent by the key management system; the network application function uses the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal as the lifetime of the session key; the network application function updates the session key according to the lifetime of the session key.

[0007] In some embodiments, the network application function updates the session key according to the lifetime of the session key, including: when the lifetime of the key of the target application on the terminal expires, the network application function re-acquires the key of the target application on the terminal and the lifetime of the key of the target application on the terminal from the key management system; the network application function updates the session key used when communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the re-acquired key of the target application on the terminal, and the network application function key received from the binding support function; the network application function updates the lifetime of the session key using the minimum value of the lifetime of the network application function key and the lifetime of the re-acquired key of the target application on the terminal.

[0008] In some embodiments, the key request carries the terminal identifier and the application identifier of the target application on the terminal; the key of the target application on the terminal is generated by the key management system according to the terminal identifier and the application identifier of the target application on the terminal.

[0009] In some embodiments, the method for generating a key also includes: the terminal receives the key of the target application on the terminal sent by the key management system; the terminal generates a session key used when the target application on the terminal communicates with the network application function based on the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function; or, the terminal receives the key of the target application on the terminal sent by the network application function, the key is encrypted using the network application function key; the terminal decrypts the key using the network application function key sent to the binding support function to obtain the key of the target application on the terminal; the terminal generates a session key used when the target application on the terminal communicates with the network application function based on the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function.

[0010] According to a second aspect of the present disclosure, a network application function is provided, including: a request sending module, configured to send a key request of the target application on the terminal to a key management system in response to a communication request initiated by the target application on the terminal; a key receiving module, configured to receive the key of the target application on the terminal sent by the key management system; a key generating module, configured for the network application function to generate a session key used when communicating with the target application on the terminal according to a key derivation function negotiated with the terminal, the key of the target application on the terminal, and the network application function key received from a binding support function.

[0011] In some embodiments, the network application function also includes: a lifetime receiving module, configured to receive the lifetime of the key of the target application on the terminal sent by the key management system; a lifetime determination module, configured to use the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal as the lifetime of the session key; and a lifetime update module, configured to update the session key according to the lifetime of the session key.

[0012] In some embodiments, the lifetime update module is configured to: when the lifetime of the key of the target application on the terminal expires, re-acquire the key of the target application on the terminal and the lifetime of the key of the target application on the terminal from the key management system; update the session key used when communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the re-acquired key of the target application on the terminal, and the network application function key received from the binding support function; and update the lifetime of the session key using the minimum value of the lifetime of the network application function key and the lifetime of the re-acquired key of the target application on the terminal.

[0013] In some embodiments, the key request carries the terminal identifier and the application identifier of the target application on the terminal; the key of the target application on the terminal is generated by the key management system according to the terminal identifier and the application identifier of the target application on the terminal.

[0014] According to a third aspect of the present disclosure, a system for generating a key is provided, comprising: the aforementioned network application function, a key management system and a terminal, wherein the terminal comprises: a first key receiving module, configured to receive a key of a target application on the terminal sent by the key management system; a first key generating module, configured to generate a session key used when the target application on the terminal communicates with the network application function according to a key derivation function negotiated with the network application function, the key of the target application on the terminal and the network application function key sent to a binding support function; or, the terminal comprises: a second key receiving module, configured to receive a key of the target application on the terminal sent by the network application function, the key being encrypted with the network application function key; a decryption module, configured to decrypt the key with the network application function key sent to the binding support function to obtain the key of the target application on the terminal; and a second key generating module, configured to generate a session key used when the target application on the terminal communicates with the network application function according to a key derivation function negotiated with the network application function, the key of the target application on the terminal and the network application function key sent to the binding support function.

[0015] According to a fourth aspect of the present disclosure, a system for generating a key is provided, comprising: a memory; and a processor coupled to the memory, the processor being configured to execute the aforementioned method for generating a key based on instructions stored in the memory.

[0016] According to a fifth aspect of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the aforementioned method for generating a key is implemented.

[0017] The present disclosure can improve the security of session keys under a general bootstrap architecture.

[0018] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0020] Figure 1 A schematic flow chart of a method for generating a key according to some embodiments of the present disclosure is shown.

[0021] Figure 2 A schematic flow chart of a method for generating a key according to some other embodiments of the present disclosure is shown.

[0022] Figure 3A and Figure 3B A schematic flow chart of a method for generating a key according to yet other embodiments of the present disclosure is shown.

[0023] Figure 4 A schematic diagram of the structure of network application functions of some embodiments of the present disclosure is shown.

[0024] Figure 5 A schematic diagram of the structure of a system for generating a key according to some embodiments of the present disclosure is shown.

[0025] Figure 6 A schematic diagram of the structure of a device for generating a key according to some embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0027] The inventors have found that in the traditional method of generating keys under the GBA architecture, the session keys used by the application are stored in the BSF, the intermediate platform of the operator system. Once the intermediate platform BSF is attacked by a network, the session keys may be leaked, so it is difficult for the application to ensure the security of the session keys. Therefore, the security of the session keys under the general boot architecture needs to be improved. In view of this, the inventors provide a method for generating keys that can improve the security of the session keys under the general boot architecture.

[0028] First combine Figure 1 Some embodiments of the method of generating a key disclosed in the present invention are described.

[0029] Figure 1 A schematic diagram of a method for generating a key in some embodiments of the present disclosure is shown. Figure 1 As shown, this embodiment includes steps S101 to S103.

[0030] In step S101, the network application function sends a key request of the target application on the terminal to the key management system in response to a communication request initiated by the target application on the terminal.

[0031] In some embodiments, the key request carries a terminal identifier UEID and an application identifier APPID of a target application on the terminal.

[0032] In step S102, the network application function receives the key of the target application on the terminal sent by the key management system.

[0033] The key management system binds the key of the target application on the terminal to the UEID and APPID, that is, the key of the target application on the terminal is only used when the network application function communicates with the target application with the APPID on the terminal with the UEID. In some embodiments, the key management system can also process the UEID and APPID using a preset algorithm to generate the key of the target application on the terminal.

[0034] In step S103, the network application function generates a session key used in communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the key Ks_app of the target application on the terminal, and the network application function key Ks_naf received from the binding support function.

[0035] Assume that the key derivation function negotiated between the network application function and the terminal is:

[0036] Ks=KDF(Ks_app,Ks_naf,random,Timestamp)

[0037] Where random represents the same random number, and Timestamp represents the same timestamp. Then, the network application function and the terminal can use the same key derivation function to generate the same session key Ks, and use the same session key Ks for security authentication or communication session. Those skilled in the art can understand that the session key Ks can specifically be a set of keys, which can include an encryption key and an integrity protection key. Ks is used for corresponding authentication and / or security session.

[0038] This embodiment proposes a method for generating keys based on a universal bootstrap architecture. The method deploys a key management system in combination with the universal bootstrap architecture, uses the network application function key received from the binding support function as only a part of the factor for generating the final session key, and uses the key of the target application on the terminal as another part of the factor for generating the final session key, so that the final generated session key does not appear in the third-party node or the operator network. Since the intermediate platform BSF and the key management system are each responsible for distributing a part of the factors and do not store the final generated session key, the final generated session key will not be leaked even if it is attacked by the network, thereby improving the security of the session key under the universal bootstrap architecture.

[0039] Combine the following Figure 2 Other embodiments of the method for generating a key disclosed in the present invention are described.

[0040] Figure 2 FIG. 2 is a flow chart showing a method for generating a key according to another embodiment of the present disclosure. Figure 2 As shown, in Figure 1 Based on the corresponding embodiment, the method for generating a key further includes steps S204 to S206.

[0041] In step S204, the network application function receives the lifetime of the key of the target application on the terminal sent by the key management system.

[0042] For example, the lifetime of the key of the target application on the terminal received by NAF from KMS is 4 seconds.

[0043] In step S205, the network application function uses the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal as the lifetime of the session key.

[0044] Those skilled in the art should understand that NAF can obtain the network application function key Ks_naf and the lifetime of Ks_naf from BSF. Assuming that the lifetime of Ks_naf is 5 seconds, the lifetime of the session key will be the minimum value between 4 seconds and 5 seconds, that is, 4 seconds.

[0045] In step S206, the network application function updates the session key according to the lifetime of the session key.

[0046] The triggering reason for the network application function to update the session key may be the expiration of the life span of the key Ks_app of the target application on the terminal, or the expiration of the life span of the network application function key Ks_naf.

[0047] If the triggering reason is that the lifetime of the key Ks_app of the target application on the terminal has expired, the NAF can re-request Ks_app and the lifetime of Ks_app from the BSF, and update the session key using the re-requested Ks_app and Ks_naf.

[0048] If the triggering reason is that the lifetime of the network application function key Ks_naf has expired, step S206 may be specifically divided into steps S2061 to S2063 for execution.

[0049] In step S2061, the network application function reacquires the key of the target application on the terminal and the lifetime of the key of the target application on the terminal from the key management system.

[0050] In step S2062, the network application function updates the session key used when communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the reacquired key of the target application on the terminal, and the network application function key received from the binding support function.

[0051] In step S2063, the network application function updates the lifetime of the session key using the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal that is reacquired.

[0052] This embodiment realizes dynamic update of session keys by setting a lifetime for the key Ks_app of the target application and the network application function key Ks_naf on the terminal, which can more conveniently and efficiently improve the security of session keys under the general boot architecture.

[0053] The following describes the implementation process of the method for generating a key from the terminal side. Figure 3A and Figure 3B A schematic flow chart of a method for generating a key according to yet other embodiments of the present disclosure is shown.

[0054] like Figure 3A As shown, in Figure 1 Based on the corresponding embodiment, the method for generating a key further includes steps S304A to S305A.

[0055] In step S304A, the terminal receives the key of the target application on the terminal sent by the key management system.

[0056] In step S305A, the terminal generates a session key used when the target application on the terminal communicates with the network application function according to the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function.

[0057] like Figure 3B As shown, in Figure 1 Based on the corresponding embodiment, the method for generating a key further includes steps S304B to S306B.

[0058] In step S304B, the terminal receives the key of the target application on the terminal sent by the network application function, and the key is encrypted using the network application function key.

[0059] In step S305B, the terminal uses the network application function key sent to the binding support function to decrypt the key and obtain the key of the target application on the terminal.

[0060] In step S306B, the terminal generates a session key used when the target application on the terminal communicates with the network application function according to the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function.

[0061] Those skilled in the art should understand that the terminal side can adopt a strategy similar to the network application function to set a lifetime for the key Ks_app of the target application on the terminal and the network application function key Ks_naf to achieve dynamic update of the session key, which is not elaborated here.

[0062] This embodiment deploys a key management system in combination with a universal bootstrap architecture, uses the network application function key as only a part of the factor for generating the final session key, and uses the key of the target application on the terminal as another part of the factor for generating the final session key, so that the final generated session key does not appear in the third-party node or the operator network. Since the intermediate platform BSF and the key management system are each responsible for distributing a part of the factors and do not store the final generated session key, the final generated session key will not be leaked even if it is attacked by the network, thereby improving the security of the session key under the universal bootstrap architecture.

[0063] Combine the following Figure 4 Some embodiments of the network application functions of the present disclosure are described.

[0064] Figure 4 FIG. 1 is a schematic diagram showing the structure of network application functions in some embodiments of the present disclosure. Figure 4As shown, the network application function 40 in this embodiment includes: a request sending module 401, configured to send a key request of the target application on the terminal to the key management system in response to a communication request initiated by the target application on the terminal; a key receiving module 402, configured to receive the key of the target application on the terminal sent by the key management system; a key generating module 403, configured for the network application function to generate a session key used when communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the key of the target application on the terminal and the network application function key received from the binding support function.

[0065] This embodiment proposes a method for generating keys based on a universal bootstrap architecture. The method deploys a key management system in combination with the universal bootstrap architecture, uses the network application function key received from the binding support function as only a part of the factor for generating the final session key, and uses the key of the target application on the terminal as another part of the factor for generating the final session key, so that the final generated session key does not appear in the third-party node or the operator network. Since the intermediate platform BSF and the key management system are each responsible for distributing a part of the factors and do not store the final generated session key, the final generated session key will not be leaked even if it is attacked by the network, thereby improving the security of the session key under the universal bootstrap architecture.

[0066] In some embodiments, the network application function 40 also includes: a lifetime receiving module 404, configured to receive the lifetime of the key of the target application on the terminal sent by the key management system; a lifetime determination module 405, configured to use the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal as the lifetime of the session key; a lifetime update module 406, configured to update the session key according to the lifetime of the session key.

[0067] In some embodiments, the lifetime update 406 module is configured to: when the lifetime of the key of the target application on the terminal expires, re-acquire the key of the target application on the terminal and the lifetime of the key of the target application on the terminal from the key management system; update the session key used when communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the re-acquired key of the target application on the terminal, and the network application function key received from the binding support function; update the lifetime of the session key using the minimum value of the lifetime of the network application function key and the lifetime of the re-acquired key of the target application on the terminal.

[0068] The above embodiment realizes dynamic update of session keys by setting lifetimes for the key Ks_app of the target application and the network application function key Ks_naf on the terminal, and can more conveniently and efficiently improve the security of session keys under the general boot architecture.

[0069] In some embodiments, the key request carries the terminal identifier and the application identifier of the target application on the terminal; the key of the target application on the terminal is generated by the key management system according to the terminal identifier and the application identifier of the target application on the terminal.

[0070] Combine the following Figure 5 Some embodiments of the disclosed system for generating keys are described.

[0071] Figure 5 A schematic diagram of the structure of a system for generating a key in some embodiments of the present disclosure is shown. Figure 5 As shown, the system 5 for generating a key in this embodiment includes: the aforementioned network application function 40, a terminal 50, and a key management system 51. The terminal 50 includes: a first key receiving module 501, configured to receive the key of the target application on the terminal sent by the key management system; a first key generating module 502, configured to generate a session key used when the target application on the terminal communicates with the network application function according to the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function; or the terminal includes: a second key receiving module 503, configured to receive the key of the target application on the terminal sent by the network application function, the key is encrypted with the network application function key; a decryption module 504, configured to decrypt the key with the network application function key sent to the binding support function to obtain the key of the target application on the terminal; a second key generating module 505, configured to generate a session key used when the target application on the terminal communicates with the network application function according to the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function.

[0072] Combine the following Figure 6 Some embodiments of the apparatus for generating a key according to the present disclosure are described.

[0073] Figure 6 FIG. 1 is a schematic diagram showing the structure of a device for generating a key in some embodiments of the present disclosure. Figure 6 As shown, the device 60 for generating a key in this embodiment includes: a memory 610 and a processor 620 coupled to the memory 610 , and the processor 620 is configured to execute the method for generating a key in any of the aforementioned embodiments based on instructions stored in the memory 610 .

[0074] The memory 610 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.

[0075] The device 60 for generating a key may also include an input / output interface 630, a network interface 640, a storage interface 650, etc. These interfaces 630, 640, 650, the memory 610, and the processor 620 may be connected, for example, via a bus 660. The input / output interface 630 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 640 provides a connection interface for various networked devices. The storage interface 650 provides a connection interface for external storage devices such as an SD card and a USB flash drive.

[0076] The present disclosure also includes a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the method for generating a key in any of the aforementioned embodiments.

[0077] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0078] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0079] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0080] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure should be included in the protection scope of the present disclosure.

Claims

1. A method for generating a key, comprising: The network application function responds to the communication request initiated by the target application on the terminal and sends a key request of the target application on the terminal to the key management system; The network application function receives the key of the target application on the terminal sent by the key management system; The network application function generates a session key used when communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the key of the target application on the terminal, and the network application function key received from the binding support function; The network application function receives the lifetime of the key of the target application on the terminal sent by the key management system; The network application function uses the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal as the lifetime of the session key; The network application function updates the session key according to the lifetime of the session key, and the updating includes: When the life span of the key of the target application on the terminal expires, the network application function re-acquires the key of the target application on the terminal and the life span of the key of the target application on the terminal from the key management system; The network application function updates the session key used when communicating with the target application on the terminal according to the key derivation function negotiated with the terminal, the key of the target application on the terminal that is retrieved, and the network application function key received from the binding support function; The network application function updates the lifetime of the session key by using the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal that is reacquired.

2. The method for generating a key according to claim 1, wherein: The key request carries the terminal identifier and the application identifier of the target application on the terminal; The key of the target application on the terminal is generated by the key management system according to the terminal identifier and the application identifier of the target application on the terminal.

3. The method for generating a key according to claim 1, further comprising: The terminal receives the key of the target application on the terminal sent by the key management system; The terminal generates a session key used when the target application on the terminal communicates with the network application function based on the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function; or, The terminal receives a key of a target application on the terminal sent by the network application function, wherein the key is encrypted using the network application function key; The terminal uses the network application function key sent to the binding support function to decrypt the key and obtain the key of the target application on the terminal; The terminal generates a session key used when the target application on the terminal communicates with the network application function based on the key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function.

4. A network application function device, comprising: A request sending module, configured to send a key request of the target application on the terminal to the key management system in response to a communication request initiated by the target application on the terminal; A key receiving module, configured to receive a key of a target application on a terminal sent by a key management system; The key generation module is configured to generate a session key used when the network application function communicates with the target application on the terminal according to the key derivation function negotiated with the terminal, the key of the target application on the terminal, and the network application function key received from the binding support function. A lifetime receiving module, configured to receive the lifetime of the key of the target application on the terminal sent by the key management system; A lifetime determination module, configured to use the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal as the lifetime of the session key; A lifetime update module is configured to update the session key according to the lifetime of the session key, wherein the update includes: When the lifetime of the key of the target application on the terminal expires, reacquire the key of the target application on the terminal and the lifetime of the key of the target application on the terminal from the key management system; updating a session key used when communicating with a target application on the terminal according to a key derivation function negotiated with the terminal, a key of the target application on the terminal that is retrieved, and a network application function key received from the binding support function; The lifetime of the session key is updated by using the minimum value of the lifetime of the network application function key and the lifetime of the key of the target application on the terminal that is reacquired.

5. The network application function device according to claim 4, wherein: The key request carries the terminal identifier and the application identifier of the target application on the terminal; The key of the target application on the terminal is generated by the key management system according to the terminal identifier and the application identifier of the target application on the terminal.

6. A system for generating a key, comprising: The network application function device, key management system and terminal according to any one of claims 4 to 5, wherein: The terminal includes: a first key receiving module configured to receive a key of a target application on the terminal sent by a key management system; a first key generating module configured to generate a session key used when the target application on the terminal communicates with the network application function according to a key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function; Alternatively, the terminal includes: a second key receiving module, configured to receive a key of a target application on the terminal sent by a network application function, the key being encrypted using the network application function key; a decryption module, configured to decrypt the key using the network application function key sent to a binding support function to obtain the key of the target application on the terminal; and a second key generation module, configured to generate a session key used when the target application on the terminal communicates with the network application function based on a key derivation function negotiated with the network application function, the key of the target application on the terminal, and the network application function key sent to the binding support function.

7. A device for generating a key, comprising: Memory; as well as A processor coupled to the memory, wherein the processor is configured to execute the method for generating a key according to any one of claims 1 to 3 based on instructions stored in the memory.

8. A non-transitory computer-readable storage medium, wherein: The non-transitory computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method for generating a key according to any one of claims 1 to 3 is implemented.