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

By using specific key encryption and integrity protection in the security module of the terminal, the security risks in the key charging process are solved, the security of key transmission is ensured, and the security and user experience of the communication network are improved.

CN119070977AActive Publication Date: 2024-12-03CHINA MOBILE COMM LTD RES INST +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202410979443.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-12-03
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

The key charging process of existing cryptographic technology poses security risks, especially the existence of full keys by multiple parties and different operators may affect the security of the key, resulting in the security of the communication network being threatened.

Method used

By using specific keys for encryption and integrity protection in the security module of the terminal, we ensure that the third party cannot obtain the plain text key during the key transmission process, and the shared key between the specific platform and the security module is used for encryption and integrity. Protection, improves the security of key transmission and charging.

Benefits of technology

It effectively improves the security of the key transmission process, protects the charged key, ensures the secure communication service of the communication network, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119070977A_ABST
    Figure CN119070977A_ABST
Patent Text Reader

Abstract

The invention discloses a key transmission method and device, a terminal, first equipment, a storage medium and a computer program product. The method comprises the steps that a first module on a terminal receives a first secret key sent by first equipment, the first secret key is encrypted and / or subjected to integrity protection based on a second secret key, and the second secret key is a shared secret key between the first equipment and the first module; the first module generates a third key based on the first key; and the first module receives one or more fourth keys sent by the first device, wherein the one or more fourth keys are encrypted and / or subjected to integrity protection based on the third key.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of security technology, and in particular to a key transmission 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, the key injection process of related cryptographic technologies may pose security risks. Summary of the invention

[0004] To solve the related technical problems, the embodiments of the present application provide a key transmission 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 transmission method, which is applied to a terminal, including:

[0007] The first module on the terminal receives a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0008] The first module generates a third key based on the first key;

[0009] The first module receives one or more fourth keys sent by the first device, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0010] In the above scheme, the first key is randomly generated;

[0011] or,

[0012] The first key is generated based on one or more of the following parameters:

[0013] a fifth key of the first device;

[0014] an identification of the terminal;

[0015] an identifier of the first module;

[0016] First random number.

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

[0018] The first module receives the second key sent by the second device, where the second key is sent by the first device to the second device.

[0019] In the above solution, the second key is encrypted and protected by the first device based on the public key of the second device;

[0020] or,

[0021] The second key is encrypted and / or integrity protected by the first device based on a shared key between the second device and the first device.

[0022] In the above solution, the first module on the terminal receives the first key sent by the first device, including:

[0023] The first module receives first information sent by a third device, where the first information is sent by the first device to the third device, and the first information includes a first parameter, which is obtained by encrypting the first key based on the second key.

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

[0025] The first module decrypts the first parameter based on the second key to obtain the first key.

[0026] In the above solution, the first information further includes one or more of the following:

[0027] Second random number;

[0028] an identification of the terminal;

[0029] an identifier of the first module;

[0030] The second parameter is obtained by performing integrity protection on one or more of the first parameter, a second random number, an identifier of the terminal, and an identifier of the first module based on the second key.

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

[0032] The first module verifies correctness of the second parameter based on the second key.

[0033] In the above solution, the first module generates a third key based on the first key, including:

[0034] The first module generates the third key based on the first key and the second random number;

[0035] The first module stores the first key and the third key.

[0036] In the above solution, the first module receives one or more fourth keys sent by the first device, including:

[0037] The first module receives second information sent by a third device, where the second information is sent by the first device to the third device, and the second information includes a third parameter, which is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

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

[0039] The first module decrypts the third parameter based on the third key to obtain the one or more fourth keys;

[0040] The first module stores the one or more fourth keys.

[0041] In the above solution, the second information further includes one or more of the following:

[0042] an identification of the terminal;

[0043] an identifier of the first module;

[0044] an identifier of the fourth key;

[0045] A fourth parameter, wherein the fourth parameter is obtained by performing integrity protection on one or more of the third parameter, the identifier of the terminal, the identifier of the first module, and the one or more identifiers of the one or more fourth keys based on the third key.

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

[0047] The first module verifies correctness of the fourth parameter based on the third key.

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

[0049] The first module updates the third key based on the first key.

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

[0051] The first module receives third information sent by a third device, where the third information is sent by the first device to the third device, and the third information is used to trigger updating of the third key.

[0052] In the above solution, the third information includes one or more of the following:

[0053] an identification of the terminal;

[0054] an identifier of the first module;

[0055] The updated second random number;

[0056] A fifth parameter, wherein the fifth parameter is obtained by performing integrity protection on one or more of the identifier of the terminal, the identifier of the first module, and the updated second random number based on the updated third key.

[0057] In the above solution, the first module updates the third key based on the first key, including:

[0058] The first module generates an updated third key based on the first key and the updated second random number;

[0059] The first module verifies the correctness of the fifth parameter based on the updated third key;

[0060] The first module stores the updated third key.

[0061] The embodiment of the present application further provides a key transmission method, which is applied to a first device, including:

[0062] Sending a first key to a first module on a terminal, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0063] Based on the first key, generate a third key;

[0064] One or more fourth keys are sent to the first module, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

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

[0066] randomly generating the first key;

[0067] or,

[0068] The first key is generated based on one or more of the following parameters:

[0069] a fifth key of the first device;

[0070] an identification of the terminal;

[0071] an identifier of the first module;

[0072] First random number.

[0073] In the above scheme, the method further comprises:

[0074] The second key is sent to the first module through the second device.

[0075] In the above solution, the second key is encrypted and protected by the first device based on the public key of the second device;

[0076] or,

[0077] The second key is encrypted and / or integrity protected by the first device based on a shared key between the second device and the first device.

[0078] In the above solution, sending the first key to the first module on the terminal includes:

[0079] A first message is sent to the first module through a third device, where the first message includes a first parameter, and the first parameter is obtained by encrypting the first key based on the second key.

[0080] In the above solution, the first information further includes one or more of the following:

[0081] Second random number;

[0082] an identification of the terminal;

[0083] an identifier of the first module;

[0084] The second parameter is obtained by performing integrity protection on one or more of the first parameter, a second random number, an identifier of the terminal, and an identifier of the first module based on the second key.

[0085] In the above solution, generating the third key based on the first key includes:

[0086] Generate the third key based on the first key and the second random number;

[0087] The first key and the third key are stored.

[0088] In the above solution, sending one or more fourth keys to the first module includes:

[0089] Second information is sent to the first module through a third device, where the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

[0090] In the above solution, the second information further includes one or more of the following:

[0091] an identification of the terminal;

[0092] an identifier of the first module;

[0093] an identifier of the fourth key;

[0094] A fourth parameter, wherein the fourth parameter is obtained by performing integrity protection on one or more of the third parameter, the identifier of the terminal, the identifier of the first module, and the one or more identifiers of the one or more fourth keys based on the third key.

[0095] In the above scheme, the method further comprises:

[0096] Based on the first key, the third key is updated.

[0097] In the above scheme, the method further comprises:

[0098] Sending third information to the first module through a third device, where the third information is used to trigger updating of the third key.

[0099] In the above solution, the third information includes one or more of the following:

[0100] an identification of the terminal;

[0101] an identifier of the first module;

[0102] The updated second random number;

[0103] A fifth parameter, wherein the fifth parameter is obtained by performing integrity protection on one or more of the identifier of the terminal, the identifier of the first module, and the updated second random number based on the updated third key.

[0104] In the above solution, updating the third key based on the first key includes:

[0105] Generate an updated third key based on the first key and the updated second random number;

[0106] The updated third key is stored.

[0107] The present application also provides a key transmission device, including:

[0108] A first receiving unit, configured to receive a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and a first module on a terminal;

[0109] A first processing unit, configured to generate a third key based on the first key;

[0110] The second receiving unit is configured to receive one or more fourth keys sent by the first device, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0111] The present application also provides a key transmission device, including:

[0112] A first sending unit, configured to send a first key to a first module on a terminal, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0113] A second processing unit, configured to generate a third key based on the first key;

[0114] The second sending unit is configured to send one or more fourth keys to the first module, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0115] The embodiment of the present application further provides a terminal, comprising a first module; the first module comprises a first communication interface and a first processor; wherein,

[0116] The first processor is configured to:

[0117] receiving, through the first communication interface, a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0118] Based on the first key, generate a third key;

[0119] One or more fourth keys sent by the first device are received through the first communication interface, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

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

[0121] The second processor is configured to:

[0122] Sending a first key to a first module on the terminal through the second communication interface, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0123] Based on the first key, generate a third key;

[0124] One or more fourth keys are sent to the first module through the second communication interface, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

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

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

[0127] The embodiment of the present application further provides a first 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 device side.

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

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

[0131] The key transmission method, apparatus, related equipment, storage medium and computer program product provided by the embodiments of the present application, the first module on the terminal receives a first key sent by the first device, the first key is encrypted and / or integrity protected based on a second key, the second key is a shared key between the first device and the first module; the first module generates a third key based on the first key; the first module receives one or more fourth keys sent by the first device, the one or more fourth keys are encrypted and / or integrity protected based on the third key. According to the solution provided by the embodiment of the present application, when a specific platform (i.e., the first device) injects a key into the security module of the terminal (i.e., the first module), the injected key (i.e., the fourth key) is encrypted and / or integrity protected based on a specific key (i.e., the third key), and this specific key is generated based on another specific key (i.e., the first key) sent by the specific platform, and this other specific key is encrypted and / or integrity protected based on a shared key (i.e., the second key) between the specific platform and the security module. In this way, a third party cannot obtain the plaintext key during the key transmission process, thereby improving the security of the key transmission process, that is, improving the security of the key injection process, and protecting and improving the security of the injected key, thereby effectively ensuring the secure communication services of the communication network and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0134] Figure 3 This is a flow chart of the third key transmission method according to an embodiment of the present application;

