Key generation method and device, related equipment, storage medium and computer program product
By sending key generation related information to the terminal, the problem that the terminal cannot update the key generation strategy in time is solved, and timely update of keys and improve the security of the communication network is achieved.
Patent Information
- Application Number
- CN202411868140.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-04-18
AI Technical Summary
In the prior art, the terminal may not be able to synchronize the key generation information with the network side in time, resulting in the key selection policy and generation method that cannot be updated in time.
The key generation information is sent to the terminal through the platform on the network side, including the key selected from the key resource pool, supported key generation functions and password algorithms, ensuring that the terminal can update the secure communication key it generates in a timely manner.
The timely synchronization of the key generation information between the terminal and the network side is achieved, ensuring the effectiveness of the secure communication key and the security of the communication network.
Smart Images

Figure CN119853898A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of security technology, and in particular to a key generation method, apparatus, related equipment, storage medium and computer program product. Background Art
[0002] With the rapid development of Internet technology, the network security risks of information systems continue to increase, and the threat challenges are becoming increasingly severe. Cryptographic security is an important foundation for information security and can effectively protect the data security of network information systems; in other words, cryptographic technology is the core technology and important means to protect network information systems.
[0003] However, in the related art, the terminal may not be able to synchronize key generation related information with the network side in a timely manner. Summary of the invention
[0004] To solve the related technical problems, the embodiments of the present application provide a key generation method, apparatus, related equipment, storage medium and computer program product.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The embodiment of the present application provides a key generation method, which is applied to a first network device, including:
[0007] Sending first information to a terminal through a second network device, so that the terminal generates a first key based on the first information, wherein the first key is used for secure communication between the terminal and the second network device; wherein,
[0008] The first information includes one or more of the following:
[0009] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0010] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0011] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0012] In the above scheme, the method further includes:
[0013] generating the first key based on the first information and a first random number of the terminal;
[0014] Sending the first key to the second network device; wherein,
[0015] The first information also includes one or more of the following:
[0016] a second random number of the first network device;
[0017] a first identifier of the terminal;
[0018] The second identifier of the second network device.
[0019] In the above scheme, the method further includes:
[0020] Performing integrity protection on the fifth information based on the first key to obtain a first parameter;
[0021] The first parameter is sent to the terminal through the second network device; wherein,
[0022] The fifth information includes one or more of the following:
[0023] the first information;
[0024] a first random number of the terminal;
[0025] the first list;
[0026] The second list.
[0027] In the above scheme, the method further includes:
[0028] receiving sixth information sent by the terminal through the second network device, and receiving a second identifier of the second network device sent by the second network device; wherein,
[0029] The sixth information includes one or more of the following:
[0030] a first identifier of the terminal;
[0031] the first list;
[0032] the second list;
[0033] A first random number of the terminal.
[0034] The embodiment of the present application also provides a key generation method, which is applied to a terminal, including:
[0035] Receiving first information sent by the first network device through the second network device;
[0036] Based on the first information, a first key is generated, where the first key is used for secure communication between the terminal and the second network device; wherein,
[0037] The first information includes one or more of the following:
[0038] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0039] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0040] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0041] In the above solution, generating a first key based on the first information includes:
[0042] Based on the first information and the first random number of the terminal, the first key is generated; wherein,
[0043] The first information also includes one or more of the following:
[0044] a second random number of the first network device;
[0045] a first identifier of the terminal;
[0046] The second identifier of the second network device.
[0047] In the above scheme, the method further includes:
[0048] receiving a first parameter sent by the first network device through the second network device, where the first parameter is obtained by performing integrity protection on fifth information based on the first key;
[0049] Based on the first key and the fifth information, verify the correctness of the first parameter; wherein,
[0050] The fifth information includes one or more of the following:
[0051] the first information;
[0052] a first random number of the terminal;
[0053] the first list;
[0054] The second list.
[0055] In the above scheme, the method further includes:
[0056] Sending sixth information to the first network device through the second network device, where the sixth information includes one or more of the following:
[0057] a first identifier of the terminal;
[0058] the first list;
[0059] the second list;
[0060] A first random number of the terminal.
[0061] The embodiment of the present application also provides a key generation method, which is applied to a second network device, including:
[0062] receiving first information sent by a first network device, and sending the first information to a terminal, so that the terminal generates a first key based on the first information, the first key being used for secure communication between the terminal and the second network device; wherein,
[0063] The first information includes one or more of the following:
[0064] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0065] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0066] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0067] In the above scheme, the method further includes:
[0068] receiving the first key sent by the first network device, where the first key is generated based on the first information and a first random number of the terminal; wherein,
[0069] The first information also includes one or more of the following:
[0070] a second random number of the first network device;
[0071] a first identifier of the terminal;
[0072] The second identifier of the second network device.
[0073] In the above scheme, the method further includes:
[0074] receiving a first parameter sent by the first network device, and sending the first parameter to the terminal, where the first parameter is obtained by performing integrity protection on fifth information based on the first key;
[0075] Based on the first key and the fifth information, verify the correctness of the first parameter; wherein,
[0076] The fifth information includes one or more of the following:
[0077] the first information;
[0078] a first random number of the terminal;
[0079] the first list;
[0080] The second list.
[0081] In the above scheme, the method further includes:
[0082] receiving the sixth information sent by the terminal, and sending the sixth information and the second identifier of the second network device to the first network device; wherein,
[0083] The sixth information includes one or more of the following:
[0084] a first identifier of the terminal;
[0085] the first list;
[0086] the second list;
[0087] A first random number of the terminal.
[0088] The present application also provides a key generation device, including:
[0089] A first sending unit is used to send first information to a terminal through a second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein,
[0090] The first information includes one or more of the following:
[0091] second information, where the second information is used to indicate one or more second keys selected by the first network device from the key resource pool;
[0092] third information, the third information being used to indicate a key generation function selected by the first network device from a first list, the first list comprising one or more key generation functions supported by the terminal;
[0093] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, where the second list contains one or more cryptographic algorithms supported by the terminal.
[0094] The present application also provides a key generation device, including:
[0095] A second receiving unit, configured to receive first information sent by the first network device via the second network device;
[0096] The second processing unit is configured to generate a first key based on the first information, wherein the first key is used for secure communication between the terminal and the second network device; wherein:
[0097] The first information includes one or more of the following:
[0098] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0099] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0100] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0101] The present application also provides a key generation device, including:
[0102] A third receiving unit, configured to receive first information sent by the first network device;
[0103] a third sending unit, configured to send the first information to the terminal, so that the terminal generates a first key based on the first information, wherein the first key is used for secure communication between the terminal and the second network device; wherein
[0104] The first information includes one or more of the following:
[0105] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0106] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0107] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0108] The embodiment of the present application further provides a first network device, comprising: a first communication interface and a first processor; wherein:
[0109] The first communication interface is used to send first information to the terminal through the second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein,
[0110] The first information includes one or more of the following:
[0111] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0112] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0113] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0114] The present application also provides a terminal, including:
[0115] The second communication interface is used to receive the first information sent by the first network device through the second network device;
[0116] The second processor is configured to generate a first key based on the first information, where the first key is used for secure communication between the terminal and the second network device; wherein:
[0117] The first information includes one or more of the following:
[0118] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0119] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0120] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0121] The embodiment of the present application further provides a second network device, comprising: a third communication interface and a third processor; wherein,
[0122] The third communication interface is used to receive the first information sent by the first network device, and send the first information to the terminal, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein,
[0123] The first information includes one or more of the following:
[0124] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0125] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0126] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0127] The embodiment of the present application further provides a first network device, comprising: a first processor and a first memory for storing a computer program that can be run on the processor,
[0128] Wherein, when the first processor is used to run the computer program, it executes the steps of any one of the above-mentioned methods on the first network device side.
[0129] The embodiment of the present application further provides a terminal, comprising: a second processor and a second memory for storing a computer program that can be run on the processor,
[0130] Wherein, the second processor is used to execute the steps of any of the above-mentioned terminal-side methods when running the computer program.
[0131] The embodiment of the present application further provides a second network device, comprising: a third processor and a third memory for storing a computer program that can be run on the processor,
[0132] Wherein, the third processor is used to execute the steps of any one of the above-mentioned methods on the second network device side when running the computer program.
[0133] An embodiment of the present application also provides a storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the computer program implements the steps of any method on the first network device side, or implements the steps of any method on the terminal side, or implements the steps of any method on the second network device side.
[0134] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any method on the first network device side, or implements the steps of any method on the terminal side, or implements the steps of any method on the second network device side.
[0135] The key generation method, apparatus, related equipment, storage medium and computer program product provided by the embodiments of the present application, a first network device sends first information to a terminal through a second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein the first information includes one or more of the following: second information, the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, the third information is used to indicate a key generation function selected by the first network device from a first list, and the first list contains one or more key generation functions supported by the terminal; fourth information, the fourth information is used to indicate a cryptographic algorithm selected by the first network device from a second list, and the second list contains one or more cryptographic algorithms supported by the terminal. According to the solution provided by the embodiment of the present application, a platform on the network side (i.e., the first network device) indicates to the terminal one or more keys selected by the platform from a key resource pool, a key generation function selected by the platform from one or more key generation functions supported by the terminal, and one or more cryptographic algorithms selected by the platform from one or more cryptographic algorithms supported by the terminal, and these key generation related information (i.e., the first information) are used for the terminal to generate a secure communication key (i.e., the first key) between the terminal and another platform on the network side (i.e., the second network device). In this way, when one or more of these key generation related information changes (i.e., is updated), the network side can promptly synchronize the latest key generation related information to the terminal, that is, the terminal can promptly synchronize the key generation related information with the network side, so as to promptly generate a valid secure communication key based on the key generation related information, thereby effectively ensuring the secure communication services of the communication network and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0136] Figure 1 A schematic diagram of a key generation method according to an embodiment of the present application;
[0137] Figure 2A schematic diagram of another key generation method according to an embodiment of the present application;
[0138] Figure 3 This is a flow chart of the third key generation method according to an embodiment of the present application;
[0139] Figure 4 A flowchart of an example key distribution enhancement scheme for application in this application;
[0140] Figure 5 This is a schematic diagram of the structure of a key generation device according to an embodiment of the present application;
[0141] Figure 6 This is a schematic diagram of the structure of another key generation device according to an embodiment of the present application;
[0142] Figure 7 This is a schematic diagram of the structure of the third key generation device in the embodiment of the present application;
[0143] Figure 8 This is a schematic diagram of the structure of the first network device in the embodiment of the present application;
[0144] Fig. 9 This is a schematic diagram of the terminal structure of an embodiment of the present application;
[0145] Fig.10 This is a schematic diagram of the structure of the second network device in the embodiment of the present application;
[0146] Fig.11 This is a schematic diagram of the key generation system structure of an embodiment of the present application. DETAILED DESCRIPTION
[0147] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0148] In the related technology, in order to improve the security of the business system, security solutions such as quantum security keys (also called quantum keys) can be used. Among them, quantum security key technology can be based on the principles of quantum mechanics, using the non-cloning and non-measurable characteristics of quantum states to achieve a new encrypted communication method. By adopting quantum security keys, the business system can achieve unconditional secure communication, which can greatly improve the security of the system. At the same time, the distribution speed of quantum security keys is fast, which can achieve real-time encrypted communication and improve communication efficiency. From the above description, it can be seen that the use of quantum security keys is an effective means to improve the security of business systems, which can ensure the security of information and the efficiency of communication.
[0149] For the specific implementation of security solutions such as quantum security keys, in order to ensure the security of keys such as quantum security keys, a key injection method can be used to inject keys such as quantum security keys into the terminal's secure area offline at one time, and a key resource pool can be constructed in the terminal's secure area; business applications can obtain and use keys from the key resource pool. Among them, the terminal's secure area can include a subscriber identity module (SIM, Subscriber Identity Module) card, a universal subscriber identity module (USIM, Universal Subscriber Identity Module) card, a super SIM card, a transfer (TF, TransFLash) card, etc. In addition, a hierarchical management method can be further used to ensure the security of keys such as quantum security keys. Exemplarily, when the security area of the terminal includes a USIM card, the primary quantum cryptography service platform (PQCP for short) may be responsible for generating secure quantum keys; thereafter, the primary quantum cryptography service platform may send the quantum keys in batches to the charging platform, which will charge the quantum keys to the USIM card of the terminal; during the service implementation process, the primary quantum cryptography service platform may distribute the quantum keys to the secondary quantum cryptography service platform (such as a service platform, etc., SQCP for short) for use.
[0150] However, security solutions such as the above-mentioned quantum secure keys may have the following problems:
[0151] Problem 1: In the related art, the terminal obtains (i.e. selects) a key from a key resource pool, i.e., the terminal determines the key selection method. If the key selection strategy on the network side changes, the network side cannot apply the change of the key selection strategy to the key distribution process in a timely manner, i.e., the terminal cannot synchronize the key selection strategy with the network side in a timely manner.
[0152] Question 2: In the related art, the terminal obtains (i.e. selects) a key from a key resource pool, and decides how to calculate a session key based on the selected key, i.e., the terminal determines the method for generating the session key (such as the cryptographic algorithm used, the preferred calculation method, etc.). If the key generation method on the network side changes, the network side cannot promptly apply the change in the key generation method to the key distribution process, i.e., the terminal cannot promptly synchronize the key generation method with the network side;
[0153] Question 3: In the related technology, the cryptographic algorithm used by the terminal to calculate the session key based on the key selected from the key resource pool is fixed. When the cryptographic application policy changes (for example, the algorithm is insecure or non-compliant), the business process cannot switch to other available cryptographic algorithms in time, that is, the terminal cannot synchronize the available cryptographic algorithms with the network side in time.
[0154] In summary, in the related art, the terminal may not be able to synchronize key generation related information with the network side in a timely manner.
[0155] Based on this, in various embodiments of the present application, a platform on the network side (i.e., the first-level quantum cryptography service platform) indicates to the terminal one or more keys selected by the platform from the key resource pool, a key generation function selected by the platform from one or more key generation functions supported by the terminal, and one or more cryptographic algorithms selected by the platform from one or more cryptographic algorithms supported by the terminal. These key generation related information are used for the terminal to generate a secure communication key with another platform on the network side (i.e., the second-level quantum cryptography service platform). In this way, when one or more of these key generation related information changes (i.e., is updated), the network side can synchronize the latest key generation related information to the terminal in a timely manner, that is, the terminal can synchronize the key generation related information with the network side in a timely manner, so as to generate a valid secure communication key based on the key generation related information in a timely manner, thereby effectively ensuring the secure communication service of the communication network and improving the user experience.
[0156] It should be noted that, in various embodiments of the present application, "one or more / one or more items / one or more" refers to at least one / at least one item / at least one, and "multiple / multiple items / multiple" refers to at least two / at least two items / at least two.
[0157] Specifically, the embodiment of the present application provides a key generation method, which is applied to a first network device, such as Figure 1 As shown, the method includes:
[0158] Step 101: Send first information to a terminal through a second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device.
[0159] The first information may include one or more of the following:
[0160] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0161] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0162] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0163] In practical applications, the terminal may also be referred to as a user equipment (UE) or a user. In addition, the terminal may specifically include a quantum security terminal, etc. The embodiment of the present application does not limit the specific name and type of the terminal, as long as its function is realized.
[0164] In actual application, the first network device can be understood as a specific platform that has at least key and / or cryptographic service functions, such as a cryptographic service platform or a quantum cryptographic service platform; the first network device can also be called a first-level quantum cryptographic service platform, etc. The specific name and type of the first network device are not limited in this embodiment of the application, as long as its functions are realized. In addition, the second network device can be understood as a specific platform that has at least key and / or cryptographic service functions, is different from the first network device, and needs to communicate securely with the terminal, such as a business platform; the second network device can also be called a second-level quantum cryptographic service platform, etc. The specific name and type of the second network device are not limited in this embodiment of the application, as long as its functions are realized.
[0165] In actual application, the second information is used to indicate one or more second keys selected by the first network device from the key resource pool, and can also be understood as the second information is used to indicate the manner or rule for the first network device to select the one or more second keys from the key resource pool. Among them, the key resource pool can at least store multiple pre-generated or set second keys and the identifier of each second key; accordingly, the second information can specifically include the identifier of each second key in the one or more second keys selected by the first network device. Here, the second key may include a key of a type such as a quantum key. The specific name and type of the second key and the specific name and type of the key resource pool are not limited in the embodiment of the present application, as long as their functions are realized. In addition, the specific manner in which the first network device selects the one or more second keys from the key resource pool can also be set as needed, such as random selection, etc., and the embodiment of the present application is also not limited to this. It can be understood that the security area of the terminal (such as a SIM card, a USIM card, a super SIM card, a TF card, etc.) can be provided with the same key resource pool as the first network device. After receiving the second information, the terminal can obtain the one or more second keys selected by the first network device from the key resource pool of the security area based on the second information.
[0166] In actual application, before the above step 101, the terminal may report the first list and the second list to the first network device through the second network device, so that the first network device can select a key generation function from the first list and select a cryptographic algorithm from the second list. Among them, the key generation function can be understood as a function for generating the first key or a specific method / rule for generating the first key. The one or more key generation functions supported by the terminal can be set as needed (such as terminal type, etc.), and can specifically include a key derivation function (KDF, Key Derivation Function), etc. The one or more cryptographic algorithms supported by the terminal can also be set as needed (such as terminal type, etc.), and the embodiments of the present application do not limit these contents. Here, the formula of KDF can be expressed as m=KDF(m1, m2, ...), which can be implemented based on a hash function (i.e., a summary function, which can be recorded as hash) or an integrity calculation function (which can be recorded as hmac). When the function is implemented based on hash, it can be expressed as H=HASH(M), M=m1, m2, ...; that is, m1, m2, ... can be combined to perform a summary operation (such as using a quantum-safe summary algorithm to calculate the summary value of M), and used for key derivation. In addition, the specific manner in which the first network device selects a key generation function from the first list and selects a cryptographic algorithm from the second list can also be set according to needs (such as network deployment conditions, etc.), and this embodiment of the present application is not limited to this. Exemplarily, the first network device can select a key generation function from the first list according to a specific security policy, and can specifically select a fixed key generation function, or can select multiple key generation functions and switch the key generation function regularly according to security requirements; and the first network device can select a cryptographic algorithm from the second list according to a specific security policy, for example, a fixed cryptographic algorithm can be selected, and if the algorithm has a security risk, it can be replaced with a more secure cryptographic algorithm.
[0167] In actual application, the first list may specifically include one or more key generation functions supported by the terminal and the identifier of each key generation function; accordingly, the third information may specifically include the identifier of the key generation function selected by the first network device. In addition, the second list may specifically include one or more cryptographic algorithms supported by the terminal and the identifier of each cryptographic algorithm; accordingly, the fourth information may specifically include the identifier of the cryptographic algorithm selected by the first network device.
[0168] In actual application, the terminal generates the first key based on the first information, which means that the terminal can generate the first key based on the one or more second keys, the key generation function indicated by the third information, and the cryptographic algorithm indicated by the fourth information. It can be understood that other information, such as a specific random number, an identifier, etc., can also be used when generating the first key. In addition, the first network device can also generate the first key and indicate it to the second network device so that the second network device can communicate securely with the terminal.
[0169] Based on this, in one embodiment, the method may further include:
[0170] generating the first key based on the first information and a first random number of the terminal;
[0171] Sending the first key to the second network device; wherein,
[0172] The first information may also include one or more of the following:
[0173] a second random number of the first network device;
[0174] a first identifier of the terminal;
[0175] The second identifier of the second network device.
[0176] In actual application, before the above step 101, the terminal may generate the first random number and report the first random number to the first network device through the second network device. In addition, it can be understood that when the second key includes a quantum key, the first key may also include a quantum key.
[0177] In actual application, the first network device may perform integrity protection on the first information and other contents (which may be recorded as fifth information in subsequent descriptions).
[0178] Based on this, in one embodiment, the method may further include:
[0179] Performing integrity protection on the fifth information based on the first key to obtain a first parameter;
[0180] The first parameter is sent to the terminal through the second network device; wherein,
[0181] The fifth information may include one or more of the following:
[0182] the first information;
[0183] a first random number of the terminal;
[0184] the first list;
[0185] The second list.
[0186] In actual application, it can be understood that the first network device can send the first information and the first parameter to the terminal through the second network device at the same time, that is, the first information and the first parameter can be included in the same message / signaling. After receiving the first information and the first parameter, the terminal can verify the correctness of the first parameter based on the first key and the fifth information. If the correctness of the first parameter is verified, the first key can be saved (specifically, the first key can be stored in association with the second identifier), and the first key can be used to communicate securely with the second network device in the future. In addition, the second network device can also verify the correctness of the first parameter based on the first key and the fifth information. If the correctness of the first parameter is verified, the first key can be saved (specifically, the first key can be stored in association with the first identifier), and the first key can be used to communicate securely with the terminal in the future.
[0187] In actual application, it can be seen from the above description that before the above step 101, the terminal can report one or more of the first list, the second list, the first identifier, the first random number and other information to the first network device through the second network device, and at the same time, the second network device can report the second identifier to the first network device.
[0188] Based on this, in one embodiment, if Figure 1 As shown, the method may also include:
[0189] Step 100: receiving sixth information sent by the terminal through the second network device, and receiving a second identifier of the second network device sent by the second network device; wherein,
[0190] The sixth information may include one or more of the following:
[0191] a first identifier of the terminal;
[0192] the first list;
[0193] the second list;
[0194] A first random number of the terminal.
[0195] Accordingly, the embodiment of the present application also provides a key generation method, which is applied to a terminal, such as Figure 2 As shown, the method includes:
[0196] Step 201: receiving first information sent by a first network device via a second network device;
[0197] Step 202: Generate a first key based on the first information, where the first key is used for secure communication between the terminal and the second network device.
[0198] The first information may include one or more of the following:
[0199] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0200] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0201] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0202] In one embodiment, generating a first key based on the first information may include:
[0203] Based on the first information and the first random number of the terminal, the first key is generated; wherein,
[0204] The first information also includes one or more of the following:
[0205] a second random number of the first network device;
[0206] a first identifier of the terminal;
[0207] The second identifier of the second network device.
[0208] In one embodiment, the method may further include:
[0209] receiving a first parameter sent by the first network device through the second network device, where the first parameter is obtained by performing integrity protection on fifth information based on the first key;
[0210] Based on the first key and the fifth information, verify the correctness of the first parameter; wherein,
[0211] The fifth information includes one or more of the following:
[0212] the first information;
[0213] a first random number of the terminal;
[0214] the first list;
[0215] The second list.
[0216] In one embodiment, the method may further include:
[0217] Sending sixth information to the first network device through the second network device, where the sixth information includes one or more of the following:
[0218] a first identifier of the terminal;
[0219] the first list;
[0220] the second list;
[0221] A first random number of the terminal.
[0222] Accordingly, the embodiment of the present application also provides a key generation method, which is applied to a second network device, such as Figure 3 As shown, the method includes:
[0223] Step 301: Receive first information sent by a first network device, and send the first information to a terminal, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device.
[0224] The first information may include one or more of the following:
[0225] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0226] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0227] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0228] In one embodiment, the method may further include:
[0229] receiving the first key sent by the first network device, where the first key is generated based on the first information and a first random number of the terminal; wherein,
[0230] The first information also includes one or more of the following:
[0231] a second random number of the first network device;
[0232] a first identifier of the terminal;
[0233] The second identifier of the second network device.
[0234] In one embodiment, the method may further include:
[0235] receiving a first parameter sent by the first network device, and sending the first parameter to the terminal, where the first parameter is obtained by performing integrity protection on fifth information based on the first key;
[0236] Based on the first key and the fifth information, verify the correctness of the first parameter; wherein,
[0237] The fifth information includes one or more of the following:
[0238] the first information;
[0239] a first random number of the terminal;
[0240] the first list;
[0241] The second list.
[0242] In one embodiment, if Figure 3 As shown, before the above step 301, the method may further include:
[0243] Step 300: receiving the sixth information sent by the terminal, and sending the sixth information and the second identifier of the second network device to the first network device; wherein,
[0244] The sixth information includes one or more of the following:
[0245] a first identifier of the terminal;
[0246] the first list;
[0247] the second list;
[0248] A first random number of the terminal.
[0249] In the key generation method provided by an embodiment of the present application, a first network device sends first information to a terminal through a second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein the first information includes one or more of the following: second information, the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, the third information is used to indicate a key generation function selected by the first network device from a first list, and the first list contains one or more key generation functions supported by the terminal; fourth information, the fourth information is used to indicate a cryptographic algorithm selected by the first network device from a second list, and the second list contains one or more cryptographic algorithms supported by the terminal. According to the solution provided by the embodiment of the present application, a platform on the network side (i.e., the first network device) indicates to the terminal one or more keys selected by the platform from a key resource pool, a key generation function selected by the platform from one or more key generation functions supported by the terminal, and one or more cryptographic algorithms selected by the platform from one or more cryptographic algorithms supported by the terminal, and these key generation related information (i.e., the first information) are used for the terminal to generate a secure communication key (i.e., the first key) between the terminal and another platform on the network side (i.e., the second network device). In this way, when one or more of these key generation related information changes (i.e., is updated), the network side can promptly synchronize the latest key generation related information to the terminal, that is, the terminal can promptly synchronize the key generation related information with the network side, so as to promptly generate a valid secure communication key based on the key generation related information, thereby effectively ensuring the secure communication services of the communication network and improving the user experience.
[0250] The present application is described in further detail below in conjunction with application examples.
[0251] In this application example, the terminal is called a quantum security terminal (can be referred to as a terminal, expressed as UE), which specifically refers to a security terminal device that provides quantum security services for upper-layer applications based on quantum keys; the first network device is called a first-level quantum cryptography service platform (can be referred to as a first-level platform, expressed as PQCP), which is used to connect with key distribution (QKD, Quantum Key Distribution) nodes, etc., so as to manage and distribute quantum keys; the second network device is called a second-level quantum cryptography service platform (can be referred to as a second-level platform, expressed as SQCP), which specifically refers to a business platform that uses quantum keys, which can be connected with the first-level quantum cryptography service platform to obtain quantum keys for business interaction.
[0252] This application example provides a key distribution enhancement solution. Figure 4The specific implementation process of the solution is described in detail.
[0253] like Figure 4 As shown, first, when the quantum security terminal needs to conduct secure communication based on quantum keys with the secondary quantum cryptography service platform, the quantum security terminal can construct (i.e. generate) a key generation request (i.e. the sixth information above), and send the key generation request to the secondary quantum cryptography service platform. Among them, the quantum security terminal can generate a random number R_UE (i.e. the first random number above), and obtain a locally supported UE key generation method support list (i.e. the first list above) and a UE cryptographic algorithm support list (i.e. the second list above); the key generation request can include a UE identifier (i.e. the first identifier above), a UE key generation method support list, a UE cryptographic algorithm support list, and R_UE.
[0254] After receiving the above-mentioned key generation request, the secondary quantum cryptography service platform can send a key acquisition request to the primary quantum cryptography service platform, that is, send the UE identifier, the UE key generation method support list, the UE cryptographic algorithm support list, and R_UE, and at the same time send the secondary platform ID (that is, the above-mentioned second identifier) to the primary quantum cryptography service platform; after receiving the key acquisition request, the primary quantum cryptography service platform can generate a quantum key Qkey (that is, the above-mentioned first key).
[0255] Specifically, the first-level quantum cryptography service platform can obtain one or more quantum key identifiers and corresponding quantum keys (i.e., select the above-mentioned one or more second keys), that is, obtain a QKID sequence (i.e., the above-mentioned second information): QKID_1, QKID_2, ..., QKID_n, and the quantum keys corresponding to these identifiers can be recorded as QK_1, QK_2, ..., QK_n; thereafter, the first-level quantum cryptography service platform can generate a first-level platform random number R_P (i.e., the above-mentioned second random number), select the preferred method F_x from the UE key generation method support list (i.e., the above-mentioned first list), obtain the F_x identifier (i.e., the above-mentioned third information), and select the preferred cryptographic algorithm ALG_x from the UE cryptographic algorithm support list (i.e., the above-mentioned second list), and obtain the ALG_x identifier (i.e., the above-mentioned fourth information); thereafter, the first-level quantum cryptography service platform can generate a session key Qkey (i.e., the above-mentioned first key) according to the selected key generation method and cryptographic algorithm.
[0256] The calculation formula of Qkey may be Qkey=F_x(ALG_x, QK_1, QK_2, ..., QK_n, R_UE, R_P, UE identifier, secondary platform ID, ...). In addition, F_x may be calculated in a variety of ways. For example, F_x may be implemented in any of the following two ways:
[0257] Mode 1, Qkey = KDF (QK_1, QK_2, ..., QK_n, R_UE, R_P, UE identifier, secondary platform ID, ...), where KDF can be implemented based on the ALG_x algorithm (i.e., the cryptographic algorithm indicated by the fourth information above);
[0258] Method 2, Qkey = Hash (QK_1, QK_2, ..., QK_n, R_UE, R_P, UE identity, secondary platform ID, ...), where Hash can be implemented based on the ALG_x algorithm (that is, the cryptographic algorithm indicated by the fourth information above).
[0259] After the first-level quantum cryptography service platform generates the session key Qkey (i.e., the first key mentioned above), it can use the integrity calculation function formula MAC=HMAC (Qkey, QKID sequence, UE key generation method support list, UE cryptographic algorithm support list, F_x identifier, ALG_x identifier, R_UE, R_P, UE identifier, second-level platform ID, ...) to generate the integrity protection parameter MAC (i.e., the first parameter mentioned above). After that, the first-level quantum cryptography service platform can send a key acquisition response to the second-level quantum cryptography service platform through a secure channel. The key acquisition response can include Qkey (i.e., the first key mentioned above), MAC (i.e., the first parameter mentioned above), QKID sequence (i.e., the second information mentioned above), F_x identifier (i.e., the third information mentioned above), ALG_x identifier (i.e., the fourth information mentioned above), R_P (i.e., the second random number mentioned above), UE identifier (i.e., the first identifier mentioned above), and the second-level platform ID (i.e., the second identifier mentioned above). After receiving the key acquisition response, the second-level quantum cryptography service platform can use Qkey to verify the correctness of the MAC in the key acquisition response, and safely save Qkey if the verification is passed, and can be specifically stored in association with the UE identifier.
[0260] Afterwards, the secondary quantum cryptography service platform can send a key generation response to the quantum security terminal, and the key generation response can include MAC (i.e., the above-mentioned first parameter), QKID sequence (i.e., the above-mentioned second information), F_x identifier (i.e., the above-mentioned third information), ALG_x identifier (i.e., the above-mentioned fourth information), R_P (i.e., the above-mentioned second random number), UE identifier (i.e., the above-mentioned first identifier), secondary platform ID (i.e., the above-mentioned second identifier), etc. After receiving the key generation response, the quantum security terminal can calculate and securely save Qkey. Specifically, the quantum security terminal can generate a session key Qkey based on the F_x identifier and the ALG_x identifier, Qkey = F_x (ALG_x, QK_1, QK_2, ..., QK_n, R_UE, R_P, UE identifier, secondary platform ID, ...); afterwards, the quantum security terminal can use Qkey to verify the correctness of MAC, and securely save Qkey if the verification is passed, and specifically can be stored in association with the secondary platform ID. Finally, the quantum security terminal can use Qkey to interact securely with the secondary platform. For example, Qkey can be used to encrypt and / or perform integrity protection on the ciphertext of business response information.
[0261] The solution provided by this application example has the following advantages:
[0262] 1) The first-level platform on the network side selects several quantum keys (i.e., the second key mentioned above) from the quantum key resource pool, that is, the first-level platform determines the selection method of the quantum key, and synchronizes the selection method of the quantum key (i.e., the second information mentioned above) to the terminal through the second-level platform. The terminal selects the corresponding key according to the indicated rule (i.e., the second information mentioned above); in this way, if the quantum key selection strategy on the network side changes, the network side can promptly apply the change of the quantum key selection strategy to the key distribution process;
[0263] 2) The terminal sends a UE key generation method support list (i.e., the first list mentioned above) to the first-level platform, and the first-level platform on the network side selects the preferred key generation method, and synchronizes the selected key generation method identifier (i.e., the third information mentioned above) to the terminal through the second-level platform, and the terminal generates a corresponding key (i.e., the first key mentioned above) according to the key generation method identifier; in this way, if the key generation method on the network side (such as the adopted cryptographic algorithm, the preferred calculation method, etc.) changes, the network side can promptly apply the change in the key generation method to the key distribution process;
[0264] 3) The terminal sends the UE cryptographic algorithm support list (i.e., the second list) to the first-level platform, and the first-level platform on the network side selects the preferred cryptographic algorithm, and synchronizes the selected cryptographic algorithm identifier (i.e., the fourth information) to the terminal through the second-level platform, and the terminal generates the corresponding key (i.e., the first key) according to the cryptographic algorithm identifier; in this way, since the cryptographic algorithm selected by the first-level platform is negotiable, when the cryptographic application policy changes (for example, the algorithm is unsafe or non-compliant, etc.), the business process can switch to other available cryptographic algorithms in a timely manner;
[0265] 4) The secondary platform and the terminal can resist algorithm downgrade attacks by verifying the correctness of MAC (i.e., the first parameter mentioned above); specifically, the key acquisition response may include MAC, and the calculation parameters of MAC may include the UE key generation method support list (i.e., the first list mentioned above) and the UE cryptographic algorithm support list (i.e., the second list mentioned above) sent by the terminal. The secondary platform can resist algorithm downgrade attacks by verifying the correctness of MAC; in addition, the key generation response may include MAC, and the calculation parameters of MAC may include the UE key generation method support list and the UE cryptographic algorithm support list sent by the terminal. The terminal can resist algorithm downgrade attacks by verifying the correctness of MAC;
[0266] 5) The solution provided by this application example can be applied to quantum secure communication services in communication networks and has broad application prospects.
[0267] In order to implement the method on the first network device side of the embodiment of the present application, the embodiment of the present application also provides a key generation device, which is set on the first network device, such as Figure 5 As shown, the device comprises:
[0268] The first sending unit 501 is used to send first information to the terminal through the second network device, so that the terminal can generate a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein,
[0269] The first information includes one or more of the following:
[0270] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0271] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0272] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0273] In one embodiment, if Figure 5 As shown, the device may also include:
[0274] A first processing unit 502, configured to generate the first key based on the first information and a first random number of the terminal;
[0275] Correspondingly, the first sending unit 501 is further configured to send the first key to the second network device; wherein,
[0276] The first information also includes one or more of the following:
[0277] a second random number of the first network device;
[0278] a first identifier of the terminal;
[0279] The second identifier of the second network device.
[0280] In one embodiment, the first processing unit 502 is further configured to perform integrity protection on the fifth information based on the first key to obtain a first parameter;
[0281] Correspondingly, the first sending unit 501 is further configured to send the first parameter to the terminal through the second network device; wherein,
[0282] The fifth information includes one or more of the following:
[0283] the first information;
[0284] a first random number of the terminal;
[0285] the first list;
[0286] The second list.
[0287] In one embodiment, if Figure 5 As shown, the device may also include:
[0288] The first receiving unit 503 is configured to receive the sixth information sent by the terminal through the second network device, and receive the second identifier of the second network device sent by the second network device; wherein,
[0289] The sixth information includes one or more of the following:
[0290] a first identifier of the terminal;
[0291] the first list;
[0292] the second list;
[0293] A first random number of the terminal.
[0294] In actual application, the first sending unit 501 and the first receiving unit 503 can be implemented by a communication interface in the key generation device; the first processing unit 502 can be implemented by a processor in the key generation device.
[0295] In order to implement the method on the terminal side of the embodiment of the present application, the embodiment of the present application also provides a key generation device, which is set on the terminal, such as Figure 6 As shown, the device comprises:
[0296] The second receiving unit 601 is used to receive first information sent by the first network device through the second network device;
[0297] The second processing unit 602 is configured to generate a first key based on the first information, where the first key is used for secure communication between the terminal and the second network device; wherein
[0298] The first information includes one or more of the following:
[0299] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0300] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0301] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0302] In one embodiment, the second processing unit 602 is specifically configured to generate the first key based on the first information and the first random number of the terminal;
[0303] The first information also includes one or more of the following:
[0304] a second random number of the first network device;
[0305] a first identifier of the terminal;
[0306] The second identifier of the second network device.
[0307] In one embodiment, the second receiving unit 601 is further configured to receive a first parameter sent by the first network device through the second network device, where the first parameter is obtained by performing integrity protection on the fifth information based on the first key;
[0308] Correspondingly, the second processing unit 602 is further configured to verify the correctness of the first parameter based on the first key and the fifth information; wherein,
[0309] The fifth information includes one or more of the following:
[0310] the first information;
[0311] a first random number of the terminal;
[0312] the first list;
[0313] The second list.
[0314] In one embodiment, if Figure 6 As shown, the device may also include:
[0315] The second sending unit 603 is configured to send sixth information to the first network device through the second network device, where the sixth information includes one or more of the following:
[0316] a first identifier of the terminal;
[0317] the first list;
[0318] the second list;
[0319] A first random number of the terminal.
[0320] In actual application, the second receiving unit 601 and the second sending unit 603 can be implemented by a communication interface in the key generating device; the second processing unit 602 can be implemented by a processor in the key generating device.
[0321] In order to implement the method on the second network device side of the embodiment of the present application, the embodiment of the present application also provides a key generation device, which is arranged on the second network device, such as Figure 7 As shown, the device comprises:
[0322] The third receiving unit 701 is used to receive first information sent by the first network device;
[0323] The third sending unit 702 is used to send the first information to the terminal, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein,
[0324] The first information includes one or more of the following:
[0325] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0326] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0327] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0328] In one embodiment, the third receiving unit 701 is further used to receive the first key sent by the first network device, where the first key is generated based on the first information and the first random number of the terminal;
[0329] The first information also includes one or more of the following:
[0330] a second random number of the first network device;
[0331] a first identifier of the terminal;
[0332] The second identifier of the second network device.
[0333] In one embodiment, the third receiving unit 701 is further configured to receive a first parameter sent by the first network device, where the first parameter is obtained by performing integrity protection on the fifth information based on the first key;
[0334] Correspondingly, the third sending unit 702 is further configured to send the first parameter to the terminal;
[0335] In addition, if Figure 7 As shown, the device may also include:
[0336] The third processing unit 703 is used to verify the correctness of the first parameter based on the first key and the fifth information; wherein,
[0337] The fifth information includes one or more of the following:
[0338] the first information;
[0339] a first random number of the terminal;
[0340] the first list;
[0341] The second list.
[0342] In one embodiment, the third receiving unit 701 is further configured to receive sixth information sent by the terminal;
[0343] Correspondingly, the third sending unit 702 is further configured to send the sixth information and the second identifier of the second network device to the first network device; wherein,
[0344] The sixth information includes one or more of the following:
[0345] a first identifier of the terminal;
[0346] the first list;
[0347] the second list;
[0348] A first random number of the terminal.
[0349] In actual application, the third receiving unit 701 and the third sending unit 702 can be implemented by a communication interface in the key generation device; the third processing unit 703 can be implemented by a processor in the key generation device.
[0350] It should be noted that: the key generation device provided in the above embodiment only uses the division of the above program modules as an example to illustrate when generating a key. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the key generation device provided in the above embodiment and the key generation method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0351] Based on the hardware implementation of the above program module, and in order to implement the method of the first network device side of the embodiment of the present application, the embodiment of the present application also provides a first network device, such as Figure 8 As shown, the first network device 800 includes:
[0352] The first communication interface 801 is capable of exchanging information with a terminal and / or other network devices (such as a second network device, etc.);
[0353] A first processor 802 is connected to the first communication interface 801 to implement information interaction with a terminal and / or other network devices, and is used to execute the method provided by one or more technical solutions on the first network device side when running a computer program;
[0354] A first memory 803 , in which the computer program is stored.
[0355] Specifically, the first communication interface 801 is used to send first information to the terminal through the second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein,
[0356] The first information includes one or more of the following:
[0357] second information, where the second information is used to indicate one or more second keys selected by the first network device 800 from a key resource pool;
[0358] third information, where the third information is used to indicate a key generation function selected by the first network device 800 from a first list, where the first list includes one or more key generation functions supported by the terminal;
[0359] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device 800 from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0360] In one embodiment, the first processor 802 is configured to generate the first key based on the first information and a first random number of the terminal;
[0361] Correspondingly, the first communication interface 801 is also used to send the first key to the second network device; wherein,
[0362] The first information also includes one or more of the following:
[0363] A second random number of the first network device 800;
[0364] a first identifier of the terminal;
[0365] The second identifier of the second network device.
[0366] In one embodiment, the first processor 802 is further configured to perform integrity protection on the fifth information based on the first key to obtain a first parameter;
[0367] Correspondingly, the first communication interface 801 is also used to send the first parameter to the terminal through the second network device; wherein,
[0368] The fifth information includes one or more of the following:
[0369] the first information;
[0370] a first random number of the terminal;
[0371] the first list;
[0372] The second list.
[0373] In one embodiment, the first communication interface 801 is further used to receive sixth information sent by the terminal through the second network device, and receive a second identifier of the second network device sent by the second network device; wherein,
[0374] The sixth information includes one or more of the following:
[0375] a first identifier of the terminal;
[0376] the first list;
[0377] the second list;
[0378] A first random number of the terminal.
[0379] It should be noted that the specific processing process of the first communication interface 801 and the first processor 802 can be understood by referring to the above method, which will not be repeated here.
[0380] Of course, in actual application, the various components in the first network device 800 are coupled together through the bus system 804. It can be understood that the bus system 804 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 8 Various buses are labeled as bus system 804 .
[0381] The first memory 803 in the embodiment of the present application is used to store various types of data to support the operation of the first network device 800. Examples of such data include: any computer program used to operate on the first network device 800.
[0382] The method disclosed in the above embodiment of the present application can be applied to the first processor 802, or implemented by the first processor 802. The first processor 802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the first processor 802. The above-mentioned first processor 802 may be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The first processor 802 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the first memory 803, and the first processor 802 reads the information in the first memory 803 and completes the steps of the above method in combination with its hardware.
[0383] In an exemplary embodiment, the first network device 800 may be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.
[0384] Based on the hardware implementation of the above program modules, and in order to implement the method on the terminal side of the embodiment of the present application, the embodiment of the present application also provides a terminal, such as Fig. 9 As shown, the terminal 900 includes:
[0385] The second communication interface 901 is capable of exchanging information with a network device (such as a first network device and / or a second network device, etc.) and / or other terminals;
[0386] A second processor 902 is connected to the second communication interface 901 to implement information interaction with a network device and / or other terminals, and is used to execute the method provided by one or more technical solutions on the terminal side when running a computer program;
[0387] A second memory 903 , on which the computer program is stored.
[0388] Specifically, the second communication interface 901 is used to receive first information sent by the first network device through the second network device;
[0389] The second processor 902 is used to generate a first key based on the first information, where the first key is used for secure communication between the terminal 900 and the second network device; wherein
[0390] The first information includes one or more of the following:
[0391] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0392] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list includes one or more key generation functions supported by the terminal 900;
[0393] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal 900.
[0394] In one embodiment, the second processor 902 is further configured to generate the first key based on the first information and the first random number of the terminal 900;
[0395] The first information also includes one or more of the following:
[0396] a second random number of the first network device;
[0397] A first identifier of the terminal 900;
[0398] The second identifier of the second network device.
[0399] In one embodiment, the second communication interface 901 is further used to receive a first parameter sent by the first network device through the second network device, where the first parameter is obtained by performing integrity protection on the fifth information based on the first key;
[0400] Correspondingly, the second processor 902 is further configured to verify the correctness of the first parameter based on the first key and the fifth information; wherein,
[0401] The fifth information includes one or more of the following:
[0402] the first information;
[0403] A first random number of the terminal 900;
[0404] the first list;
[0405] The second list.
[0406] In one embodiment, the second communication interface 901 is further used to send sixth information to the first network device through the second network device, and the sixth information includes one or more of the following:
[0407] A first identifier of the terminal 900;
[0408] the first list;
[0409] the second list;
[0410] The first random number of the terminal 900.
[0411] It should be noted that the specific processing process of the second communication interface 901 and the second processor 902 can be understood by referring to the above method, which will not be repeated here.
[0412] Of course, in actual application, the various components in the terminal 900 are coupled together through the bus system 904. It can be understood that the bus system 904 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig. 9 Various buses are labeled as bus system 904.
[0413] The second memory 903 in the embodiment of the present application is used to store various types of data to support the operation of the terminal 900. Examples of such data include: any computer program used to operate on the terminal 900.
[0414] The method disclosed in the above embodiment of the present application can be applied to the second processor 902, or implemented by the second processor 902. The second processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of the hardware in the second processor 902 or an instruction in the form of software. The above second processor 902 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The second processor 902 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the second memory 903, and the second processor 902 reads the information in the second memory 903 and completes the steps of the above method in combination with its hardware.
[0415] In an exemplary embodiment, the terminal 900 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general purpose processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.
[0416] Based on the hardware implementation of the above program module, and in order to implement the method of the second network device side of the embodiment of the present application, the embodiment of the present application also provides a second network device, such as Fig.10 As shown, the second network device 1000 includes:
[0417] The third communication interface 1001 is capable of exchanging information with the terminal and / or other network devices (such as the first network device, etc.);
[0418] The third processor 1002 is connected to the third communication interface 1001 to implement information interaction with the terminal and / or other network devices, and is used to execute the method provided by one or more technical solutions on the second network device side when running the computer program;
[0419] A third memory 1003 , on which the computer program is stored.
[0420] Specifically, the third communication interface 1001 is used to receive the first information sent by the first network device, and send the first information to the terminal, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device 1000; wherein,
[0421] The first information includes one or more of the following:
[0422] second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool;
[0423] third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal;
[0424] Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
[0425] In one embodiment, the third communication interface 1001 is further used to receive the first key sent by the first network device, where the first key is generated based on the first information and the first random number of the terminal;
[0426] The first information also includes one or more of the following:
[0427] a second random number of the first network device;
[0428] a first identifier of the terminal;
[0429] The second identifier of the second network device 1000.
[0430] In one embodiment, the third communication interface 1001 is further used to receive a first parameter sent by the first network device, and send the first parameter to the terminal, where the first parameter is obtained by performing integrity protection on the fifth information based on the first key;
[0431] Correspondingly, the third processor 1002 is used to verify the correctness of the first parameter based on the first key and the fifth information; wherein,
[0432] The fifth information includes one or more of the following:
[0433] the first information;
[0434] a first random number of the terminal;
[0435] the first list;
[0436] The second list.
[0437] In one embodiment, the third communication interface 1001 is further used to receive the sixth information sent by the terminal, and send the sixth information and the second identifier of the second network device 1000 to the first network device; wherein,
[0438] The sixth information includes one or more of the following:
[0439] a first identifier of the terminal;
[0440] the first list;
[0441] the second list;
[0442] A first random number of the terminal.
[0443] It should be noted that the specific processing process of the third communication interface 1001 and the third processor 1002 can be understood by referring to the above method, which will not be repeated here.
[0444] Of course, in actual application, the various components in the second network device 1000 are coupled together through the bus system 1004. It can be understood that the bus system 1004 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1004 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Fig.10 Various buses are labeled as bus system 1004 .
[0445] The third memory 1003 in the embodiment of the present application is used to store various types of data to support the operation of the second network device 1000. Examples of such data include: any computer program used to operate on the second network device 1000.
[0446] The method disclosed in the above embodiment of the present application can be applied to the third processor 1002, or implemented by the third processor 1002. The third processor 1002 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the third processor 1002. The above third processor 1002 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The third processor 1002 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the third memory 1003, and the third processor 1002 reads the information in the third memory 1003 and completes the steps of the above method in combination with its hardware.
[0447] In an exemplary embodiment, the second network device 1000 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general processors, controllers, MCUs, Microprocessors, or other electronic components to perform the aforementioned methods.
[0448] It can be understood that the memory (first memory 803, second memory 903, third memory 1003) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a ferromagnetic random access memory, a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memory described in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
[0449] In order to implement the method provided in the embodiment of the present application, the embodiment of the present application also provides a key generation system, such as Fig.11 As shown, the system includes: a first network device 1101, a terminal 1102 and a second network device 1103.
[0450] Here, it should be noted that: the specific processing process of the first network device 1101, the terminal 1102 and the second network device 1103 has been described in detail above and will not be repeated here.
[0451] In an exemplary embodiment, the embodiment of the present application further provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 803 storing a computer program, and the computer program can be executed by the first processor 802 of the first network device 800 to complete the steps of any method described in the first network device side. For another example, a second memory 903 storing a computer program is included, and the computer program can be executed by the second processor 902 of the terminal 900 to complete the steps of any method described in the terminal side. For another example, a third memory 1003 storing a computer program is included, and the computer program can be executed by the third processor 1002 of the second network device 1000 to complete the steps of any method described in the second network device side. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.
[0452] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the first processor 802 of the first network device 800 to complete the steps of any method described in the aforementioned first network device side; or, the computer program can be executed by the second processor 902 of the terminal 900 to complete the steps of any method described in the aforementioned terminal side; or, the computer program can be executed by the third processor 1002 of the second network device 1000 to complete the steps of any method described in the aforementioned second network device side.
[0453] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0454] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0455] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A key generation method, characterized in that: Applied to a first network device, comprising: Sending first information to a terminal through a second network device, so that the terminal generates a first key based on the first information, wherein the first key is used for secure communication between the terminal and the second network device; wherein, The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
2. The method according to claim 1, characterized in that The method further comprises: generating the first key based on the first information and a first random number of the terminal; Sending the first key to the second network device; wherein, The first information also includes one or more of the following: a second random number of the first network device; a first identifier of the terminal; The second identifier of the second network device.
3. The method according to claim 2, characterized in that The method further comprises: Performing integrity protection on the fifth information based on the first key to obtain a first parameter; The first parameter is sent to the terminal through the second network device; wherein, The fifth information includes one or more of the following: the first information; a first random number of the terminal; the first list; The second list.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: receiving sixth information sent by the terminal through the second network device, and receiving a second identifier of the second network device sent by the second network device; wherein, The sixth information includes one or more of the following: a first identifier of the terminal; the first list; the second list; A first random number of the terminal.
5. A key generation method, characterized in that: Applied to terminals, including: Receiving first information sent by the first network device through the second network device; Based on the first information, a first key is generated, where the first key is used for secure communication between the terminal and the second network device; wherein, The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
6. The method according to claim 5, characterized in that The generating a first key based on the first information includes: Based on the first information and the first random number of the terminal, the first key is generated; wherein, The first information also includes one or more of the following: a second random number of the first network device; a first identifier of the terminal; The second identifier of the second network device.
7. The method according to claim 6, characterized in that The method further comprises: receiving a first parameter sent by the first network device through the second network device, where the first parameter is obtained by performing integrity protection on fifth information based on the first key; Based on the first key and the fifth information, verify the correctness of the first parameter; wherein, The fifth information includes one or more of the following: the first information; a first random number of the terminal; the first list; The second list.
8. The method according to any one of claims 5 to 7, characterized in that: The method further comprises: Sending sixth information to the first network device through the second network device, where the sixth information includes one or more of the following: a first identifier of the terminal; the first list; the second list; A first random number of the terminal.
9. A key generation method, characterized in that: Applied to the second network device, comprising: receiving first information sent by a first network device, and sending the first information to a terminal, so that the terminal generates a first key based on the first information, the first key being used for secure communication between the terminal and the second network device; wherein, The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
10. The method according to claim 9, characterized in that The method further comprises: receiving the first key sent by the first network device, where the first key is generated based on the first information and a first random number of the terminal; wherein, The first information also includes one or more of the following: a second random number of the first network device; a first identifier of the terminal; The second identifier of the second network device.
11. The method according to claim 10, characterized in that The method further comprises: receiving a first parameter sent by the first network device, and sending the first parameter to the terminal, where the first parameter is obtained by performing integrity protection on fifth information based on the first key; Based on the first key and the fifth information, verify the correctness of the first parameter; wherein, The fifth information includes one or more of the following: the first information; a first random number of the terminal; the first list; The second list.
12. The method according to any one of claims 9 to 11, characterized in that: The method further comprises: receiving the sixth information sent by the terminal, and sending the sixth information and the second identifier of the second network device to the first network device; wherein, The sixth information includes one or more of the following: a first identifier of the terminal; the first list; the second list; A first random number of the terminal.
13. A key generation device, characterized in that: include: A first sending unit is used to send first information to a terminal through a second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein, The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from the key resource pool; third information, the third information being used to indicate a key generation function selected by the first network device from a first list, the first list comprising one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, where the second list contains one or more cryptographic algorithms supported by the terminal.
14. A key generation device, characterized in that: include: A second receiving unit, configured to receive first information sent by the first network device via the second network device; The second processing unit is configured to generate a first key based on the first information, wherein the first key is used for secure communication between the terminal and the second network device; wherein: The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
15. A key generation device, characterized in that: include: A third receiving unit, configured to receive first information sent by the first network device; a third sending unit, configured to send the first information to the terminal, so that the terminal generates a first key based on the first information, wherein the first key is used for secure communication between the terminal and the second network device; wherein The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
16. A first network device, characterized in that: include: a first communication interface and a first processor; wherein, The first communication interface is used to send first information to the terminal through the second network device, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein, The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
17. A terminal, characterized in that: include: The second communication interface is used to receive the first information sent by the first network device through the second network device; The second processor is configured to generate a first key based on the first information, where the first key is used for secure communication between the terminal and the second network device; wherein: The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
18. A second network device, characterized in that: include: A third communication interface and a third processor; wherein, The third communication interface is used to receive the first information sent by the first network device, and send the first information to the terminal, so that the terminal generates a first key based on the first information, and the first key is used for secure communication between the terminal and the second network device; wherein, The first information includes one or more of the following: second information, where the second information is used to indicate one or more second keys selected by the first network device from a key resource pool; third information, where the third information is used to indicate a key generation function selected by the first network device from a first list, where the first list contains one or more key generation functions supported by the terminal; Fourth information, the fourth information is used to indicate the cryptographic algorithm selected by the first network device from the second list, and the second list contains one or more cryptographic algorithms supported by the terminal.
19. A first network device, characterized in that: include: a first processor and a first memory for storing a computer program executable on the processor, Wherein, when the first processor is used to run the computer program, the steps of the method described in any one of claims 1 to 4 are executed.
20. A terminal, characterized in that: include: a second processor and a second memory for storing a computer program executable on the processor, Wherein, when the second processor is used to run the computer program, the steps of the method described in any one of claims 5 to 8 are executed.
21. A second network device, characterized in that: include: a third processor and a third memory for storing a computer program executable on the processor, Wherein, the third processor is used to execute the steps of the method described in any one of claims 9 to 12 when running the computer program.
22. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 4, or implements the steps of the method described in any one of claims 5 to 8, or implements the steps of the method described in any one of claims 9 to 12.
23. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 4, or implements the steps of the method described in any one of claims 5 to 8, or implements the steps of the method described in any one of claims 9 to 12.