Key generation and distribution method and system, and computer equipment
By adopting distributed key generation and distribution methods in the power Internet of Things system and using security chips and counters to protect the keys, the problem of insufficient flexibility in key generation and distribution under a centralized architecture is solved, efficient and flexible key management is achieved, and the real-time and robustness of the system is improved.
Patent Information
- Application Number
- CN202411083496.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2044-08-08
AI Technical Summary
In the prior art, key generation and distribution in power Internet of Things systems adopt a centralized architecture, resulting in insufficient flexibility. Especially when facing multiple device manufacturers, the key management platform is under great pressure and it is difficult to achieve efficient and flexible key generation and distribution.
Adopting a distributed architecture, the key generation module is deployed locally by the device manufacturer, remotely authorized through the key management platform, the key generation counter and counter protected keys are used to use the built-in key generation of security chips, limit the number of key generation, realize local batch generation and distribution of sub-keys, and combine the key generation counter and authentication code mechanism to ensure the security and flexibility of key generation.
It reduces the working pressure of the key management platform, improves the real-time and flexibility of the key generation process, enhances the overall working efficiency and robustness of the power Internet of Things system, and reduces the risk of system crash caused by central node failures.
Smart Images

Figure CN119051851B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things information security technology, and in particular to a key generation and distribution method and system. Background Art
[0002] The Power Internet of Things (PoI) integrates the Internet of Things (IoT) with power technologies, enabling interconnection between power equipment and systems and enhancing the intelligence and automation of power systems. While this advancement in the intelligence and automation of power systems is increasing, information security issues are becoming increasingly prominent. Due to the large number of IoT devices and the frequent data transmission, an attack could lead to serious consequences such as grid failure and data leakage. Therefore, strengthening information security and improving the safety and reliability of the Power Internet of Things are crucial for ensuring energy security and promoting sustainable development.
[0003] like Figure 1 As shown in Figure 1, a typical IoT architecture consists of a platform layer, an edge layer, a convergence layer, and a perception layer. The platform layer deploys an intelligent IoT platform, the edge layer deploys an edge computing intelligent gateway, the convergence layer deploys a convergence gateway, and the perception layer deploys various sensors and terminal devices. Because data is transmitted wirelessly between the convergence and perception layers, it is more susceptible to interception and interference by malicious attackers, leading to data leakage or transmission interruption. Therefore, encryption algorithms and authentication mechanisms are needed to enhance security. At the perception layer, due to the large number of devices and the sensitivity to device cost and power consumption, perception layer devices generally use symmetric keys and software algorithm modules to perform communication encryption and decryption. Symmetric master keys are typically installed in the convergence layer's convergence gateway devices, and symmetric subkeys are installed in the perception layer devices. However, the generation and distribution of keys for the massive number of perception layer devices is a challenging task in the production process.
[0004] In order to achieve controllable number of sub-keys, key generation and distribution in the existing technology adopts a centralized architecture. All perception layer device keys in the system are provided through a unified key management platform. The deployment is relatively simple, but its disadvantages are insufficient flexibility and large data communication traffic. When there are many perception layer devices (corresponding to different equipment manufacturers), it will bring greater work pressure to the key management platform. Summary of the Invention
[0005] In order to solve one of the above technical deficiencies, the present invention provides a key generation and distribution method and system.
[0006] One aspect of the present invention provides a key generation and distribution method, comprising:
[0007] The key management platform remotely authorizes the total number of subkeys for key generation modules distributed in various locations;
[0008] The key generation modules in various locations generate multiple subkeys in batches within the total number of authorized subkeys;
[0009] The key generation module in each location distributes the generated multiple subkeys to multiple local terminal devices.
[0010] In an embodiment of the present invention, the key generation module has a built-in security chip, and the security chip is pre-set with a master key;
[0011] The security chip has a built-in key generation counter, which is used to count the number of subkeys generated by the key generation module. The initial count value of the key generation counter is the total number of subkeys authorized by the key management platform.
[0012] In the embodiment of the present invention, the security chip further presets a counter protection key, and the counter protection key is obtained by performing a decentralized process based on the master key of the key management platform.
[0013] In the embodiment of the present invention, the counter protection keys of the security chips built into the key generation modules at various locations are all different.
[0014] In an embodiment of the present invention, the key management platform remotely authorizes the total number of subkeys for key generation modules distributed and deployed at various locations, including:
[0015] The key management platform responds to the authorization request instruction of the key generation module and sends a basic information acquisition instruction to the key generation module;
[0016] After receiving the instruction to obtain basic information, the key generation module generates a random number through the built-in security chip and sends the random number and the serial number of the key generation module to the key management platform;
[0017] After receiving the serial number and random number from the key generation module, the key management platform uses the master key of the key management platform to disperse the serial number to obtain the key generation counter protection key, uses the key generation counter protection key to encrypt the total number of authorized subkeys to obtain ciphertext data, uses the key generation counter protection key to encrypt the ciphertext data and the random number to obtain an authentication code, and sends the ciphertext data and the authentication code to the key generation module;
[0018] After receiving the ciphertext data and the authentication code, the key generation module uses the preset key generation counter protection key through the built-in security chip to perform an encryption operation on the received ciphertext data and the cached random number to obtain the authentication code, and compares the calculated authentication code with the received authentication code for verification. If the two are consistent, the verification is passed; the built-in security chip uses the preset key generation counter protection key to decrypt the received ciphertext data to obtain the total number of authorized subkeys.
[0019] In an embodiment of the present invention, the method further includes:
[0020] During the process of decrypting the received ciphertext data through the security chip, the legitimacy of the ciphertext data is verified by determining whether the decrypted data format is the LV format.
[0021] In the embodiment of the present invention, the key generation module at each location generates multiple subkeys in batches within the total number of authorized subkeys, including:
[0022] The key generation module at each location generates multiple subkeys based on the master key preset in the security chip of the key generation module. Each time a subkey is generated, the count value of the key generation counter is reduced by 1.
[0023] Another aspect of the present invention provides a key generation and distribution system, comprising: a key management platform and key generation modules distributed and deployed in various locations;
[0024] The key management platform is used to remotely authorize the total number of subkeys for key generation modules in various locations;
[0025] The key generation module is used to generate multiple subkeys in batches within the total number of authorized subkeys, and distribute the generated multiple subkeys to multiple local terminal devices.
[0026] In an embodiment of the present invention, the key generation module has a built-in security chip, and the security chip is pre-set with a master key;
[0027] The security chip has a built-in key generation counter, which is used to count the number of subkeys generated by the key generation module. The initial count value of the key generation counter is the total number of subkeys authorized by the key management platform.
[0028] In the embodiment of the present invention, the security chip further presets a counter protection key, and the counter protection key is obtained by performing a decentralized process based on the master key of the key management platform.
[0029] In an embodiment of the present invention, the key management platform remotely authorizes the total number of subkeys for key generation modules at various locations, including:
[0030] The key management platform responds to the authorization request instruction of the key generation module and sends a basic information acquisition instruction to the key generation module;
[0031] After receiving the instruction to obtain basic information, the key generation module generates a random number through the built-in security chip and sends the random number and the serial number of the key generation module to the key management platform;
[0032] After receiving the serial number and random number from the key generation module, the key management platform uses the master key of the key management platform to disperse the serial number to obtain the counter protection key. The counter protection key is used to encrypt the total number of authorized subkeys to obtain ciphertext data. The counter protection key is used to encrypt the ciphertext data and the random number to obtain the authentication code. The ciphertext data and the authentication code are then sent to the key generation module.
[0033] After the key generation module receives the ciphertext data and the authentication code, it uses the preset counter protection key through the built-in security chip to perform an encryption operation on the received ciphertext data and the cached random number to obtain the authentication code, and compares the calculated authentication code with the received authentication code for verification. If the two are consistent, the verification is passed; the built-in security chip uses the preset counter protection key to decrypt the received ciphertext data to obtain the total number of authorized subkeys.
[0034] In the embodiment of the present invention, the key generation module generates multiple subkeys based on the master key preset in the security chip of the key generation module, and the count value of the key generation counter is reduced by 1 each time a subkey is generated.
[0035] In the embodiment of the present invention, the key generation module is deployed in equipment manufacturers in various locations and is communicatively connected to the key management platform via a wired network.
[0036] The present invention adopts a key generation and distribution method with a distributed architecture, which can deploy the key generation module locally at the equipment manufacturer, and cooperate with the authorization mechanism of the key management platform to limit the number of keys generated by the key generation module. The key generation module can produce keys in batches locally and distribute them to each terminal device, reducing the workload of the key management platform, improving the real-time performance and flexibility of the key generation process, and greatly improving the working efficiency of the power Internet of Things system.
[0037] In addition, the present invention controls the number of keys generated by the security chip by building a key generation counter into the security chip of the key generation module, and uses a distributed key generation module to complete the production of batch business keys, further reducing the workload of the key management platform and improving the overall robustness of the key distribution system.
[0038] Other features and advantages of the technical solution of the present invention will be described in detail in the specific implementation section below. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0040] Figure 1 This is a typical IoT architecture diagram;
[0041] Figure 2 is a flow chart of a key generation and distribution method provided by an embodiment of the present invention;
[0042] Figure 3 This is a flow chart of the key management platform providing an embodiment of the present invention authorizing the key generation module;
[0043] Figure 4 Schematic diagram of an application scenario of the key generation and distribution method provided by an embodiment of the present invention;
[0044] Figure 5 It is a block diagram of a key generation and distribution system provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] To make the technical solutions and advantages of the embodiments of the present invention more clearly understood, exemplary embodiments of the present invention are further described in detail below with reference to the accompanying drawings. It should be noted that the embodiments described are only a portion of the embodiments of the present invention, and are not an exhaustive list of all embodiments. It should be noted that the embodiments of the present invention and the features thereof may be combined with each other unless they conflict.
[0046] As introduced in the background technology, key generation and distribution in the existing technology adopts a centralized architecture. The keys of all perception layer devices in the system are provided through a unified key management platform. The deployment is relatively simple, but its disadvantages are insufficient flexibility and large data communication traffic. When there are many perception layer devices (corresponding to different equipment manufacturers), it will bring greater work pressure to the key management platform.
[0047] In response to the above problems, an embodiment of the present invention provides a key generation and distribution method, in which a key generation module is deployed locally at each device manufacturer, and a key management platform remotely authorizes the total number of subkeys for the key generation modules distributed and deployed in various locations. The key generation modules in various locations batch-generate multiple subkeys within the authorized total number of subkeys, and the key generation modules at each location distribute the generated multiple subkeys to multiple local terminal devices. The present invention adopts a key generation and distribution method with a distributed architecture, in which the key generation module can be deployed locally at the device manufacturer, and the authorization mechanism of the key management platform is used to limit the number of keys generated by the key generation module. The key generation module can locally batch-produce keys and distribute them to each terminal device, thereby reducing the workload of the key management platform, improving the real-time performance and flexibility of the key generation process, and significantly improving the work efficiency of the power Internet of Things system.
[0048] Figure 2 This is a flow chart of the key generation and distribution method provided by an embodiment of the present invention. Figure 2 As shown, the key generation and distribution method provided in this embodiment includes the following steps:
[0049] S201, the key management platform remotely authorizes the total number of subkeys for key generation modules distributed in various locations;
[0050] S202, the key generation modules at various locations generate multiple subkeys in batches within the authorized total number of subkeys;
[0051] S203: The key generation module in each location distributes the generated multiple subkeys to multiple local terminal devices.
[0052] Key generation modules deployed in various locations are equipped with a built-in security chip with a pre-installed master key. The master key in the security chip is consistent with the master key of the key management platform. Subkeys are derived from the master key and used for encrypted communication and identity authentication between the converged gateway, sensors, and end devices. Alternatively, the pre-installed master key in the security chip is derived from the master key of the key management platform through decentralized processing.
[0053] The security chip in the key generation module has a built-in key generation counter, which counts the number of subkeys generated by the key generation module. The initial count value of the key generation counter is the total number of subkeys authorized by the key management platform.
[0054] The key generation module's security chip also has a pre-set counter protection key. This counter protection key is derived through decentralized processing based on the key management platform's master key. The counter protection key for the security chips embedded in key generation modules deployed in various locations is unique. Because the key management platform's master key is the same as the security chip's master key, a derivable decentralized relationship exists between the counter protection key and the security chip's master key.
[0055] To properly control the application scope of subkeys, the use of security chips needs to be restricted. Therefore, the present invention designs a key authorization mechanism to improve the key generation module's anti-attack capability. The security chip's key generation counter is set using ciphertext and authentication code instructions. The ciphertext (containing the number of authorized subkeys) is decrypted and verified using the counter protection key. The number of authorized subkeys obtained through decryption is then set as the initial value of the key generation counter.
[0056] like Figure 3 As shown, in the above step S201, the key management platform authorizes the key generation module, which specifically includes the following process steps:
[0057] The key management platform responds to the authorization request instruction of the key generation module and sends a basic information acquisition instruction to the key generation module;
[0058] After receiving the instruction to obtain basic information, the key generation module generates a random number Rand1 through the built-in security chip, and sends the random number Rand1 and the serial number SN1 of the key generation module to the key management platform;
[0059] After receiving the serial number SN1 and random number from the key generation module, the key management platform uses the master key of the key management platform to disperse the serial number SN1 to obtain the counter protection key SubKey1'. The counter protection key SubKey1' is used to encrypt the total number of authorized subkeys to obtain the ciphertext data EnData1. The counter protection key SubKey1' is used to perform an encryption operation on the ciphertext data EnData1 and the random number Rand1 to obtain the authentication code MAC1. The ciphertext data EnData1 and the authentication code MAC1 are then sent to the key generation module.
[0060] After the key generation module receives the ciphertext data EnData1 and the authentication code MAC1, it uses the preset counter protection key SubKey1 through the built-in security chip (using the SM1 algorithm) to perform an encryption operation on the received ciphertext data EnData1 and the cached random number Rand1 to obtain the authentication code MAC1', and compares the calculated authentication code MAC1' with the received authentication code MAC1 to verify their consistency; if the two are consistent, it means that the received data has not been tampered with and the verification is successful; after the authentication code verification is successful, the SM1 algorithm is used, and the security chip uses the preset counter protection key SubKey1 to decrypt the received ciphertext data EnData1 to obtain the total number of authorized sub-keys.
[0061] In the above steps, each new random number generated by the security chip overwrites the old one, so only the current random number is valid. This mechanism protects against replay attacks. After the authentication code is verified, the security chip decrypts the received ciphertext data EnData1 by determining whether the decrypted data format is LV format to verify the legitimacy of the ciphertext data EnData1. The plaintext data corresponding to the ciphertext data is in LV format. For example, the plaintext data is 11223344, which is padded to 000411223344800000000000000000000 before decryption. 0004 represents the data length, and 800000000000000000000 is padding data. This padding data is used to make up 16 bytes to meet the grouping requirements of the SM1 algorithm.
[0062] In step S202, each local key generation module generates multiple subkeys based on the master key pre-installed in the key generation module's security chip. Each time a subkey is generated, the key generation counter decrements by 1. Specifically, the key generation module encrypts the serial number of the sensor or terminal device using the security chip's master key to generate a subkey for the sensor or terminal device.
[0063] In the above method, the security chip of the key generation module uses MAC (Message Authentication Codes) for encryption / decryption operations. The security chip uses the counter protection key to encrypt the ciphertext data and the random number to obtain the authentication code MAC. The authentication code MAC is generated by the SM1(e) operation. The specific operation process is as follows:
[0064] The first step is to take an 8-byte random number plus the negated value of the 8-byte random number as the initial variable, or take a 4-byte random number and complement the 4-byte '00', then add the 4-byte random number and the negated value of the 4-byte '00' as the initial variable;
[0065] The second step is to concatenate the 5-byte command header (CLA, INS, P1, P2, Lc) and the plaintext or ciphertext data in the command data field to form a data block; Lc is the actual length obtained by adding the calculated MAC length (4 bytes) to the data length, and the value of Lc is not less than 4;
[0066] The third step is to divide the data block formed by concatenating the plaintext or ciphertext data into 16-byte data blocks, represented as BLOCK1, BLOCK2 to BLOCKn, and the final data block is 1 to 16 bytes;
[0067] Step 4. If the length of the last data block is 16 bytes, add a complete 16-byte data block '8000000000000000000000000000000000000' after the data block, and go to step 5.
[0068] If the length of the last data block is less than 16 bytes, add the hexadecimal number '80' after it. If the length reaches 16 bytes, go to step 5. Otherwise, continue to add the hexadecimal number '00' after it until the length reaches 16 bytes.
[0069] The fifth step is to divide the 16-byte operation result into 4-byte blocks and perform XOR operation on them, and use the operation result as MAC.
[0070] This embodiment of the present invention integrates a key generation counter into the security chip of the key generation module to control the number of keys generated by the security chip. This distributed key generation module is used to produce batches of service keys, reducing the workload of the key management platform and improving the overall robustness of the key distribution system. Furthermore, the use of a security chip with high security protection capabilities ensures the security of communication keys.
[0071] like Figure 4 As shown in the figure, in a specific application scenario, the key management platform is configured with a key management cipher machine and a key management system. The key generation module can be installed in the key generation server, and the key generation server is deployed in the manufacturer's computer room for producing sensors or terminal devices. The key management cipher machine is used to generate the master key, and the key management system is used to communicate with the key generation server through the public network or offline tools. The workstations in the equipment manufacturer's production workshop communicate with the key generation server through the intranet. The workstations in the equipment manufacturer's production workshop are used to inject the subkeys generated by the key generation module into the sensors or terminal devices. The subkey generation and distribution process is as follows:
[0072] (1) Create a key generation module on the key management platform, and pre-set the master key in the key generation module;
[0073] (2) Deploy the key generation module at the device manufacturer;
[0074] (3) The key management platform remotely authorizes the key generation module to generate a certain number of subkeys, for example, 10,000 subkeys.
[0075] (4) The workstation in the equipment manufacturer's production workshop collects basic information of sensors or terminal devices and submits a key application to the key generation server through the intranet;
[0076] (5) The key generation server generates a subkey locally through the key generation module and feeds it back to the workshop workstation;
[0077] (6) The workshop workstation writes the subkey into the sensor or terminal device to complete the production work. Compared with the existing centralized key management method, the technical solution of the present invention has at least the following advantages:
[0078] 1. Real-time and rapid response are achieved: By producing key data near the device manufacturer, the data transmission time is reduced, and the data traffic from the device to the central node is also reduced, thereby providing faster response time and user experience.
[0079] 2. Improved the overall robustness of the system: By using distributed key generation modules, each key generation module can independently generate keys, reducing the workload of the key management platform, improving the overall robustness of the system, and reducing the risk of the entire system crashing due to central node failure.
[0080] Figure 5 : is a block diagram of a key generation and distribution system provided by an embodiment of the present invention. Figure 5 As shown, the key generation and distribution system provided in this embodiment includes: a key management platform and key generation modules distributedly deployed in various locations (for example, equipment manufacturers in location A, equipment manufacturers in location B, and equipment manufacturers in location N). The key generation modules can be deployed in various device manufacturers, communicating with the key management platform via a wired network and communicating with local workstations or terminal devices via a wireless network. The key management platform remotely authorizes the total number of subkeys for each key generation module in each location. The key generation modules batch-generate multiple subkeys within the authorized total number of subkeys and distribute the generated multiple subkeys to multiple local terminal devices.
[0081] Each key generation module has a built-in security chip with a pre-installed master key. The security chip's master key is consistent with the key management platform's master key. Subkeys are derived from the master key and used for encrypted communication and identity authentication between the converged gateway, sensors, and end devices. Alternatively, the pre-installed master key in the security chip is derived from a decentralized process using the key management platform's master key.
[0082] The security chip in the key generation module has a built-in key generation counter, which counts the number of subkeys generated by the key generation module. The initial count value of the key generation counter is the total number of subkeys authorized by the key management platform.
[0083] The key generation module's security chip also has a pre-set counter protection key. This counter protection key is derived through decentralized processing based on the key management platform's master key. The counter protection key for the security chips embedded in key generation modules deployed in various locations is unique. Because the key management platform's master key is the same as the security chip's master key, a derivable decentralized relationship exists between the counter protection key and the security chip's master key.
[0084] In a specific embodiment, the key generation module can be installed in a key generation server, which is deployed in the manufacturer's computer room for producing sensors or terminal devices. The key management cipher is used to generate the master key, and the key management system is used to communicate with the key generation server via the public network or offline tools. The workstations in the equipment manufacturer's production workshop communicate with the key generation server via the intranet. The workstations in the equipment manufacturer's production workshop inject the subkeys generated by the key generation module into the sensor or terminal device. After the key generation module is deployed, the equipment manufacturer submits an application to the key management platform when needed, indicating the number of keys to be applied for. After approval by the platform administrator, a command to set the key generation counter is generated and remotely sent to the key generation module for authorization. In this way, the key generation module's anti-attack capability is improved.
[0085] In a specific example, the key management platform authorizes the key generation module, including the following process steps:
[0086] The key management platform responds to the authorization request instruction of the key generation module and sends a basic information acquisition instruction to the key generation module;
[0087] After receiving the instruction to obtain basic information, the key generation module generates a random number Rand1 through the built-in security chip, and sends the random number Rand1 and the serial number SN1 of the key generation module to the key management platform;
[0088] After receiving the serial number SN1 and random number from the key generation module, the key management platform uses the master key of the key management platform to disperse the serial number SN1 to obtain the counter protection key SubKey1'. The counter protection key SubKey1' is used to encrypt the total number of authorized subkeys to obtain the ciphertext data EnData1. The counter protection key SubKey1' is used to perform an encryption operation on the ciphertext data EnData1 and the random number Rand1 to obtain the authentication code MAC1. The ciphertext data EnData1 and the authentication code MAC1 are then sent to the key generation module.
[0089] After the key generation module receives the ciphertext data EnData1 and the authentication code MAC1, it uses the preset counter protection key SubKey1 through the built-in security chip (using the SM1 algorithm) to perform an encryption operation on the received ciphertext data EnData1 and the cached random number Rand1 to obtain the authentication code MAC1', and compares the calculated authentication code MAC1' with the received authentication code MAC1 to verify their consistency; if the two are consistent, it means that the received data has not been tampered with and the verification is successful; after the authentication code verification is successful, the SM1 algorithm is used, and the security chip uses the preset counter protection key SubKey1 to decrypt the received ciphertext data EnData1 to obtain the total number of authorized sub-keys.
[0090] In a specific embodiment, the key generation module at each location generates multiple subkeys based on the master key preset in the security chip of the key generation module. Each time a subkey is generated, the count value of the key generation counter is reduced by 1.
[0091] An embodiment of the present invention further provides a computer device, comprising: a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the computer program to implement the above-mentioned key generation and distribution method.
[0092] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the above-mentioned key generation and distribution method when executed by a processor.
[0093] An embodiment of the present invention further provides a machine-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above-mentioned key generation and distribution method when executed by a processor.
[0094] It will be understood by those skilled in the art that the embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention may be implemented in various computer languages, for example, the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0095] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0096] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0097] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.
[0098] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.
[0099] Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if such changes and modifications fall within the scope of the claims and their equivalents, the present invention is intended to include such changes and modifications.
Claims
1. A key generation and distribution method, characterized in that: include: The key management platform remotely authorizes the total number of subkeys for the key generation modules distributed and deployed at various locations, including: after receiving the serial number and random number from the key generation module, the key management platform uses the master key of the key management platform to perform decentralized processing on the serial number to obtain a key generation counter protection key; uses the key generation counter protection key to encrypt the total number of authorized subkeys to obtain ciphertext data; uses the key generation counter protection key to perform encryption operation on the ciphertext data and the random number to obtain an authentication code; and sends the ciphertext data and the authentication code to the key generation module; After receiving the ciphertext data and the authentication code, the key generation module uses the preset counter protection key through the built-in security chip to perform an encryption operation on the received ciphertext data and the cached random number to obtain the authentication code. The authentication code obtained by the operation is compared with the received authentication code for verification. After the verification is passed, the built-in security chip uses the preset key generation counter protection key to decrypt the received ciphertext data to obtain the total number of authorized subkeys. The key generation modules in various locations generate multiple subkeys in batches within the total number of authorized subkeys; The key generation module in each location distributes the generated multiple subkeys to multiple local terminal devices.
2. The key generation and distribution method according to claim 1, characterized in that: The key generation module has a built-in security chip, and the security chip is pre-installed with a master key; The security chip has a built-in key generation counter, which is used to count the number of subkeys generated by the key generation module. The initial count value of the key generation counter is the total number of subkeys authorized by the key management platform.
3. The key generation and distribution method according to claim 2, characterized in that: The security chip also presets a counter protection key, and the counter protection key is obtained by performing a decentralized process based on a master key of a key management platform.
4. The key generation and distribution method according to claim 3, characterized in that: The counter protection key of the security chip built into the key generation module in each location is different.
5. The key generation and distribution method according to claim 3, characterized in that: The key management platform responds to the authorization request instruction of the key generation module and sends a basic information acquisition instruction to the key generation module; After receiving the instruction to obtain basic information, the key generation module generates a random number through a built-in security chip, and sends the random number and the serial number of the key generation module to the key management platform.
6. The key generation and distribution method according to claim 5, characterized in that: The method further comprises: During the process of decrypting the received ciphertext data through the security chip, the legitimacy of the ciphertext data is verified by determining whether the decrypted data format is the LV format.
7. The key generation and distribution method according to claim 2, characterized in that: The key generation modules in various locations generate multiple subkeys in batches within the authorized total number of subkeys, including: The key generation module at each location generates a plurality of subkeys based on the master key preset in the security chip of the key generation module. Each time a subkey is generated, the count value of the key generation counter is reduced by 1.
8. A key generation and distribution system, characterized in that: include: Key management platform and key generation modules distributed in various locations; The key management platform is used to remotely authorize the total number of subkeys for key generation modules at various locations, including: after receiving the serial number and random number from the key generation module, the key management platform uses the master key of the key management platform to disperse the serial number to obtain a counter protection key, encrypts the total number of authorized subkeys using the counter protection key to obtain ciphertext data, performs encryption calculation on the ciphertext data and the random number using the counter protection key to obtain an authentication code, and sends the ciphertext data and the authentication code to the key generation module; After receiving the ciphertext data and the authentication code, the key generation module uses the preset counter protection key to perform an encryption operation on the received ciphertext data and the cached random number through the built-in security chip to obtain the authentication code, and compares the calculated authentication code with the received authentication code for verification. If the two are consistent, the verification is passed; the built-in security chip uses the preset counter protection key to decrypt the received ciphertext data to obtain the total number of authorized subkeys; The key generation module is used to generate multiple subkeys in batches within the total number of authorized subkeys, and distribute the generated multiple subkeys to multiple local terminal devices.
9. The key generation and distribution system according to claim 8, characterized in that: The key generation module has a built-in security chip, and the security chip is pre-installed with a master key; The security chip has a built-in key generation counter, which is used to count the number of subkeys generated by the key generation module. The initial count value of the key generation counter is the total number of subkeys authorized by the key management platform.
10. The key generation and distribution system according to claim 9, characterized in that: The security chip also presets a counter protection key, and the counter protection key is obtained by performing a decentralized process based on a master key of a key management platform.
11. The key generation and distribution system according to claim 10, characterized in that: The key management platform responds to the authorization request instruction of the key generation module and sends a basic information acquisition instruction to the key generation module; After receiving the instruction to obtain basic information, the key generation module generates a random number through a built-in security chip, and sends the random number and the serial number of the key generation module to the key management platform.
12. The key generation and distribution system according to claim 9, characterized in that: The key generation module generates a plurality of subkeys based on a master key preset in the security chip of the key generation module. Each time a subkey is generated, the count value of the key generation counter is reduced by 1.
13. The key generation and distribution system according to claim 8, characterized in that: The key generation module is deployed in equipment manufacturers in various places and is connected to the key management platform through a wired network.
14. A computer device, characterized in that: include: a memory storing a computer program; A processor, configured to execute the computer program to implement the key generation and distribution method according to any one of claims 1 to 7.
15. A computer program product comprising a computer program, characterized in that When executed by a processor, the computer program implements the key generation and distribution method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for distributing quantum keys to terminals in transformer area
CN110138559A