[0135] Figure 4 This is a flow chart of the fourth key transmission method according to an embodiment of the present application;

[0136] Figure 5 This is a diagram of the key relationship example used in this application;

[0137] Figure 6 This is a flowchart of a single-interface merged key injection solution for the application example of this application;

[0138] Figure 7 This is a flowchart of the multi-interface split key injection solution for the application example of this application;

[0139] Figure 8 This is a schematic diagram of the structure of a key transmission device according to an embodiment of the present application;

[0140] Fig. 9 This is a schematic diagram of the structure of another key transmission device according to an embodiment of the present application;

[0141] Fig.10 This is a schematic diagram of the structure of the third key transmission device in the embodiment of the present application;

[0142] Fig.11 This is a schematic diagram of the structure of the fourth key transmission device according to an embodiment of the present application;

[0143] Fig.12 This is a schematic diagram of the first module structure on the terminal of the embodiment of the present application;

[0144] Fig.13 This is a schematic diagram of the first device structure of the embodiment of the present application;

[0145] Fig.14 This is a schematic diagram of the second device structure of the embodiment of the present application;

[0146] Fig.15 This is a schematic diagram of the third device structure of the embodiment of the present application;

[0147] Fig.16 This is a schematic diagram of the structure of the key transmission system of an embodiment of the present application. DETAILED DESCRIPTION

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

[0149] 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.

[0150] For the specific implementation of security solutions such as quantum security keys, key injection can be used to inject quantum security keys and other types of keys into the terminal's security area offline at one time to construct a key resource pool; business applications can obtain and use keys from the key resource pool. For example, when the terminal's security area includes a Universal Subscriber Identity Module (USIM) card, a hierarchical management approach can be used to ensure the security of quantum keys; specifically, the quantum cryptography service platform can be responsible for generating secure quantum keys; after that, the quantum cryptography service platform can send quantum keys in batches to the injection platform, which will inject the quantum keys into the terminal's USIM card.

[0151] However, the above solution may have the following problems:

[0152] Problem 1: Multiple parties have full keys; for example, quantum keys are sent in batches from the quantum cryptography service platform to the charging platform, and then charged to the USIM card, which enables the charging platform to obtain the same quantum keys of all USIM cards in the entire network as the quantum cryptography service platform;

[0153] Question 2: Different operators may affect the security of keys. For example, since the operators of the quantum cryptography service platform and the charging platform may be different, the responsibilities of the quantum cryptography service platform and the charging platform may also be different, which may affect the security of quantum keys.

[0154] In summary, the key injection process of related cryptographic technologies may involve security risks.

[0155] Based on this, in various embodiments of the present application, when a specific platform injects a key into the security module of the terminal, the injected key is encrypted and / or integrity protected based on a specific key, and this specific key is generated based on another specific key sent by the specific platform, and this other specific key is encrypted and / or integrity protected based on a shared key between the specific platform and the security module. In this way, a third party cannot obtain the plaintext key during the key transmission process, thereby improving the security of the key transmission process, that is, improving the security of the key injection process, that is, at least solving the above-mentioned problems 1 and 2, and protecting and improving the security of the injected key, thereby effectively ensuring the secure communication services of the communication network and improving the user experience.

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

[0157] Step 101: A first module on the terminal receives a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0158] Step 102: The first module generates a third key based on the first key;

[0159] Step 103: The first module receives at least one fourth key (ie, one or more fourth keys) sent by the first device, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0160] 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.

[0161] In actual application, the first module may also be referred to as a security module, etc., which can be understood as a security area of ​​the terminal, and may specifically include a USIM card, a subscriber identification module (SIM) card, a super SIM card, a secure digital (SD) card, etc. The embodiment of the present application does not limit the specific name and type of the first module, as long as its function is realized.

[0162] In actual application, the first device can be understood as a specific platform with at least key and / or cryptographic service functions, such as a cryptographic service platform or a quantum cryptographic service platform, etc. The specific name and type of the first device are not limited in this embodiment of the application, as long as its function is realized. In addition, the fourth key can be understood as a key that is charged, a key to be charged, or a key that needs to be charged, which can specifically include keys of types such as quantum keys. The specific name and type of the fourth key are not limited in this embodiment of the application, as long as its function is realized.

[0163] In actual application, the first key is encrypted and / or integrity protected based on the second key, which means that the first device does not directly send the plain text of the first key to the first module, but sends the ciphertext information corresponding to the first key (which may be recorded as the first information in the subsequent description), and the ciphertext information is obtained by the first device encrypting and / or integrity protecting the first key based on the second key. In addition, the first device can send the ciphertext information to the first module through other devices (which may be recorded as the third device in the subsequent description).

[0164] Based on this, in one embodiment, the first module on the terminal receives the first key sent by the first device, which may include:

[0165] The first module receives first information sent by a third device, where the first information is sent by the first device to the third device, and the first information includes a first parameter, which is obtained by encrypting the first key based on the second key.

[0166] In practical application, the third device can be understood as a specific platform that at least has key distribution and / or charging functions, such as a charging platform, etc. The specific name and type of the third device are not limited in the embodiment of the present application, as long as its function is realized. In addition, after the first module receives the first information sent by the first device through the third device, it can obtain the first key by decrypting the first parameter.

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

[0168] The first module decrypts the first parameter based on the second key to obtain the first key.

[0169] In actual application, the first device can adopt a symmetric encryption algorithm to encrypt the first key based on the second key to obtain the first parameter; the first module can adopt a symmetric decryption algorithm to decrypt the first parameter based on the second key to obtain the first key.

[0170] In actual application, the first device may randomly generate the first key. Alternatively, the first device may generate the first key based on one or more of the following parameters, that is, the first key is generated based on at least one of the following:

[0171] a fifth key of the first device;

[0172] an identification of the terminal;

[0173] an identifier of the first module;

[0174] First random number.

[0175] In actual application, the fifth key may include the root key of the first device; the terminal identifier may include UE ID, application (APP) ID, etc.; the identifier of the first module may include a secure equipment identifier (SEID, Secure Equipment Identifier) ​​or a secure environment identifier (SIED, Secure Environment Identifier), etc.; the first random number may be generated in a preset specific manner, or may be implemented through a timestamp.

[0176] In actual application, the first device may send the second key to the first module through other devices (which may be referred to as the second device in the subsequent description); the second key may be encrypted and protected by the first device based on the public key of the second device, or the second key may be encrypted and / or integrity protected by the first device based on the shared key between the second device and the first device. Among them, the second key is encrypted and protected by the first device based on the public key of the second device, which means that the first device does not directly send the plaintext of the second key, but sends the ciphertext information corresponding to the second key, and the ciphertext information is obtained by the first device based on the public key of the second device; the second key is encrypted and / or integrity protected by the first device based on the shared key between the second device and the first device, which means that the first device does not directly send the plaintext of the second key, but sends the ciphertext information corresponding to the second key, and the ciphertext information is obtained by the first device based on the shared key between the second device and the first device.

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

[0178] The first module receives the second key sent by the second device, where the second key is sent by the first device to the second device.

[0179] In actual application, the second device can be understood as a specific platform that at least has the functions of producing, maintaining, and managing the first module, such as a card merchant, etc. The embodiment of the present application does not limit the specific name and type of the second device, as long as its function is realized.

[0180] In one embodiment, the first information may further include one or more of the following (that is, may include at least one of the following):

[0181] Second random number;

[0182] an identification of the terminal;

[0183] an identifier of the first module;

[0184] The second parameter is obtained by performing integrity protection on one or more of the first parameter, a second random number, an identifier of the terminal, and an identifier of the first module based on the second key.

[0185] Among them, in actual application, the second random number can be generated in a preset specific way, or can be realized through a timestamp. In addition, it can be understood that the first device can use a specific integrity calculation function to perform integrity protection calculation on at least one of the first parameter, the second random number, the identifier of the terminal, and the identifier of the first module based on the second key, so as to obtain the second parameter; when the first information contains the second parameter, the first module can verify the legitimacy of the second parameter, that is, verify the correctness of the second parameter based on the second key.

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

[0187] The first module verifies correctness of the second parameter based on the second key.

[0188] In actual application, the first module may generate the third key based only on the first key. Alternatively, when the first information includes the second random number, the first module may generate the third key based on the first key and the second random number.

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

[0190] The first module generates the third key based on the first key and the second random number;

[0191] The first module stores the first key and the third key.

[0192] In actual application, the one or more fourth keys are encrypted and / or integrity protected based on the third key, which means that the first device does not directly send the plain text of the one or more fourth keys to the first module, but sends the ciphertext information corresponding to the one or more fourth keys (which may be recorded as the second information in the subsequent description), and the ciphertext information is obtained by the first device encrypting and / or integrity protecting the one or more fourth keys based on the third key. In addition, the first device can send the ciphertext information to the first module through the third device.

[0193] Based on this, in one embodiment, the first module receiving one or more fourth keys sent by the first device may include:

[0194] The first module receives second information sent by a third device, where the second information is sent by the first device to the third device, and the second information includes a third parameter, which is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

[0195] In actual application, after the first module receives the second information sent by the first device through the third device, it can obtain the first key by decrypting the third parameter.

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

[0197] The first module decrypts the third parameter based on the third key to obtain the one or more fourth keys;

[0198] The first module stores the one or more fourth keys.

[0199] In actual application, the first device can adopt a symmetric encryption algorithm to encrypt the one or more fourth keys based on the third key to obtain the third parameter; the first module can adopt a symmetric decryption algorithm to decrypt the third parameter based on the third key to obtain the one or more fourth keys.

[0200] In one embodiment, the second information may further include one or more of the following (that is, may include at least one of the following):

[0201] an identification of the terminal;

[0202] an identifier of the first module;

[0203] an identifier of the fourth key;

[0204] A fourth parameter, wherein the fourth parameter is obtained by performing integrity protection on one or more of the third parameter, the identifier of the terminal, the identifier of the first module, and the one or more identifiers of the one or more fourth keys based on the third key.

[0205] Here, since the fourth key may be one or more, the identifier of the fourth key may also be one or more, that is, each fourth key may have a corresponding identifier for indexing.

[0206] In actual application, the first device can adopt a specific integrity calculation function to perform integrity protection calculation on the third parameter, the identifier of the terminal, the identifier of the first module, and at least one of the one or more identifiers of the one or more fourth keys based on the third key, so as to obtain the fourth parameter; accordingly, when the second information contains the fourth parameter, the first module can verify the legitimacy of the fourth parameter, that is, the correctness of the fourth parameter can be verified based on the third key.

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

[0208] The first module verifies correctness of the fourth parameter based on the third key.

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

[0210] The first module updates the third key based on the first key.

[0211] In actual application, the first device may trigger the first module to update the third key through the third device.

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

[0213] The first module receives third information sent by a third device, where the third information is sent by the first device to the third device, and the third information is used to trigger updating of the third key.

[0214] The third information may include one or more of the following (i.e., may include at least one of the following):

[0215] an identification of the terminal;

[0216] an identifier of the first module;

[0217] The updated second random number;

[0218] A fifth parameter, wherein the fifth parameter is obtained by performing integrity protection on one or more of the identifier of the terminal, the identifier of the first module, and the updated second random number based on the updated third key.

[0219] In actual application, the first module can update the third key only based on the first key. Alternatively, when the third information includes the updated second random number, the first module can generate the updated third key based on the first key and the updated second random number. In addition, the first device can use a specific integrity calculation function to perform integrity protection calculation on at least one of the terminal identifier, the first module identifier, and the updated second random number based on the updated third key, so as to obtain the fifth parameter; the first module can verify the legitimacy of the fifth parameter, that is, the correctness of the fifth parameter can be verified based on the updated third key.

[0220] Based on this, in one embodiment, the first module updates the third key based on the first key, which may include:

[0221] The first module generates an updated third key based on the first key and the updated second random number;

[0222] The first module verifies the correctness of the fifth parameter based on the updated third key;

[0223] The first module stores the updated third key.

[0224] Accordingly, the embodiment of the present application also provides a key transmission method, which is applied to a first device, such as Figure 2 As shown, the method includes:

[0225] Step 201: Send a first key to a first module on a terminal, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0226] Step 202: Generate a third key based on the first key;

[0227] Step 203: Send one or more fourth keys to the first module, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

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

[0229] randomly generating the first key;

[0230] or,

[0231] The first key is generated based on one or more of the following parameters:

[0232] a fifth key of the first device;

[0233] an identification of the terminal;

[0234] an identifier of the first module;

[0235] First random number.

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

[0237] The second key is sent to the first module through the second device.

[0238] The second key may be encrypted and protected by the first device based on the public key of the second device; or, the second key may be encrypted and / or integrity protected by the first device based on the shared key between the second device and the first device.

[0239] In one embodiment, sending the first key to the first module on the terminal may include:

[0240] A first message is sent to the first module through a third device, where the first message includes a first parameter, and the first parameter is obtained by encrypting the first key based on the second key.

[0241] The first information may also include one or more of the following:

[0242] Second random number;

[0243] an identification of the terminal;

[0244] an identifier of the first module;

[0245] The second parameter is obtained by performing integrity protection on one or more of the first parameter, a second random number, an identifier of the terminal, and an identifier of the first module based on the second key.

[0246] In one embodiment, generating a third key based on the first key may include:

[0247] Generate the third key based on the first key and the second random number;

[0248] The first key and the third key are stored.

[0249] In one embodiment, sending one or more fourth keys to the first module may include:

[0250] Second information is sent to the first module through a third device, where the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

[0251] The second information may also include one or more of the following:

[0252] an identification of the terminal;

[0253] an identifier of the first module;

[0254] an identifier of the fourth key;

[0255] A fourth parameter, wherein the fourth parameter is obtained by performing integrity protection on one or more of the third parameter, the identifier of the terminal, the identifier of the first module, and the one or more identifiers of the one or more fourth keys based on the third key.

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

[0257] Based on the first key, the third key is updated.

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

[0259] Sending third information to the first module through a third device, where the third information is used to trigger updating of the third key.

[0260] The third information may include one or more of the following:

[0261] an identification of the terminal;

[0262] an identifier of the first module;

[0263] The updated second random number;

[0264] A fifth parameter, wherein the fifth parameter is obtained by performing integrity protection on one or more of the identifier of the terminal, the identifier of the first module, and the updated second random number based on the updated third key.

[0265] In one embodiment, updating the third key based on the first key may include:

[0266] Generate an updated third key based on the first key and the updated second random number;

[0267] The updated third key is stored.

[0268] Accordingly, the embodiment of the present application also provides a key transmission method, which is applied to a second device, such as Figure 3 As shown, the method includes:

[0269] Step 301: receiving a second key sent by a first device, where the second key is a shared key between the first device and a first module on a terminal;

[0270] Step 302: Send the second key to the first module.

[0271] Accordingly, the embodiment of the present application also provides a key transmission method, which is applied to a third device, such as Figure 4 As shown, the method includes:

[0272] Step 401: Receive first information sent by a first device, and send the first information to a first module on a terminal, where the first information includes a first parameter, where the first parameter is obtained by encrypting a first key based on a second key, where the first key is encrypted and / or integrity protected based on the second key, and where the second key is a shared key between the first device and the first module.

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

[0274] Step 402: Receive second information sent by the first device, and send the second information to the first module, where the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting one or more fourth keys based on a third key, the third key is generated based on the first key, and the one or more fourth keys are encrypted and / or integrity protected based on the third key.

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

[0276] Step 403: Receive third information sent by the first device, and send the third information to the first module, where the third information is used to trigger updating of the third key.

[0277] In the key transmission method provided by the embodiment of the present application, a first module on a terminal receives a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, and the second key is a shared key between the first device and the first module; the first module generates a third key based on the first key; the first module receives one or more fourth keys sent by the first device, where the one or more fourth keys are encrypted and / or integrity protected based on the third key. According to the solution provided by the embodiment of the present application, when a specific platform (i.e., the first device) injects a key into the security module of the terminal (i.e., the first module), the injected key (i.e., the fourth key) is encrypted and / or integrity protected based on a specific key (i.e., the third key), and this specific key is generated based on another specific key (i.e., the first key) sent by the specific platform, and this other specific key is encrypted and / or integrity protected based on a shared key (i.e., the second key) between the specific platform and the security module. In this way, a third party cannot obtain the plaintext key during the key transmission process, thereby improving the security of the key transmission process, that is, improving the security of the key injection process, that is, at least solving the above-mentioned problems 1 and 2, and protecting and improving the security of the injected keys, thereby effectively ensuring the secure communication services of the communication network and improving the user experience.

[0278] In addition, it should be noted that the embodiment of the present application does not limit the specific names of the above-mentioned keys (ie, the first key, the second key, the third key, the fourth key, and the fifth key), as long as their functions are achieved.

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

[0280] In this application example, the first device is called a quantum cryptography service platform, the second device is called a card dealer, and the third device is called a charging platform. The first key is called a key encapsulation root key, denoted as RKEK; the second key is called an initial key encapsulation key, denoted as KEK_i; the third key is called a key encapsulation key, denoted as KEK; the fourth key is called a quantum key, denoted as QK, and the identifier of the fourth key is denoted as QKID; the fifth key is called a root key of a quantum cryptography service platform, denoted as RK. The first module includes a USIM card, the identifier of the first module includes SEID, and a quantum key service card application (which may be referred to as a quantum key service card application) is written on the first module, which can be used to implement the method on the terminal side of the above embodiment. The first random number is denoted as R_RKEK, and the second random number is denoted as R_KEK. The first parameter is denoted as ERKEK, the second parameter is denoted as RKEK_MAC, the third parameter is denoted as EQKs, the fourth parameter is denoted as QKs_MAC, and the fifth parameter is denoted as KEK_MAC.

[0281] Other relevant definitions of this application example are explained below.

[0282] H=HASH(m1,m2,…) represents a digest function, that is, a quantum-safe digest algorithm can be used to calculate the digest value of m1,m2,…, where the combination of m1,m2,… may include but is not limited to m1||m2||…. E(key,data) represents a symmetric encryption algorithm, key represents a key, and data represents the data to be encrypted. D(key,data) represents a symmetric decryption algorithm, key represents a key, and data represents the data to be decrypted. Epub(PK,data) represents a public key encryption algorithm, PK represents a public key or a digital certificate, and data represents the data to be encrypted. Dpub(SK,data) represents a private key decryption algorithm, SK represents a private key, and data represents the data to be decrypted. KDF(key,data_1,data_2,…) represents a key derivation function, key represents a key, and data_x represents derived data. The function can be implemented based on HASH or HMAC. HMAC(key,data_1,data_2,…) represents an integrity calculation function, key represents a key, and data_x represents the data to be integrity protected.

[0283] The quantum security terminal (i.e. the terminal mentioned above) refers to a secure terminal device that provides quantum security services for upper-layer business applications based on quantum keys. The management of quantum keys can be specifically managed by the quantum key service card application on the USIM card (i.e. the first module mentioned above), and provide quantum key services for upper-layer APPs. In addition, the quantum key service card application can be responsible for receiving instructions and data from the charging platform (i.e. the third device mentioned above), storing quantum keys in the secure storage area of ​​the quantum key service card application, and completing the charging of quantum keys.

[0284] The quantum cryptography service platform (i.e., the first device mentioned above) can be responsible for docking with quantum random number generators, quantum key distribution (QKD, Quantum Key Distribution) nodes, etc., so as to generate, manage and distribute quantum keys. Among them, RK can represent the root key of the quantum cryptography service platform (i.e., the fifth key mentioned above), the quantum cryptography service platform can generate and secretly store RK, and RK can be used to derive the key encapsulation root key RKEK (i.e., the first key mentioned above) of each USIM card. KEK_i represents the initial key encapsulation key (i.e., the second key mentioned above), the quantum cryptography service platform can generate and secretly store KEK_i, the KEK_i of each USIM card can be the same, and KEK_i can be mainly used to protect the key encapsulation root key RKEK of each USIM card. PKm represents the public key of the card merchant obtained from a secure channel (such as a digital certificate, etc.).

[0285] The charging platform (i.e., the third device mentioned above) can receive charging tasks from the quantum cryptography service platform (i.e., the first device mentioned above) in a single or batch manner, and charge the quantum key into the quantum key service card application of the USIM card (i.e., the first module mentioned above) to complete the charging of the quantum key. The card dealer (i.e., the second device mentioned above) refers to the manufacturer of the USIM card, which is mainly responsible for making blank USIM cards and can support writing quantum key service card applications and personalized data into the USIM card. (SKm, PKm) represents the unique public-private key pair (which may include digital certificates, etc.) owned by each card dealer, which is used to protect the initial encapsulation key KEK_i (i.e., the second key mentioned above).

[0286] In this application example, the quantum cryptography service platform (i.e., the first device mentioned above) can use public key encapsulation encryption technology to securely synchronize the initial key encapsulation key KEK_i (i.e., the second key mentioned above) with the card merchant (i.e., the second device mentioned above). In addition, the quantum cryptography service platform and the USIM card (i.e., the first module mentioned above) can realize the generation and update of the key encapsulation key KEK (i.e., the third key mentioned above) based on the initial key encapsulation key KEK_i. In addition, the quantum cryptography service platform and the USIM card can realize the secure injection of the injection key QK (i.e., the fourth key mentioned above) based on the key encapsulation key KEK, improve the security of the key injection process, and realize the dual separation management of the USIM card access rights (i.e., the permissions of the injection platform) and the key management permissions (i.e., the permissions of the quantum cryptography service platform).

[0287] In this application example, the quantum cryptography service platform (i.e., the first device) can be used with the quantum key service card application based on KEK_i (i.e., the second key), with the help of the card writing channel of the charging platform (i.e., the third device), through the RKEK (i.e., the first key) initialization process, to complete the personalization of the key of each quantum key service card application, that is, to generate an independent RKEK for each USIM card (i.e., the first module). In addition, the quantum cryptography service platform can be used with the quantum key service card application based on RKEK, with the help of the card writing channel of the charging platform, through the KEK (i.e., the third key) update process, to complete the generation and update of the key encapsulation key KEK of each quantum key service card application, that is, to generate a new KEK. In addition, the quantum cryptography service platform can be used with the quantum key service card application based on KEK, with the help of the card writing channel of the charging platform, through the quantum key QK (i.e., the fourth key) charging process, to complete the quantum key charging of each USIM card.

[0288] Alternatively, the quantum cryptography service platform can work with the quantum key service card application based on KEK_i, with the help of the card writing channel of the charging platform, through the key charging process, to complete the personalization of the keys of each quantum key service card application, that is, to generate their own independent RKEK; at the same time, complete the generation and update of the key encapsulation key of each quantum key service card application, that is, to generate a new KEK; and, the quantum key charging of each USIM card can be completed.

[0289] Combine the following Figure 5 Describe the relationship between the keys in this application example.

[0290] like Figure 5As shown, RK represents the root key (i.e., the fifth key mentioned above), which can be generated and secretly stored by the quantum cryptography service platform (i.e., the first device mentioned above), and can be used to derive the key encapsulation root key RKEK (i.e., the first key mentioned above) of each USIM card. RKEK represents the key encapsulation root key, which can be derived by the quantum cryptography service platform for each USIM card respectively. The RKEK of each USIM card can be different. RKEK can be used to derive the key encapsulation key KEK (i.e., the third key mentioned above) of each USIM card. KEK represents the key encapsulation key, which can be derived by the quantum cryptography service platform and each USIM card based on RKEK respectively. KEK can be used to protect the injection key QK (i.e., the fourth key mentioned above). QK represents the key to be injected (such as a quantum key, etc.), which can be generated by the quantum cryptography service platform and injected into the USIM card through the injection platform (i.e., the third device mentioned above). KEK_i represents the initial key encapsulation key (i.e., the above-mentioned second key), which can be generated and kept secret by the quantum cryptography service platform. The KEK_i of each USIM card can be the same, and KEK_i can be used to protect the key encapsulation root key RKEK of each USIM card. (SKm, PKm) represents the unique public-private key pair (which may include digital certificates, etc.) owned by each card merchant (i.e., the above-mentioned second device), which is used to protect the initial encapsulation key KEK_i. The quantum cryptography service platform can obtain the card merchant's public key PKm (such as a digital certificate, etc.) from a secure channel.

[0291] Combine the following Figure 6 Describe the key injection scheme for single interface merging in this application example.

[0292] like Figure 6 As shown, in the preparation stage, the charging platform (i.e., the third device mentioned above) can send the developed quantum key service card application to the card dealer (i.e., the second device mentioned above) through a secure channel; the quantum cryptography service platform (i.e., the first device mentioned above) can encrypt the card data in batches and perform the following processing on each card data: protect the initialization encapsulation key KEK_i (i.e., the second key mentioned above) to obtain EKEK_i, i.e., calculate EKEK_i=Epub(PKm, KEK_i); set the RKEK (i.e., the first key mentioned above) of the USIM card to be empty. Afterwards, the quantum cryptography service platform can send the EKEK_i of each USIM card in batches to the card dealer through a secure channel, and the card dealer can decrypt each initialization encapsulation key KEK_i based on EKEK_i, i.e., calculate KEK_i=Dpub(SKm, EKEK_i), and can write the quantum key service card application to the USIM card in batches, and write KEK_i into the security area of ​​each USIM card at the same time. Finally, the card dealer can synchronize the list of USIM card identification SEID (i.e., the identification of the first module mentioned above) that has been completed to the charging platform and the quantum cryptography service platform through a secure channel.

[0293] In the charging stage, when the charging platform (i.e., the third device) receives a quantum key charging task, it can prepare a QK (i.e., the fourth key) requirement list {SEID, QKN}_i according to the task requirements, (where i=1, ..., n; n is an integer greater than 1), where QKN represents the number of quantum keys to be generated. Afterwards, the charging platform can send a charging key acquisition request to the quantum cryptography service platform (i.e., the first device), and the request can include {SEID, QKN}_i.

[0294] The quantum cryptography service platform can perform the following processing for each pair of (SEID, QKN)_i:

[0295] 1) When it is determined that there is no RKEK (ie, the first key mentioned above) or the RKEK needs to be updated, RKEK and KEK (ie, the third key mentioned above) are generated. Specifically, R_RKEK (i.e., the first random number mentioned above) can be generated, that is, a random number or a timestamp can be generated; RKEK can be derived based on RK (i.e., the fifth key mentioned above) and the random number, that is, RKEK=KDF(RK, SEID, R_RKEK) can be calculated; RKEK can be encrypted based on KEK_i (i.e., the second key mentioned above), that is, ERKEK=E(KEK_i, RKEK) can be calculated; R_KEK (i.e., the second random number mentioned above) can also be generated, that is, a random number or a timestamp can be generated; KEK can be derived based on RKEK and the random number, that is, KEK=KDF(RKEK, R_KEK) can be calculated; finally, integrity protection calculation can be performed, that is, RKEK_MAC=HMAC(KEK_i, SEID, ERKEK, R_KEK, ...) can be calculated.

[0296] 2) When it is determined that the KEK needs to be updated (RKEK already exists at this time), a new KEK is generated. Specifically, R_KEK can be generated, that is, a random number or timestamp can be generated; KEK can be derived based on RKEK and the random number, that is, KEK = KDF (RKEK, R_KEK) can be calculated; finally, integrity protection calculation can be performed, that is, KEK_MAC = HMAC (KEK, SEID, R_KEK, ...) can be calculated.

[0297] 3) When RKEK and KEK exist and RKEK and KEK do not need to be updated, quantum keys QKs can be packaged. Specifically, a quantum key set QKs = {QK1, QK2, ..., QKm} and corresponding QKIDs = {QKID1, QKID2, ..., QKIDm} can be generated, where m is an integer greater than 1; QKs can also be encrypted based on KEK, i.e., EQKs = E (KEK, QKs) can be calculated; finally, integrity protection calculation can be performed, i.e., QKs_MAC = HMAC (KEK, SEID, QKIDs, EQKs, ...) can be calculated.

[0298] Afterwards, the quantum cryptography service platform may return a charging key acquisition response to the charging platform, which may include {SEID, [ERKEK, R_KEK, RKEK_MAC], [R_KEK, KEK_MAC], QKIDs, EQKs, QKs_MAC}_i, i=1,…,n; n is an integer greater than 1. Among them, [xxx] may indicate that there may be no such parameter, that is, [ERKEK, R_KEK, RKEK_MAC] and [R_KEK, KEK_MAC] may be optional parameters. Here, {SEID, QKIDs, EQKs, QKs_MAC}_i may represent the above-mentioned first information, [ERKEK, R_KEK, RKEK_MAC] may represent the above-mentioned second information, and [R_KEK, KEK_MAC] may represent the above-mentioned third information. Afterwards, the charging platform can assemble data according to the instructions of the USIM card and send a key charging request to the quantum key service card application, which may include {SEID, [ERKEK, R_KEK, RKEK_MAC], [R_KEK, KEK_MAC], QKIDs, EQKs, QKs_MAC}_i; that is, the quantum cryptography service platform can send one or more of the above-mentioned first information, second information and third information to the quantum key service card application through the charging platform.

[0299] The quantum key service card application can perform the following processing for each SEIDi:

[0300] 1) If [ERKEK, R_KEK, RKEK_MAC] is received, that is, the above-mentioned first information is received, then the new RKEK and KEK need to be saved. Specifically, the legitimacy of RKEK_MAC can be verified, and RKEK can be decrypted based on KEK_i, that is, RKEK=D(KEK_i, ERKEK) can be calculated; KEK can also be derived based on RKEK and random numbers, that is, KEK=KDF(RKEK, R_KEK) is calculated; finally, RKEK can be safely saved and KEK can be overwritten and saved.

[0301] 2) If [R_KEK, KEK_MAC] is received, that is, the third information is received, then a new KEK needs to be saved, that is, KEK is updated. Specifically, KEK can be derived based on RKEK and random numbers, that is, KEK = KDF (RKEK, R_KEK) is calculated, and the legitimacy of KEK_MAC can be verified; finally, KEK can be securely overwritten and saved.

[0302] 3) If EQKs and QKs_MAC are received, that is, the above-mentioned first information is received, the quantum key QKs can be decrypted (RKEK and KEK are already present at this time). Specifically, the legitimacy of QKs_MAC can be verified, and QK can be decrypted based on KEK, that is, QKs=D(KEK, EQKs) is calculated; finally, QK can be written locally, that is, QKs={QK1, QK2, ..., QKn} and the corresponding QKIDs={QKID1, QKID2, ..., QKIDn} are written.

[0303] Afterwards, the quantum key service card application can return a key filling result response to the filling platform; the filling platform can return a key filling result response to the quantum cryptography service platform. The quantum cryptography service platform can perform the following processing:

[0304] If new RKEK and KEK are generated, the RKEK and KEK corresponding to the SEID are securely overwritten and saved;

[0305] If the KEK is updated, the KEK corresponding to the saved SEID is securely overwritten;

[0306] Set the charging status of each QKs key.

[0307] Combine the following Figure 7 Describe the key injection scheme for multi-interface splitting in this application example.

[0308] like Figure 7 As shown, in the preparation stage, the charging platform (i.e., the third device mentioned above) can send the developed quantum key service card application to the card dealer (i.e., the second device mentioned above) through a secure channel; the quantum cryptography service platform (i.e., the first device mentioned above) can encrypt the card data in batches and perform the following processing on each card data: protect the initialization encapsulation key KEK_i (i.e., the second key mentioned above) to obtain EKEK_i, i.e., calculate EKEK_i=Epub(PKm, KEK_i); set the RKEK (i.e., the first key mentioned above) of the USIM card to be empty. Afterwards, the quantum cryptography service platform can send the EKEK_i of each USIM card in batches to the card dealer through a secure channel, and the card dealer can decrypt each initialization encapsulation key KEK_i based on EKEK_i, i.e., calculate KEK_i=Dpub(SKm, EKEK_i), and can write the quantum key service card application to the USIM card in batches, and write KEK_i into the security area of ​​each USIM card at the same time. Finally, the card dealer can synchronize the list of USIM card identification SEID (i.e., the identification of the first module mentioned above) that has been completed to the charging platform and the quantum cryptography service platform through a secure channel.

[0309] During the charging phase, the following three sub-processes can be included:

[0310] Process 1, RKEK and KEK initialization process;

[0311] Process 2, KEK update process;

[0312] Process 3, key injection process.

[0313] Among them, for the above process 1, if the USIM card has not been initialized (that is, the first time the USIM card is used), that is, the USIM card has no RKEK, the RKEK and KEK initialization process can be run. First, the charging platform can send an RKEK initialization request to the vector cryptographic service platform, and the request can include one or more SEIDs.

[0314] Afterwards, the quantum cryptography service platform can perform the following processing for each SEID:

[0315] 1) When it is determined that there is no corresponding RKEK or RKEK needs to be updated, RKEK and KEK are generated. Specifically, R_RKEK can be generated, that is, a random number or timestamp is generated; RKEK is derived based on RK and the random number, that is, RKEK=KDF(RK, SEID, R_RKEK) is calculated; RKEK is encrypted based on KEK_i, that is, ERKEK=E(KEK_i, RKEK) is calculated; R_KEK (random number or timestamp) can also be generated; KEK is derived based on RKEK and the random number, that is, KEK=KDF(RKEK, R_KEK) is calculated; and integrity protection calculation can be performed, that is, RKEK_MAC=HMAC(KEK_i, SEID, ERKEK, R_KEK, ...) is calculated;

[0316] 2) If it is determined that a corresponding RKEK exists and there is no need to update the RKEK, a message indicating that the RKEK does not need to be updated is returned to the charging platform.

[0317] Afterwards, the quantum cryptography service platform can return an RKEK and KEK initialization response to the charging platform, which response can include SEID, ERKEK, R_KEK, RKEK_MAC, that is, the response can include the above-mentioned first information; the charging platform can send an RKEK and KEK initialization request to the quantum key service card application, which request can include SEID, ERKEK, R_KEK, RKEK_MAC, that is, the request can include the above-mentioned first information.

[0318] Afterwards, the quantum key service card application can perform the following processing: verify the legitimacy of RKEK_MAC; decrypt RKEK based on KEK_i, that is, calculate RKEK=D(KEK_i, ERKEK); derive KEK based on RKEK and random numbers, that is, calculate KEK=KDF(RKEK, R_KEK); finally, RKEK can be safely saved and overwritten with KEK.

[0319] Afterwards, the quantum key service card application can return RKEK and KEK initialization responses to the charging platform; the charging platform can return RKEK and KEK initialization responses to the quantum cryptography service platform; and the quantum cryptography service platform can safely save the RKEK and KEK corresponding to the SEID.

[0320] For the above process 2, if the USIM card does not have a corresponding KEK, or the KEK needs to be updated, the KEK update process is executed. First, the charging platform can send a KEK update request to the quantum cryptographic service platform, and the request can include one or more SEIDs.

[0321] Afterwards, the quantum cryptography service platform can perform the following processing for each SEID:

[0322] 1) If it is determined that there is a corresponding RKEK and the KEK needs to be updated, a new KEK is generated; specifically, R_KEK can be generated, that is, a random number or a timestamp is generated; KEK is derived based on RKEK and the random number, that is, KEK=KDF(RKEK, R_KEK) is calculated; and integrity protection calculation can be performed, that is, KEK_MAC=HMAC(KEK, SEID, R_KEK, ...) is calculated;

[0323] 2) If it is determined that there is a corresponding RKEK and there is no need to update the RKEK, a message indicating that the KEK does not need to be updated is returned;

[0324] 3) If it is determined that there is no corresponding RKEK, a message indicating that there is no RKEK is returned.

[0325] Afterwards, the quantum cryptography service platform can return a KEK update response to the charging platform, which response can include SEID, R_KEK, KEK_MAC, that is, the response can include the above-mentioned third information; the charging platform can send a KEK update request to the quantum key service card application, which request can include SEID, R_KEK, KEK_MAC, that is, the request can include the above-mentioned third information.

[0326] Afterwards, the quantum key service card application can perform the following processing: derive KEK based on RKEK and random numbers, that is, calculate KEK = KDF (RKEK, R_KEK); verify the legitimacy of KEK_MAC; finally, the KEK can be securely overwritten and saved.

[0327] Afterwards, the quantum key service card application can return a KEK update response to the charging platform; the charging platform can return a KEK update response to the quantum cryptography service platform; and the quantum cryptography service platform can safely save the KEK corresponding to the SEID.

[0328] For the above process 3, if the USIM card does not need to be initialized and / or does not need to update the KEK, the key injection process is run. First, the injection platform can perform the following processing for each USIM card: When the injection platform (i.e., the third device mentioned above) receives a quantum key injection task, it can prepare a QK (i.e., the fourth key) requirement list {SEID, QKN}_i according to the task requirements, (where i=1,...,n; n is an integer greater than 1), and QKN represents the number of quantum keys that need to be generated. Afterwards, the injection platform can send a key injection acquisition request to the quantum cryptography service platform, and the request may contain {SEID, QKN}_i.

[0329] Afterwards, the quantum cryptography service platform can perform the following processing for each pair of (SEID, QKN)_i:

[0330] 1) When RKEK and KEK exist and RKEK and KEK do not need to be updated, quantum keys QKs can be packaged; specifically, quantum key set QKs = {QK1, QK2, ..., QKm} and corresponding QKIDs = {QKID1, QKID2, ..., QKIDm} can be generated; QKs can be encrypted based on KEK, that is, EQKs = E (KEK, QKs) is calculated; and integrity protection calculation can be performed, that is, QKs_MAC = HMAC (KEK, SEID, QKIDs, EQKs, ...) can be calculated;

[0331] 2) If the corresponding RKEK and / or KEK does not exist, an error message response is returned.

[0332] Afterwards, the quantum cryptography service platform can return a key charging response to the charging platform, which response may include {SEID, QKIDs, EQKs, QKs_MAC}_i (where i=1,...,n; n is an integer greater than 1), that is, the response may include the above-mentioned first information; the charging platform can assemble data according to the instruction requirements of the USIM card, and send a key charging request to the quantum key service card application, which request may include {SEID, QKIDs, EQKs, QKs_MAC}_i, that is, the request may include the above-mentioned first information.

[0333] Afterwards, the quantum key service card application can perform the following processing for each SEID_i: decrypt the quantum key QKs (the corresponding RKEK and KEK already exist at this time); verify the legitimacy of QKs_MAC; decrypt QK based on KEK, that is, calculate QKs = D(KEK, EQKs); finally, QK can be written locally, that is, write QKs = {QK1, QK2, ..., QKn} and the corresponding QKIDs = {QKID1, QKID2, ..., QKIDn}.

[0334] Afterwards, the quantum key service card application can return a key charging result response to the charging platform; the charging platform can return a key charging result response to the quantum cryptography service platform; and the quantum cryptography service platform can set the charging status of each QKs key.

[0335] The solution provided by this application example has the following advantages:

[0336] 1) The quantum cryptography service platform is the only entity that owns the full set of keys. Neither the card dealer nor the charging platform can obtain the charged quantum keys, thus achieving the dual separation management of USIM card access rights (i.e., the charging platform's rights) and key management rights (i.e., the quantum cryptography service platform's rights), and improving the security of the key charging process;

[0337] 2) During the charging process, the charging key is generated and securely packaged by the quantum cryptography service platform and written into the USIM card through the charging platform. A third party cannot obtain the plaintext key during this process, which is conducive to protecting and improving the security of the quantum key;

[0338] 3) The quantum cryptography service platform can update the key encapsulation key at any time according to the security policy requirements, thereby preventing the security risks that may be caused by the long-term use of the key encapsulation key, which is conducive to protecting and improving the security of quantum keys.

[0339] 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 transmission device, which is arranged on the first module on the terminal, such as Figure 8 As shown, the device comprises:

[0340] A first receiving unit 801 is configured to receive a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0341] A first processing unit 802 is configured to generate a third key based on the first key;

[0342] The second receiving unit 803 is configured to receive one or more fourth keys sent by the first device, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

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

[0344] The third receiving unit 804 is configured to receive the second key sent by the second device, where the second key is sent by the first device to the second device.

[0345] In one embodiment, the first receiving unit 801 is specifically used to receive first information sent by a third device, where the first information is sent by the first device to the third device, and the first information includes a first parameter, which is obtained by encrypting the first key based on the second key.

[0346] In one embodiment, the first processing unit 802 is further configured to decrypt the first parameter based on the second key to obtain the first key.

[0347] In one embodiment, the first processing unit 802 is further configured to verify the correctness of the second parameter based on the second key.

[0348] In one embodiment, the first processing unit 802 is further configured to:

[0349] Generate the third key based on the first key and the second random number;

[0350] The first key and the third key are stored.

[0351] In one embodiment, the second receiving unit 803 is specifically used to receive second information sent by a third device, where the second information is sent by the first device to the third device, and the second information includes a third parameter, which is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

[0352] In one embodiment, the first processing unit 802 is further configured to:

[0353] Decrypting the third parameter based on the third key to obtain the one or more fourth keys;

[0354] The one or more fourth keys are stored.

[0355] In one embodiment, the first processing unit 802 is further configured to verify the correctness of the fourth parameter based on the third key.

[0356] In one embodiment, the first processing unit 802 is further configured to update the third key based on the first key.

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

[0358] The fourth receiving unit 805 is used to receive third information sent by a third device, where the third information is sent by the first device to the third device, and the third information is used to trigger updating of the third key.

[0359] In one embodiment, the first processing unit 802 is further configured to:

[0360] Generate an updated third key based on the first key and the updated second random number;

[0361] verifying the correctness of the fifth parameter based on the updated third key;

[0362] The updated third key is stored.

[0363] In actual application, the first receiving unit 801, the second receiving unit 803, the third receiving unit 804 and the fourth receiving unit 805 can be implemented by a communication interface in the key transmission device; the first processing unit 802 can be implemented by a processor in the key transmission device.

[0364] In order to implement the method on the first device side of the embodiment of the present application, the embodiment of the present application also provides a key transmission device, which is arranged on the first device, such as Fig. 9 As shown, the device comprises:

[0365] A first sending unit 901 is configured to send a first key to a first module on a terminal, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module;

[0366] A second processing unit 902 is used to generate a third key based on the first key;

[0367] The second sending unit 903 is configured to send one or more fourth keys to the first module, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0368] In one embodiment, the second processing unit 902 is further configured to:

[0369] randomly generating the first key;

[0370] or,

[0371] The first key is generated based on one or more of the following parameters:

[0372] a fifth key of the first device;

[0373] an identification of the terminal;

[0374] an identifier of the first module;

[0375] First random number.

[0376] In one embodiment, if Fig. 9 As shown, the device may also include:

[0377] The third sending unit 904 is configured to send the second key to the first module through a second device.

[0378] In one embodiment, the first sending unit 901 is specifically configured to send first information to the first module through a third device, where the first information includes a first parameter, and the first parameter is obtained by encrypting the first key based on the second key.

[0379] In one embodiment, the second processing unit 902 is further configured to:

[0380] Generate the third key based on the first key and the second random number;

[0381] The first key and the third key are stored.

[0382] In one embodiment, the second sending unit 903 is specifically used to send second information to the first module through a third device, where the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

[0383] In one embodiment, the second processing unit 902 is further configured to update the third key based on the first key.

[0384] In one embodiment, if Fig. 9 As shown, the device may also include:

[0385] The fourth sending unit 905 is used to send third information to the first module through a third device, where the third information is used to trigger updating of the third key.

[0386] In one embodiment, the second processing unit 902 is further configured to:

[0387] Generate an updated third key based on the first key and the updated second random number;

[0388] The updated third key is stored.

[0389] In actual application, the first sending unit 901, the second sending unit 903, the third sending unit 904 and the fourth sending unit 905 can be implemented by a communication interface in the key transmission device; the second processing unit 902 can be implemented by a processor in the key transmission device.

[0390] In order to implement the method on the second device side of the embodiment of the present application, the embodiment of the present application also provides a key transmission device, which is arranged on the second device, such as Fig.10 As shown, the device comprises:

[0391] A fifth receiving unit 1001 is configured to receive a second key sent by a first device, where the second key is a shared key between the first device and a first module on a terminal;

[0392] The fifth sending unit 1002 is configured to send the second key to the first module.

[0393] In actual application, the fifth receiving unit 1001 and the fifth sending unit 1002 can be implemented by a communication interface in the key transmission device.

[0394] In order to implement the method on the third device side of the embodiment of the present application, the embodiment of the present application also provides a key transmission device, which is set on the third device, such as Fig.11 As shown, the device comprises:

[0395] The first transmission unit 1101 is used to receive first information sent by a first device and send the first information to a first module on the terminal, where the first information includes a first parameter, where the first parameter is obtained by encrypting a first key based on a second key, where the first key is encrypted and / or integrity protected based on the second key, and where the second key is a shared key between the first device and the first module.

[0396] In one embodiment, if Fig.11 As shown, the device may also include:

[0397] The second transmission unit 1102 is used to receive second information sent by the first device and send the second information to the first module, the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting one or more fourth keys based on the third key, the third key is generated based on the first key, and the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0398] In one embodiment, if Fig.11 As shown, the device may also include:

[0399] The third transmission unit 1103 is used to receive third information sent by the first device, and send the third information to the first module, where the third information is used to trigger updating of the third key.

[0400] In actual application, the first transmission unit 1101, the second transmission unit 1102 and the third transmission unit 1103 can be implemented by a communication interface in the key transmission device.

[0401] It should be noted that: the key transmission device provided in the above embodiment only uses the division of the above program modules as an example to illustrate when transmitting keys. 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 transmission device provided in the above embodiment and the key transmission method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0402] Based on the hardware implementation of the above program module, 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, including a first module, such as Fig.12 As shown, the first module 1200 includes:

[0403] The first communication interface 1201 is capable of exchanging information with other devices (such as the first device, the second device, the third device, etc.);

[0404] A first processor 1202, connected to the first communication interface 1201, to implement information interaction with other devices, and configured to execute the method provided by one or more technical solutions on the terminal side when running a computer program;

[0405] A first memory 1203 , on which the computer program is stored.

[0406] Specifically, the first processor 1202 is configured to:

[0407] receiving, through the first communication interface 1201, a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module 1200;

[0408] Based on the first key, generate a third key;

[0409] One or more fourth keys sent by the first device are received through the first communication interface 1201, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0410] In one embodiment, the first processor 1202 is further configured to receive the second key sent by the second device through the first communication interface 1201, where the second key is sent by the first device to the second device.

[0411] In one embodiment, the first processor 1202 is further used to receive first information sent by a third device through the first communication interface 1201, where the first information is sent by the first device to the third device, and the first information includes a first parameter, which is obtained by encrypting the first key based on the second key.

[0412] In one embodiment, the first processor 1202 is further configured to decrypt the first parameter based on the second key to obtain the first key.

[0413] In one embodiment, the first processor 1202 is further configured to verify correctness of the second parameter based on the second key.

[0414] In one embodiment, the first processor 1202 is further configured to:

[0415] Generate the third key based on the first key and the second random number;

[0416] The first key and the third key are stored.

[0417] In one embodiment, the first processor 1202 is further used to receive second information sent by a third device through the first communication interface 1201, where the second information is sent by the first device to the third device, and the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

[0418] In one embodiment, the first processor 1202 is further configured to:

[0419] Decrypting the third parameter based on the third key to obtain the one or more fourth keys;

[0420] The one or more fourth keys are stored.

[0421] In one embodiment, the first processor 1202 is further configured to verify the correctness of the fourth parameter based on the third key.

[0422] In one embodiment, the first processor 1202 is further configured to update the third key based on the first key.

[0423] In one embodiment, the first processor 1202 is further used to receive third information sent by a third device through the first communication interface 1201, where the third information is sent by the first device to the third device, and the third information is used to trigger updating of the third key.

[0424] In one embodiment, the first processor 1202 is further configured to:

[0425] Generate an updated third key based on the first key and the updated second random number;

[0426] verifying the correctness of the fifth parameter based on the updated third key;

[0427] The updated third key is stored.

[0428] It should be noted that the specific processing process of the first processor 1202 can be understood by referring to the above method, which will not be repeated here.

[0429] Of course, in actual application, the various components in the first module 1200 are coupled together through the bus system 1204. It can be understood that the bus system 1204 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 1204 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Fig.12 Various buses are labeled as bus system 1204.

[0430] The first memory 1203 in the embodiment of the present application is used to store various types of data to support the operation of the first module 1200. Examples of such data include: any computer program used to operate on the first module 1200.

[0431] The method disclosed in the above embodiment of the present application can be applied to the first processor 1202, or implemented by the first processor 1202. The first processor 1202 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 first processor 1202 or an instruction in the form of software. The above-mentioned first processor 1202 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 1202 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 first memory 1203, and the first processor 1202 reads the information in the first memory 1203 and completes the steps of the above method in combination with its hardware.

[0432] In an exemplary embodiment, the first module 1200 can 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.

[0433] Based on the hardware implementation of the above program module, and in order to implement the method on the first device side of the embodiment of the present application, the embodiment of the present application also provides a first device, such as Fig.13 As shown, the first device 1300 includes:

[0434] The second communication interface 1301 can exchange information with other devices (such as a second device, a third device, a terminal, etc.);

[0435] The second processor 1302 is connected to the second communication interface 1301 to implement information interaction with other devices, and is used to execute the method provided by one or more technical solutions on the first device side when running a computer program;

[0436] A second memory 1303 , on which the computer program is stored.

[0437] Specifically, the second processor 1302 is configured to:

[0438] Sending a first key to a first module on the terminal through the second communication interface 1301, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device 1300 and the first module;

[0439] Based on the first key, generate a third key;

[0440] One or more fourth keys are sent to the first module through the second communication interface 1301 , where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0441] In one embodiment, the second processor 1302 is further configured to:

[0442] randomly generating the first key;

[0443] or,

[0444] The first key is generated based on one or more of the following parameters:

[0445] a fifth key of the first device 1300;

[0446] an identification of the terminal;

[0447] an identifier of the first module;

[0448] First random number.

[0449] In one embodiment, the second communication interface 1301 is further used to send the second key to the first module through a second device.

[0450] In one embodiment, the second communication interface 1301 is further used to send first information to the first module through a third device, where the first information includes a first parameter, and the first parameter is obtained by encrypting the first key based on the second key.

[0451] In one embodiment, the second processor 1302 is further configured to:

[0452] Generate the third key based on the first key and the second random number;

[0453] The first key and the third key are stored.

[0454] In one embodiment, the second communication interface 1301 is further used to send second information to the first module through a third device, where the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

[0455] In one embodiment, the second processor 1302 is further configured to update the third key based on the first key.

[0456] In one embodiment, the second communication interface 1301 is further used to send third information to the first module through a third device, and the third information is used to trigger updating of the third key.

[0457] In one embodiment, the second processor 1302 is further configured to:

[0458] Generate an updated third key based on the first key and the updated second random number;

[0459] The updated third key is stored.

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

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

[0462] The second memory 1303 in the embodiment of the present application is used to store various types of data to support the operation of the first device 1300. Examples of such data include: any computer program used to operate on the first device 1300.

[0463] The method disclosed in the above embodiment of the present application can be applied to the second processor 1302, or implemented by the second processor 1302. The second processor 1302 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 second processor 1302. The above second processor 1302 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The second processor 1302 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, which is located in the second memory 1303, and the second processor 1302 reads the information in the second memory 1303 and completes the steps of the above method in combination with its hardware.

[0464] In an exemplary embodiment, the first device 1300 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.

[0465] Based on the hardware implementation of the above program module, and in order to implement the method on the second device side of the embodiment of the present application, the embodiment of the present application also provides a second device, such as Fig.14 As shown, the second device 1400 includes:

[0466] The third communication interface 1401 is capable of exchanging information with other devices (such as the first device, a terminal, etc.);

[0467] A third processor 1402 is connected to the third communication interface 1401 to implement information interaction with other devices, and is used to execute the method provided by one or more technical solutions on the second device side when running a computer program;

[0468] A third memory 1403 , on which the computer program is stored.

[0469] Specifically, the third communication interface 1401 is used to:

[0470] receiving a second key sent by the first device, where the second key is a shared key between the first device and a first module on the terminal;

[0471] The second key is sent to the first module.

[0472] It should be noted that the specific processing process of the third communication interface 1401 can be understood by referring to the above method, which will not be repeated here.

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

[0474] The third memory 1403 in the embodiment of the present application is used to store various types of data to support the operation of the second device 1400. Examples of such data include: any computer program used to operate on the second device 1400.

[0475] The method disclosed in the above embodiment of the present application can be applied to the third processor 1402, or implemented by the third processor 1402. The third processor 1402 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 third processor 1402 or an instruction in the form of software. The above third processor 1402 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The third processor 1402 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment 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 1403, and the third processor 1402 reads the information in the third memory 1403 and completes the steps of the above method in combination with its hardware.

[0476] In an exemplary embodiment, the second device 1400 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.

[0477] Based on the hardware implementation of the above program modules, and in order to implement the method on the third device side of the embodiment of the present application, the embodiment of the present application also provides a third device, such as Fig.15 As shown, the third device 1500 includes:

[0478] The fourth communication interface 1501 is capable of exchanging information with other devices (such as the first device, the terminal, etc.);

[0479] a fourth processor 1502, connected to the fourth communication interface 1501 to implement information interaction with other devices, and configured to execute the method provided by one or more technical solutions on the third device side when running a computer program;

[0480] A fourth memory 1503 , on which the computer program is stored.

[0481] Specifically, the fourth communication interface 1501 is used to receive first information sent by a first device and send the first information to a first module on the terminal, the first information includes a first parameter, the first parameter is obtained by encrypting a first key based on a second key, the first key is encrypted and / or integrity protected based on the second key, and the second key is a shared key between the first device and the first module.

[0482] In one embodiment, the fourth communication interface 1501 is also used to receive second information sent by the first device and send the second information to the first module, the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting one or more fourth keys based on the third key, the third key is generated based on the first key, and the one or more fourth keys are encrypted and / or integrity protected based on the third key.

[0483] In one embodiment, the fourth communication interface 1501 is further used to receive third information sent by the first device, and send the third information to the first module, where the third information is used to trigger updating of the third key.

[0484] It should be noted that the specific processing process of the fourth communication interface 1501 can be understood by referring to the above method, which will not be repeated here.

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

[0486] The fourth memory 1503 in the embodiment of the present application is used to store various types of data to support the operation of the third device 1500. Examples of such data include: any computer program used to operate on the third device 1500.

[0487] The method disclosed in the above embodiment of the present application can be applied to the fourth processor 1502, or implemented by the fourth processor 1502. The fourth processor 1502 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 fourth processor 1502 or an instruction in the form of software. The above fourth processor 1502 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The fourth processor 1502 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 fourth memory 1503, and the fourth processor 1502 reads the information in the fourth memory 1503 and completes the steps of the above method in combination with its hardware.

[0488] In an exemplary embodiment, the third device 1500 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.

[0489] It can be understood that the memory (first memory 1203, second memory 1303, third memory 1403, fourth memory 1503) of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache.By way of example but 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), direct memory bus random access memory (DRRAM). The memory described in the embodiments of the present application is intended to include but is not limited to these and any other suitable types of memory.

[0490] In order to implement the method provided in the embodiment of the present application, the embodiment of the present application also provides a key transmission system, such as Fig.16 As shown, the system includes: a terminal 1601 including a first module, a first device 1602, a second device 1603 and a third device 1604.

[0491] Here, it should be noted that the specific processing procedures of the terminal 1601, the first device 1602, the second device 1603 and the third device 1604 have been described in detail above and will not be repeated here.

[0492] 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 1203 storing a computer program, the computer program can be executed by the first processor 1202 of the first module 1200 to complete the steps of any of the methods described in the aforementioned terminal side. For another example, a second memory 1303 storing a computer program is included, and the computer program can be executed by the second processor 1302 of the first device 1300 to complete the steps of any of the methods described in the aforementioned first device side. For another example, a third memory 1403 storing a computer program is included, and the computer program can be executed by the third processor 1402 of the second device 1400 to complete the steps of any of the methods described in the aforementioned second device side. For another example, a fourth memory 1503 storing a computer program is included, and the computer program can be executed by the fourth processor 1502 of the third device 1500 to complete the steps of any of the methods described in the aforementioned third device side. In addition, 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.

[0493] An embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the first processor 1202 of the first module 1200 to complete the steps of any of the aforementioned terminal side methods; or, the computer program can be executed by the second processor 1302 of the first device 1300 to complete the steps of any of the aforementioned first device side methods; or, the computer program can be executed by the third processor 1402 of the second device 1400 to complete the steps of any of the aforementioned second device side methods; or, the computer program can be executed by the fourth processor 1502 of the third device 1500 to complete the steps of any of the aforementioned third device side methods.

[0494] 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.

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

[0496] 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 transmission method, It is characterized in that Applied to terminals, including: The first module on the terminal receives a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module; The first module generates a third key based on the first key; The first module receives one or more fourth keys sent by the first device, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

2. The method according to claim 1, It is characterized in that The first key is randomly generated; or, The first key is generated based on one or more of the following parameters: a fifth key of the first device; an identification of the terminal; an identifier of the first module; First random number.

3. The method according to claim 1, It is characterized in that The method further comprises: The first module receives the second key sent by the second device, where the second key is sent by the first device to the second device.

4. The method according to claim 3, It is characterized in that The second key is encrypted and protected by the first device based on the public key of the second device; or, The second key is encrypted and / or integrity protected by the first device based on a shared key between the second device and the first device.

5. The method according to claim 1, It is characterized in that The first module on the terminal receives a first key sent by a first device, including: The first module receives first information sent by a third device, where the first information is sent by the first device to the third device, and the first information includes a first parameter, which is obtained by encrypting the first key based on the second key.

6. The method according to claim 5, It is characterized in that The method further comprises: The first module decrypts the first parameter based on the second key to obtain the first key.

7. The method according to claim 5, It is characterized in that The first information further includes one or more of the following: Second random number; an identification of the terminal; an identifier of the first module; The second parameter is obtained by performing integrity protection on one or more of the first parameter, a second random number, an identifier of the terminal, and an identifier of the first module based on the second key.

8. The method according to claim 7, It is characterized in that The method further comprises: The first module verifies correctness of the second parameter based on the second key.

9. The method according to claim 7, It is characterized in that The first module generates a third key based on the first key, including: The first module generates the third key based on the first key and the second random number; The first module stores the first key and the third key.

10. The method according to claim 1, It is characterized in that The first module receives one or more fourth keys sent by the first device, including: The first module receives second information sent by a third device, where the second information is sent by the first device to the third device, and the second information includes a third parameter, which is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

11. The method according to claim 10, It is characterized in that The method further comprises: The first module decrypts the third parameter based on the third key to obtain the one or more fourth keys; The first module stores the one or more fourth keys.

12. The method according to claim 10, It is characterized in that The second information further includes one or more of the following: an identification of the terminal; an identifier of the first module; an identifier of the fourth key; A fourth parameter, wherein the fourth parameter is obtained by performing integrity protection on one or more of the third parameter, the identifier of the terminal, the identifier of the first module, and the one or more identifiers of the one or more fourth keys based on the third key.

13. The method according to claim 12, It is characterized in that The method further comprises: The first module verifies correctness of the fourth parameter based on the third key.

14. The method according to any one of claims 1 to 13, It is characterized in that The method further comprises: The first module updates the third key based on the first key.

15. The method according to claim 14, It is characterized in that The method further comprises: The first module receives third information sent by a third device, where the third information is sent by the first device to the third device, and the third information is used to trigger updating of the third key.

16. The method according to claim 15, It is characterized in that The third information includes one or more of the following: an identification of the terminal; an identifier of the first module; The updated second random number; A fifth parameter, wherein the fifth parameter is obtained by performing integrity protection on one or more of the identifier of the terminal, the identifier of the first module, and the updated second random number based on the updated third key.

17. The method according to claim 16, It is characterized in that The first module updates the third key based on the first key, including: The first module generates an updated third key based on the first key and the updated second random number; The first module verifies the correctness of the fifth parameter based on the updated third key; The first module stores the updated third key.

18. A key transmission method, It is characterized in that Applied to a first device, comprising: Sending a first key to a first module on a terminal, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module; Based on the first key, generate a third key; One or more fourth keys are sent to the first module, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

19. The method according to claim 18, It is characterized in that The method further comprises: randomly generating the first key; or, The first key is generated based on one or more of the following parameters: a fifth key of the first device; an identification of the terminal; an identifier of the first module; First random number.

20. The method according to claim 18, It is characterized in that The method further comprises: The second key is sent to the first module through the second device.

21. The method according to claim 20, It is characterized in that The second key is encrypted and protected by the first device based on the public key of the second device; or, The second key is encrypted and / or integrity protected by the first device based on a shared key between the second device and the first device.

22. The method according to claim 18, It is characterized in that The sending the first key to the first module on the terminal includes: A first message is sent to the first module through a third device, where the first message includes a first parameter, and the first parameter is obtained by encrypting the first key based on the second key.

23. The method according to claim 22, It is characterized in that The first information further includes one or more of the following: Second random number; an identification of the terminal; an identifier of the first module; The second parameter is obtained by performing integrity protection on one or more of the first parameter, a second random number, an identifier of the terminal, and an identifier of the first module based on the second key.

24. The method according to claim 23, It is characterized in that The step of generating a third key based on the first key includes: Generate the third key based on the first key and the second random number; The first key and the third key are stored.

25. The method according to claim 18, It is characterized in that The sending one or more fourth keys to the first module comprises: Second information is sent to the first module through a third device, where the second information includes a third parameter, and the third parameter is obtained by encrypting and / or integrity protecting the one or more fourth keys based on the third key.

26. The method according to claim 25, It is characterized in that The second information further includes one or more of the following: an identification of the terminal; an identifier of the first module; an identifier of the fourth key; A fourth parameter, wherein the fourth parameter is obtained by performing integrity protection on one or more of the third parameter, the identifier of the terminal, the identifier of the first module, and the one or more identifiers of the one or more fourth keys based on the third key.

27. The method according to any one of claims 18 to 26, It is characterized in that The method further comprises: Based on the first key, the third key is updated.

28. The method according to claim 27, It is characterized in that The method further comprises: Sending third information to the first module through a third device, where the third information is used to trigger updating of the third key.

29. The method according to claim 28, It is characterized in that The third information includes one or more of the following: an identification of the terminal; an identifier of the first module; The updated second random number; A fifth parameter, wherein the fifth parameter is obtained by performing integrity protection on one or more of the identifier of the terminal, the identifier of the first module, and the updated second random number based on the updated third key.

30. The method according to claim 29, It is characterized in that The updating of the third key based on the first key includes: Generate an updated third key based on the first key and the updated second random number; The updated third key is stored.

31. A key transmission device, It is characterized in that include: A first receiving unit, configured to receive a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and a first module on a terminal; A first processing unit, configured to generate a third key based on the first key; The second receiving unit is configured to receive one or more fourth keys sent by the first device, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

32. A key transmission device, It is characterized in that include: A first sending unit, configured to send a first key to a first module on a terminal, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module; A second processing unit, configured to generate a third key based on the first key; The second sending unit is configured to send one or more fourth keys to the first module, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

33. A terminal, It is characterized in that It includes a first module; the first module includes a first communication interface and a first processor; wherein, The first processor is configured to: receiving, through the first communication interface, a first key sent by a first device, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module; Based on the first key, generate a third key; One or more fourth keys sent by the first device are received through the first communication interface, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

34. A first device, It is characterized in that include: A second communication interface and a second processor; wherein, The second processor is configured to: Sending a first key to a first module on the terminal through the second communication interface, where the first key is encrypted and / or integrity protected based on a second key, where the second key is a shared key between the first device and the first module; Based on the first key, generate a third key; One or more fourth keys are sent to the first module through the second communication interface, where the one or more fourth keys are encrypted and / or integrity protected based on the third key.

35. A terminal, It is characterized in that comprising a first module; the first module comprising a first processor and a first memory for storing a computer program that can be run 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 17 are executed.

36. A first device, It is 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 18 to 30 are executed.

37. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 17, or implements the steps of the method according to any one of claims 18 to 30.

38. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 17, or implements the steps of the method according to any one of claims 18 to 30.

Citation Information

Patent Citations

  • Data transmission method and device in network conference and storage medium

    CN112737774A

  • Key negotiation method and device, equipment and storage medium

    CN114362927A

  • Data security communication method, system and device and storage medium

    CN115514473A

  • Key management method and device, equipment and storage medium

    CN117439734A

  • Key transmission method and device

    CN117957861A