A system and method for supporting batch synchronization of cloud cryptographic machine cluster keys
By designing a system that supports batch synchronization of cluster keys for cloud cipher machines, using multi-level management and broadcast-subscribe communication mode, the problem of inefficient key synchronization in the existing technology is solved, and efficient key synchronization and cluster high availability is achieved.
Patent Information
- Application Number
- CN202411884187.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-12-20
AI Technical Summary
Existing cloud cipher cluster key synchronization technology does not support batch key synchronization, resulting in inefficient key synchronization.
A system that supports batch synchronization of keys for cloud cipher machine clusters is designed. Through multi-level management of primary cloud cipher machine clusters and secondary cloud cipher machine clusters, the broadcast-subscribe communication mode is adopted to realize that the key initiates synchronization requests from the master node, synchronizes layer by layer to slave nodes, and generates synchronization results through response code ACK to adjust synchronization parameters.
It realizes batch key synchronization of cloud password machine clusters, improves key synchronization efficiency, and supports cluster high availability scenarios, such as multi-life across computer rooms and disaster recovery in off-site areas.
Smart Images

Figure CN119383009B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and more specifically to a system and method for supporting batch synchronization of cloud cryptographic machine cluster keys. Background Art
[0002] Cloud cryptographic machine is a cryptographic service device based on cloud computing technology. It provides users with a flexible, efficient and secure cryptographic service solution. It not only promotes the modernization of cryptographic services, but also provides strong information security protection for all walks of life. Building a cloud cryptographic machine cluster is an effective technical means to improve the availability and reliability of cryptographic services. Key synchronization is the basic condition for building a cloud cryptographic machine cluster. However, the existing cluster key synchronization technology does not support batch key synchronization.
[0003] Therefore, how to achieve batch key synchronization of cloud cryptographic machine clusters and improve the key synchronization efficiency of the cluster is an urgent problem that technical personnel in this field need to solve. Summary of the invention
[0004] In view of this, the present invention provides a system and method that supports batch synchronization of cloud cryptographic machine cluster keys, supports batch key synchronization, improves the efficiency of key synchronization, and also supports multi-level management of clusters, which can realize high-availability cluster scenarios such as multi-active across computer rooms and disaster recovery in different locations.
[0005] In order to achieve the above object, the present invention adopts the following technical solution:
[0006] A system supporting batch synchronization of cloud cryptographic machine cluster keys includes a first-level cloud cryptographic machine cluster and several second-level cloud cryptographic machine clusters, wherein the first-level cloud cryptographic machine cluster and the second-level cloud cryptographic machine cluster both include a master-node cloud cryptographic machine and several slave-node cloud cryptographic machines; the master-node cloud cryptographic machine of the first-level cloud cryptographic machine cluster initiates a key synchronization request, and synchronizes with all slave-node cloud cryptographic machine hosts of the first-level cloud cryptographic machine cluster and the master-node cloud cryptographic machine of the second-level cloud cryptographic machine cluster; the master-node cloud cryptographic machine of the second-level cloud cryptographic machine cluster synchronizes with all slave-node cloud cryptographic machine hosts of the second-level cloud cryptographic machine cluster; all slave-node cloud cryptographic machine hosts feed back a response code ACK to the master-node cloud cryptographic machine of the same level, and the master-node cloud cryptographic machine generates a synchronization result according to the response code ACK and adjusts the synchronization parameters.
[0007] Preferably, the master node cloud cryptographic machine includes a cloud cryptographic machine key management system module, a batch key synchronization algorithm execution module, a master node total control service module, a master node key security storage module, a master node message packaging module, a master node message unpacking module, a message broadcast module and a message response aggregation module; the master node cloud cryptographic machine of the secondary cloud cryptographic machine cluster also includes a message proxy module;
[0008] The cloud cryptographic machine key management system module generates a key synchronization request and transmits it to the batch key synchronization algorithm execution module, and the batch key synchronization algorithm execution module inserts the key in the key synchronization request into the queue of keys to be synchronized;
[0009] The batch key synchronization algorithm execution module transmits the key to the master node key security storage module for storage, and sends the key to the master node message packaging module according to the sending window. The master node message packaging module packages the key into a key synchronization message and transmits it to the message broadcast module.
[0010] The message broadcast module broadcasts the key synchronization message to all slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster and the message proxy module of the master node cloud cryptographic machine in the second-level cloud cryptographic machine cluster;
[0011] The message proxy module of the master node cloud cipher machine in the secondary cloud cipher machine cluster transmits the key synchronization message to the master node message unpacking module, and the key obtained after parsing is stored in the master node key security storage module through the master node general control service module, and the key synchronization message is transmitted to the message broadcast module and broadcasted to all slave node cloud cipher machines in the secondary cloud cipher machine cluster;
[0012] After receiving the key synchronization message and completing the key synchronization, all slave node cloud cryptographic machines feedback the response code ACK to the message response aggregation module of the master node cloud cryptographic machine at the same level;
[0013] The message response aggregation module receives the response code ACK and generates a synchronization result and transmits it to the master node general control service module;
[0014] The master node general control service module adjusts the sending window for the batch key synchronization algorithm execution module to transmit the key according to the synchronization result.
[0015] Preferably, the message response aggregation module generates a synchronization result based on the number, time and content of the response code ACK; the response code ACK is the key ID of the last key synchronized by the slave node cloud cryptographic machine. If the message response aggregation module does not receive a set number of response codes ACK within a preset time threshold, the synchronization is judged to have failed; if the message response aggregation module receives the response codes ACK from all slave node cloud cryptographic machines within the preset time threshold, the content of the response code ACK is judged. If all response codes ACK are the key ID of the last key, the synchronization is successful, otherwise the synchronization fails.
[0016] Preferably, the master node total control service module adjusts the sending window of the next synchronization key according to the synchronization result through the batch key synchronization algorithm execution module; if the synchronization is successful, the sending window is expanded until the preset window upper limit is reached; if the synchronization fails, the sending window is reduced to the window lower limit.
[0017] Preferably, when the number of synchronization failures reaches a set threshold, the master node general control service module generates an alarm message through the batch key synchronization algorithm execution module.
[0018] Preferably, the slave node cloud cryptographic machine includes a message receiving module, a slave node message unpacking module, a message response module, a slave node message packaging module, a slave node master control service module and a slave node key security storage module; the message receiving module receives the key synchronization message of the master node cloud cryptographic machine, and after the key is parsed out by the slave node message unpacking module, it is stored in the slave node key security storage module through the slave node master control service module, and after the key storage is completed, the slave node master control service module completes the key synchronization, and the slave node master control service module generates a response code ACK, the response code ACK is sent to the slave node message packaging module for packaging, and the packaged response code ACK is sent to the message response aggregation module of the master node cloud cryptographic machine of the same level through the message response module.
[0019] Preferably, the master node cloud cryptographic machine also includes a cloud cryptographic machine cluster management module, a slave node registration management module and a database; the master node cloud cryptographic machine adds a slave node cloud cryptographic machine through the cloud cryptographic machine cluster management module, and the cloud cryptographic machine cluster management module calls the slave node registration management module through the master node general control service module to verify the validity of the slave node data of the newly added slave node cloud cryptographic machine. After the verification, the slave node data is recorded in the database, and if the verification fails, a prompt message is generated and the operation of adding the slave node cloud cryptographic machine is terminated; the slave node data includes the slave node cloud cryptographic machine IP and key consistency status information, and the verification of the validity of the slave node data includes but is not limited to whether the slave node IP is a valid IP, whether the network to the slave node is connected, etc.
[0020] Preferably, the system also includes a client business system, the master node cloud cryptographic machine also includes a master node cryptographic service module, and the slave node cloud cryptographic machine also includes a slave node cryptographic service module; the client business system calls the master node cryptographic service module or the slave node cryptographic service module in a network communication manner by calling the cloud cryptographic machine interface library SDK to complete the cryptographic operation. The master node cryptographic service module and the slave node cryptographic service module are both used to provide cryptographic operations to the outside in a network service manner. The master node cryptographic service module uses the key in the master node key security storage module, and the slave node cryptographic service module uses the key in the slave node key security storage module to provide cryptographic operation services to the client business system.
[0021] Preferably, the cloud cryptographic machine interface library SDK includes an interface API, a cryptographic machine communication module, a timed detection task module, and a cloud cryptographic machine key consistency status check tracking table; the interface API encapsulates a variety of cryptographic operations to form an interface function, which is convenient for the client business system to directly call the interface function, and the name, parameter type and number of the interface function comply with the national cryptographic interface definition specification.
[0022] Preferably, the process of the client business system retrieving the key from the cloud cryptographic machine cluster to perform cryptographic operations is as follows:
[0023] The client business system modifies the configuration file and configures the IP address of the master node cloud cryptographic machine in the configuration file;
[0024] The cloud cryptography machine interface library SDK receives the configuration file, the scheduled detection task module detects the configuration file, generates an encryption call request according to the master node cloud cryptography machine IP, and regularly calls the master node general control service module of the corresponding master node cloud cryptography machine, obtains the slave node data of all slave node cloud cryptography machines from the database and updates it to the cloud cryptography machine key consistency status check tracking table; the slave node data includes the slave node cloud cryptography machine IP and key consistency status information;
[0025] The cryptographic machine communication module searches for the slave node cloud cryptographic machine whose key consistency status is true in the cloud cryptographic machine key consistency status check tracking table, and sends an encryption call request to it;
[0026] The slave node cryptographic service module of the slave node cloud cryptographic machine retrieves the key and feeds it back to the cryptographic machine communication module. The client business system retrieves the interface function from the interface API and performs cryptographic operations based on the key.
[0027] The technical effect of the above technical solution is: calling the slave nodes with synchronization abnormalities to eliminate them, thereby realizing the business isolation of the slave nodes with synchronization abnormalities and preventing the client-type business system from calling the slave nodes with inconsistent keys. If no check is performed, the client application wants to use a certain key for encryption operations, and the key on the child node has not been synchronized, the operation will report an error due to the non-existence of the key.
[0028] Preferably, if the cipher machine communication module finds that there are multiple slave node cloud cipher machines with a key consistency status of true, a slave node cloud cipher machine is selected by polling or random method.
[0029] Preferably, the master node key security storage module and the slave node key security storage module are both used to store keys, and the stored keys are the same, and their actual forms include but are not limited to: key cards, encrypted disks, encrypted databases, etc.
[0030] Preferably, the cryptographic operations include AES encryption, AES decryption, RSA signature, RSA signature verification and other operations.
[0031] A method for supporting batch synchronization of cloud cryptographic machine cluster keys, the specific steps comprising:
[0032] Step 1: The master node cloud cryptographic machine of the first-level cloud cryptographic machine cluster generates a key;
[0033] Step 2: The master node cloud cryptographic machine stores the key, packages it into a key synchronization message, and then broadcasts it to all slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster and the master node cloud cryptographic machine in the second-level cloud cryptographic machine cluster;
[0034] Step 3: All slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster parse the key from the key synchronization message and store it, and feedback the response code ACK to the master node cloud cryptographic machine in the first-level cloud cryptographic machine cluster;
[0035] The master node cloud cryptography machine in the secondary cloud cryptography machine cluster broadcasts the key synchronization message to all slave node cloud cryptography machines in the secondary cloud cryptography machine cluster, and stores the key after parsing it; all slave node cloud cryptography machines in the secondary cloud cryptography machine cluster parse the key from the key synchronization message and store it, and feedback the response code ACK to the master node cloud cryptography machine in the secondary cloud cryptography machine cluster;
[0036] Step 4: The master node cloud cryptographic machine receives the response code ACK to generate a synchronization result, adjusts the synchronization parameters during packaging according to the synchronization result, and returns to step 2.
[0037] It can be seen from the above technical solution that, compared with the prior art, the present invention discloses a system and method that supports batch synchronization of cloud cryptographic machine cluster keys, which can effectively shorten the key synchronization time of the cluster and improve the key synchronization efficiency. At the same time, it proposes the use of a broadcast-subscription communication mode, so that the key synchronization time will not increase linearly with the increase in cluster size, thereby improving the scalability of the cluster; based on a one-master and multiple-slave mode, the key synchronization is initiated by the master node, and the slave node receives the key synchronization request of the master node and updates the key of this node. It supports a two-level cluster deployment mode to support multi-level deployment and management in different locations, and realize high availability of the cluster. It can realize high-availability scenarios such as multi-active clusters across computer rooms and disaster recovery in different locations. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0039] Figure 1 A schematic diagram of the system structure supporting batch synchronization of cloud cryptographic machine cluster keys provided by the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] The embodiment of the present invention discloses a system supporting batch synchronization of cloud cryptographic machine cluster keys, which is applied to relevant cryptographic devices in the field of information security technology, including but not limited to cryptographic machines, encryption machines, SSL VPN gateways, IPSecVPN gateways, signature verification servers, financial data cryptographic machines, etc. It includes a first-level cloud cryptographic machine cluster and a second-level cloud cryptographic machine cluster, both of which include a master node cloud cryptographic machine and a number of slave node cloud cryptographic machines; the master node cloud cryptographic machine of the first-level cloud cryptographic machine cluster initiates a key synchronization request, and synchronizes with all slave node cloud cryptographic machine hosts of the first-level cloud cryptographic machine cluster and the master node cloud cryptographic machine of the second-level cloud cryptographic machine cluster; the master node cloud cryptographic machine of the second-level cloud cryptographic machine cluster synchronizes with all slave node cloud cryptographic machine hosts of the second-level cloud cryptographic machine cluster; all slave node cloud cryptographic machine hosts feedback a response code ACK to the master node cloud cryptographic machine of the same level, and the master node cloud cryptographic machine generates a synchronization result according to the response code ACK and adjusts the synchronization parameters.
[0042] Furthermore, the master node cloud cryptographic machine includes a cloud cryptographic machine key management system module, a batch key synchronization algorithm execution module, a master node total control service module, a master node key security storage module, a master node message packaging module, a master node message unpacking module, a message broadcast module and a message response aggregation module; the master node cloud cryptographic machine of the secondary cloud cryptographic machine cluster also includes a message proxy module;
[0043] The administrator operates the cloud cryptographic machine key management system module to generate a key synchronization request and transmits it to the batch key synchronization algorithm execution module. The batch key synchronization algorithm execution module inserts the key in the key synchronization request into the queue of keys to be synchronized.
[0044] The batch key synchronization algorithm execution module transmits the key to the master node key security storage module for storage, and sends the key to the master node message packaging module according to the sending window. The master node message packaging module packages the key into a key synchronization message and transmits it to the message broadcast module.
[0045] The message broadcast module broadcasts the key synchronization message to all slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster and the message proxy module of the master node cloud cryptographic machine in the second-level cloud cryptographic machine cluster;
[0046] The message proxy module of the master node cloud cipher machine in the secondary cloud cipher machine cluster parses the key synchronization message through the master node message unpacking module, stores the parsed key in the master node key security storage module through the master node general control service module, and transmits the key synchronization message to the message broadcast module to broadcast to all slave node cloud cipher machines in the secondary cloud cipher machine cluster;
[0047] After receiving the key synchronization message and completing the key synchronization, all slave node cloud cryptographic machines feedback the response code ACK to the message response aggregation module of the master node cloud cryptographic machine at the same level;
[0048] The message response aggregation module receives the response code ACK and generates a synchronization result and transmits it to the master node general control service module;
[0049] The master node general control service module adjusts the sending window for the batch key synchronization algorithm execution module to transmit the key according to the synchronization result.
[0050] Furthermore, the message response aggregation module generates a synchronization result based on the number, time and content of the response code ACK; the response code ACK is the key ID of the last key synchronized by the slave node cloud cryptographic machine. If the message response aggregation module does not receive the set number of response codes ACK within the preset time threshold, the synchronization is judged to have failed; if the message response aggregation module receives the response codes ACK from all slave node cloud cryptographic machines within the preset time threshold, the content of the response code ACK is judged. If all response codes ACK are the key ID of the last key, the synchronization is successful, otherwise the synchronization fails.
[0051] Furthermore, the master node general control service module adjusts the sending window of the next synchronization key according to the synchronization result through the batch key synchronization algorithm execution module; if the synchronization is successful, the sending window is expanded until the preset window upper limit is reached; if the synchronization fails, the sending window is reduced to the window lower limit.
[0052] Furthermore, when the number of synchronization failures reaches a set threshold, the master node general control service module generates an alarm message through the batch key synchronization algorithm execution module.
[0053] Furthermore, the slave node cloud cryptographic machine includes a message receiving module, a slave node message unpacking module, a message response module, a slave node message packaging module, a slave node general control service module and a slave node key security storage module; the message receiving module receives the key synchronization message of the master node cloud cryptographic machine, and the key is parsed out by the slave node message unpacking module, and the key is stored in the slave node key security storage module by the slave node general control service module to realize the synchronization of the key on the slave node cloud cryptographic machine, and the slave node general control service module generates a response code ACK after completing the key synchronization, and the response code ACK is packaged by the slave node message packaging module and sent by the message response module to the message response aggregation module of the master node cloud cryptographic machine of the same level.
[0054] Furthermore, the master node cloud cryptographic machine also includes a cloud cryptographic machine cluster management module, a slave node registration management module and a database; the master node cloud cryptographic machine adds a slave node cloud cryptographic machine through the cloud cryptographic machine cluster management module, and the cloud cryptographic machine cluster management module calls the slave node registration management module through the master node general control service module to verify the validity of the slave node data of the newly added slave node cloud cryptographic machine. After the verification, the slave node data is recorded in the database. If the verification fails, a prompt message is generated and the operation of adding the slave node cloud cryptographic machine is terminated; the slave node data includes the slave node cloud cryptographic machine IP and key consistency status information. The verification of the validity of the slave node data includes but is not limited to whether the slave node IP is a valid IP, whether the network to the slave node is connected, etc.
[0055] Furthermore, the system also includes a client business system, the master node cloud cryptographic machine also includes a master node cryptographic service module, and the slave node cloud cryptographic machine also includes a slave node cryptographic service module; the client business system calls the master node cryptographic service module or the slave node cryptographic service module in a network communication mode by calling the cloud cryptographic machine interface library SDK to complete the cryptographic operation. Both the master node cryptographic service module and the slave node cryptographic service module are used to provide cryptographic operations to the outside in a network service mode.
[0056] Furthermore, the cloud cryptographic machine interface library SDK includes an interface API, a cryptographic machine communication module, a timed detection task module, and a cloud cryptographic machine key consistency status check tracking table; the interface API encapsulates a variety of cryptographic operations to form an interface function, which is convenient for the client business system to directly call the interface function. The name, parameter type and number of the interface function comply with the national cryptographic interface definition specification.
[0057] Furthermore, the process of the client business system retrieving the key from the cloud cryptographic machine cluster for cryptographic operations is as follows;
[0058] The client business system modifies the configuration file and configures the IP address of the master node cloud cryptographic machine in the configuration file;
[0059] The cloud cryptography machine interface library SDK receives the configuration file, the scheduled detection task module detects the configuration file, generates an encryption call request according to the master node cloud cryptography machine IP, and regularly calls the master node general control service module of the corresponding master node cloud cryptography machine, obtains the slave node data of all slave node cloud cryptography machines from the database and updates it to the cloud cryptography machine key consistency status check tracking table; the slave node data includes the slave node cloud cryptography machine IP and key consistency status information;
[0060] The cryptographic machine communication module searches for the slave node cloud cryptographic machine whose key consistency status is true in the cloud cryptographic machine key consistency status check tracking table, and sends an encryption call request to it;
[0061] The slave node cryptographic service module of the slave node cloud cryptographic machine retrieves the key and feeds it back to the cryptographic machine communication module. The client business system retrieves the interface function from the interface API and performs cryptographic operations based on the key. Based on the above system structure and the data transmission relationship between the structures, Figure 1 shown.
[0062] Furthermore, if the cipher machine communication module finds that there are multiple slave node cloud cipher machines with a key consistency status of true, a slave node cloud cipher machine is selected by polling or random method.
[0063] Furthermore, the master node key security storage module and the slave node key security storage module are both used to store keys, and the stored keys are the same, and their actual forms include but are not limited to: key cards, encrypted disks, encrypted databases, etc.
[0064] Furthermore, cryptographic operations include AES encryption, AES decryption, RSA signature, RSA signature verification and other operations.
[0065] Furthermore, slave key synchronization failures include:
[0066] (1) The slave node cloud cryptographic machine only synchronizes part of the key or the master node cloud cryptographic machine does not receive the response code ACK from one or more slave node cloud cryptographic machines;
[0067] (2) The response code ACK returned by the cloud cryptographic machine of the slave node is different from the response code ACK of the cloud cryptographic machines of other slave nodes, and is different from the key synchronization request id corresponding to the key synchronization request sent;
[0068] If the key synchronization of a slave node cloud cryptographic machine fails, the sending window size is adjusted to 1, and the keys to be synchronized are continuously synchronized until the keys of all slave node cloud cryptographic machines are successfully synchronized, that is, the response code ACK of all slave node cloud cryptographic machines is the same and the same as the key synchronization request id sent. In addition, the slave node cloud cryptographic machine that receives a repeated key synchronization request can ignore the request because the synchronization has been completed before and there is no need to repeat the key synchronization, but it is necessary to return ACK to the master node cloud cryptographic machine.
[0069] Furthermore, if synchronization is successful, the next round of sending window The size is equal to the sending window of this round The size is multiplied by 2, that is, it increases exponentially until the maximum threshold of 1024 is reached;
[0070] ;
[0071] After reaching the maximum threshold, if the cluster key continues to be synchronized successfully, the sending window size is kept at the maximum threshold of 1024 for key batch synchronization.
[0072] On the other hand, a method for supporting batch synchronization of cloud cryptographic machine cluster keys includes the following specific steps:
[0073] S1: The cloud cryptographic machine key management system module of the master node cloud cryptographic machine generates at least one key synchronization request and submits it to the queue of the batch key synchronization algorithm execution module;
[0074] S2: The batch key synchronization algorithm execution module submits the key in the key synchronization request to the master node key security storage module, inserts the key into the queue of keys to be synchronized, sends the key to the message packaging module for packaging according to the current sending window, and packages it into a key synchronization message to be transmitted to the message broadcast module; because the master node cloud cryptographic machine, as a node in the cluster, also needs key synchronization, the master node key security storage module implements the key synchronization of the master node cloud cryptographic machine by storing the key;
[0075] S3: The message broadcast module broadcasts the key synchronization message to all slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster and the message proxy module of the master node cloud cryptographic machine in the second-level cloud cryptographic machine cluster;
[0076] S4: After receiving the key synchronization message, the message receiving module of the slave node cloud cryptographic machine in the first-level cloud cryptographic machine cluster parses the key through the message unpacking module, and sends the key to the slave node master control service module. The slave node master control service module stores the key in the slave node key security storage module and returns a response code ACK to the master node cloud cryptographic machine in the first-level cloud cryptographic machine cluster;
[0077] The message proxy module of the master node cloud cryptographic machine in the secondary cloud cryptographic machine cluster transmits the key synchronization message to the message broadcast module and broadcasts it to all slave node cloud cryptographic machines in the secondary cloud cryptographic machine cluster, and stores the key synchronization message in the master node key security storage module after being parsed by the message unpacking module; the slave node general control service module of all slave node cloud cryptographic machines in the secondary cloud cryptographic machine cluster receives the key synchronization message and parses the key and stores it in the slave node key security storage module, and returns a response code ACK to the master node cloud cryptographic machine in the secondary cloud cryptographic machine cluster;
[0078] S5: The message response aggregation module receives the response code ACK and generates a synchronization result according to the number, time and content of the response code ACK;
[0079] S6: The master node general control service module adjusts the sending window through the batch key synchronization algorithm execution module according to the synchronization result and returns to S2; if the synchronization is successful, the sending window is expanded until the preset window upper limit is reached; if the synchronization fails, the sending window is reduced to the window lower limit.
[0080] On the other hand, in a specific embodiment, the batch key synchronization method execution process is as follows: Figure 1 As shown, the following steps are included:
[0081] S1: The operator operates the cloud cryptographic machine key management system module of the master node cloud cryptographic machine to generate two keys. The keys are submitted to the batch key synchronization algorithm execution module. The batch key synchronization algorithm execution module puts the keys into the queue in sequence, such as Figure 1 As shown, there are 6 keys in the queue, and 2 new keys are added to the queue, making a total of 8 keys;
[0082] S2: The batch key synchronization algorithm execution module submits the key of the sending window to the message packaging module and the key security storage module of the cloud cryptographic machine of this node; the message packaging module adds a key ID prefix to each key and splices it into a key synchronization message, which is submitted to the message broadcast module; the current sending window size of the batch key synchronization algorithm execution module is 4, and there are 4 keys to be synchronized in the sending window, with key IDs from n+1 to n+4;
[0083] S3: The message broadcast module broadcasts the key synchronization message to all slave node cloud cryptographic machines in the cluster. After the slave node master control service module receives the broadcast message, the message unpacking module unpacks the key synchronization message to parse the above 4 keys. The slave node cloud cryptographic machine stores the parsed keys in the slave node key security storage module of this node to complete batch key synchronization. In addition, the slave node cloud cryptographic machine needs to return a response code ACK to the master node cloud cryptographic machine, and generate a synchronization result according to the number, time and content of the returned response code ACK. If the message response aggregation module does not receive the set number of response codes ACK within the preset time threshold, the synchronization is judged to have failed. If the message response aggregation module receives the response code ACK from all slave node cloud cryptographic machines within the preset time threshold, the content of the response code ACK is judged. The response code ACK is the key ID of the last key synchronized by the slave node cloud cryptographic machine. If all response codes ACK are the key ID of the last key, the synchronization is successful, otherwise the synchronization fails. If the number of synchronization failures reaches the set threshold, the batch key synchronization algorithm execution module generates an alarm message to notify the administrator to manually intervene.
[0084] like Figure 1 As shown, the response code ACK is n+4, and the message response aggregation module of the master node cloud cryptographic machine waits for the synchronization result response code ACK of all slave node cloud cryptographic machines, and judges the synchronization result. If they are all n+4, the current round of batch key synchronization is successful, otherwise the synchronization fails;
[0085] S4: The master node general control service module adjusts the sending window through the batch key synchronization algorithm execution module according to the synchronization result and returns to S2; if the synchronization is successful, the sending window is enlarged until it reaches the preset window upper limit; if the synchronization fails, the sending window is reduced to the window lower limit;
[0086] like Figure 1 As shown, the master node general control service module can adjust the sending window size to 4*2, that is, the size is doubled, and 8 keys can be synchronized next time. The batch key synchronization algorithm execution module moves the sending window queue tail pointer to point to key n+5, and moves the sending window head pointer to point to key n+7. Although the window size is 8, there are only 3 keys in the queue, so only 3 keys can be synchronized in batches. If all 3 keys are synchronized successfully in this round, the sending window size will double again until the upper limit MAX. The upper limit MAX can be set to 1024, which can be determined according to the actual situation. It is not a fixed value. The initial size of the window is 1.
[0087] After the master node cloud cipher machine key initiates synchronization, if a slave node cloud cipher machine returns a response code ACK value of n+2, that is, only 2 keys are synchronized for some reason, the synchronization fails. The batch key synchronization algorithm execution module needs to set the window size to 1, send the window tail and head pointer to point to key n+3, and synchronize key n+3 to all nodes in the next round until all nodes successfully synchronize key n+3. The slave node that successfully synchronizes key n+3 can ignore the synchronization message after receiving it.
[0088] If the master node cloud cipher machine does not receive a response code from one or more slave nodes within the scheduled time (1 minute), the algorithm execution module also needs to set the window size to 1, move the head pointer back to the position of the tail of the team, and re-broadcast the key between the head and tail of the synchronization team. In fact, there is only one key between the head and tail of the team at this time.
[0089] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0090] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A system supporting batch synchronization of cloud cryptographic machine cluster keys, characterized in that: It includes a first-level cloud cryptographic machine cluster and a second-level cloud cryptographic machine cluster. The first-level cloud cryptographic machine cluster and several second-level cloud cryptographic machine clusters all include a master node cloud cryptographic machine and several slave node cloud cryptographic machines. The master node cloud cryptographic machine of the first-level cloud cryptographic machine cluster initiates a key synchronization request to synchronize with all the slave node cloud cryptographic machines of the first-level cloud cryptographic machine cluster and the master node cloud cryptographic machine of the second-level cloud cryptographic machine cluster. The master node cloud cryptographic machine of the secondary cloud cryptographic machine cluster is synchronized with all slave node cloud cryptographic machines of the secondary cloud cryptographic machine cluster; All slave node cloud cryptographic machines feed back a response code ACK to the master node cloud cryptographic machine at the same level. The master node cloud cryptographic machine generates a synchronization result based on the response code ACK and adjusts the synchronization parameters. The master node cloud cryptographic machine includes a cloud cryptographic machine key management system module, a batch key synchronization algorithm execution module, a master node total control service module, a master node key security storage module, a master node message packaging module, a master node message unpacking module, a message broadcast module and a message response aggregation module; the master node cloud cryptographic machine of the secondary cloud cryptographic machine cluster also includes a message proxy module; The cloud cryptographic machine key management system module generates a key synchronization request and transmits it to the batch key synchronization algorithm execution module, and the batch key synchronization algorithm execution module inserts the key in the key synchronization request into the queue of keys to be synchronized; The batch key synchronization algorithm execution module transmits the key to the master node key security storage module for storage, and sends the key to the master node message packaging module according to the sending window. The master node message packaging module packages the key into a key synchronization message and transmits it to the message broadcast module. The message broadcast module broadcasts the key synchronization message to all slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster and the message proxy module of the master node cloud cryptographic machine in the second-level cloud cryptographic machine cluster; After receiving the key synchronization message and completing the key synchronization, all slave node cloud cryptographic machines feedback the response code ACK to the message response aggregation module of the master node cloud cryptographic machine at the same level; the response code ACK is the key ID of the last key synchronized by the slave node cloud cryptographic machine; The message response aggregation module receives the response code ACK and generates a synchronization result and transmits it to the master node general control service module; The master node general control service module adjusts the sending window of the next synchronization key through the batch key synchronization algorithm execution module according to the synchronization result; if the synchronization is successful, the sending window is expanded until the preset window upper limit is reached; If the synchronization fails, the sending window will be reduced to the lower limit of the window, and the keys to be synchronized will be synchronized continuously until the keys of all slave node cloud cryptographic machines are successfully synchronized, that is, the response code ACK of all slave node cloud cryptographic machines is the same and the key ID of the last key sent. In addition, the slave node cloud cryptographic machine that receives repeated key synchronization requests ignores the request and does not need to synchronize the key repeatedly, but needs to return ACK to the master node cloud cryptographic machine; Slave node key synchronization failures include: (1) The slave node cloud cryptographic machine only synchronizes part of the key or the master node cloud cryptographic machine does not receive the response code ACK from one or more slave node cloud cryptographic machines; (2) The response code ACK returned by the cloud cryptographic machine of the slave node is different from the response code ACK of the cloud cryptographic machines of other slave nodes, and is different from the key synchronization request ID corresponding to the key synchronization request sent.
2. A system for supporting batch synchronization of cloud cryptographic machine cluster keys according to claim 1, characterized in that: The message proxy module of the master node cloud cryptographic machine in the secondary cloud cryptographic machine cluster transmits the key synchronization message to the master node message unpacking module. The key obtained after parsing is stored in the master node key security storage module through the master node general control service module, and the key synchronization message is transmitted to the message broadcast module to be broadcasted to all slave node cloud cryptographic machines in the secondary cloud cryptographic machine cluster.
3. A system for supporting batch synchronization of cloud cryptographic machine cluster keys according to claim 2, characterized in that: The message response aggregation module generates a synchronization result according to the number, time and content of the response code ACK; if the message response aggregation module does not receive a set number of response codes ACK within a preset time threshold, it is determined that the synchronization has failed; If the message response aggregation module receives the response code ACK from all slave node cloud cryptographic machines within the preset time threshold, the content of the response code ACK is determined. If all response codes ACK are the key ID of the last key, the synchronization is successful, otherwise the synchronization fails.
4. A system for supporting batch synchronization of cloud cryptographic machine cluster keys according to claim 3, characterized in that: When the number of synchronization failures reaches the set threshold, the master node general control service module generates an alarm message through the batch key synchronization algorithm execution module.
5. A system for supporting batch synchronization of cloud cryptographic machine cluster keys according to claim 2, characterized in that: The slave node cloud cryptographic machine includes a message receiving module, a slave node message unpacking module, a message response module, a slave node message packaging module, a slave node master control service module and a slave node key security storage module; The slave node cloud cryptographic machine receives the key synchronization message of the master node cloud cryptographic machine through the message receiving module, parses the key through the slave node message unpacking module, and sends the key to the slave node master control service module, and the slave node master control service module stores the key in the slave node key security storage module; If the key storage is successful, the slave node master control service module completes the key synchronization, generates a response code ACK from the slave node master control service module, sends it to the slave node message packaging module for packaging, and sends the packaged response code ACK to the message response aggregation module of the master node cloud cryptographic machine at the same level through the message response module.
6. A system for supporting batch synchronization of cloud cryptographic machine cluster keys according to claim 2, characterized in that: The master node cloud cryptographic machine also includes a cloud cryptographic machine cluster management module, a slave node registration management module and a database; the master node cloud cryptographic machine adds a slave node cloud cryptographic machine through the cloud cryptographic machine cluster management module, and the cloud cryptographic machine cluster management module calls the slave node registration management module through the master node general control service module to verify the validity of the slave node data of the newly added slave node cloud cryptographic machine. After the verification is passed, the slave node data will be recorded in the database. If the verification fails, a prompt message will be generated and the operation of adding the slave node cloud cryptographic machine will be terminated.
7. A system for supporting batch synchronization of cloud cryptographic machine cluster keys according to claim 6, characterized in that: The system also includes a client business system, the master node cloud cryptographic machine also includes a master node cryptographic service module, and the slave node cloud cryptographic machine also includes a slave node cryptographic service module; the client business system calls the master node cryptographic service module or the slave node cryptographic service module to complete cryptographic operations by calling the cloud cryptographic machine interface library SDK in a network communication manner; the cloud cryptographic machine interface library SDK includes an interface API, a cryptographic machine communication module, a timing detection task module and a cloud cryptographic machine key consistency status check tracking table; the interface API encapsulates multiple cryptographic operations to form an interface function.
8. A system for supporting batch synchronization of cloud cryptographic machine cluster keys according to claim 7, characterized in that: The process of the client business system retrieving the key from the cloud cryptographic machine cluster for cryptographic operations is as follows; The client business system modifies the configuration file and configures the IP address of the master node cloud cryptographic machine in the configuration file; The cloud cryptography machine interface library SDK receives the configuration file, the scheduled detection task module detects the configuration file, generates an encryption call request according to the master node cloud cryptography machine IP, and regularly calls the master node general control service module of the corresponding master node cloud cryptography machine, obtains the slave node data of all slave node cloud cryptography machines from the database and updates it to the cloud cryptography machine key consistency status check tracking table; the slave node data includes the slave node cloud cryptography machine IP and key consistency status information; The cryptographic machine communication module searches for the slave node cloud cryptographic machine whose key consistency status is true in the cloud cryptographic machine key consistency status check tracking table, and sends an encryption call request to it; The slave node cryptographic service module of the slave node cloud cryptographic machine retrieves the key and feeds it back to the cryptographic machine communication module. The client business system retrieves the interface function from the interface API and performs cryptographic operations based on the key.
9. A method for supporting batch synchronization of cloud cryptographic machine cluster keys, characterized in that: A system for supporting batch synchronization of cloud cryptographic machine cluster keys as described in any one of claims 1 to 8, the specific steps comprising: Step 1: The master node cloud cryptographic machine of the first-level cloud cryptographic machine cluster generates a key; Step 2: The master node cloud cryptographic machine stores the key, packages it into a key synchronization message, and then broadcasts it to all slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster and the master node cloud cryptographic machine in the second-level cloud cryptographic machine cluster; Step 3: All slave node cloud cryptographic machines in the first-level cloud cryptographic machine cluster parse the key from the key synchronization message and store it, and feedback the response code ACK to the master node cloud cryptographic machine in the first-level cloud cryptographic machine cluster; The master node cloud cryptography machine in the secondary cloud cryptography machine cluster broadcasts the key synchronization message to all slave node cloud cryptography machines in the secondary cloud cryptography machine cluster, and stores the key after parsing it; all slave node cloud cryptography machines in the secondary cloud cryptography machine cluster parse the key from the key synchronization message and store it, and feedback the response code ACK to the master node cloud cryptography machine in the secondary cloud cryptography machine cluster; Step 4: The master node cloud cryptographic machine receives the response code ACK to generate a synchronization result, adjusts the synchronization parameters during packaging according to the synchronization result, and returns to step 2.
Citation Information
Patent Citations
Information synchronization system and method for group of cipher machines
CN103973462A
Computer intercluster key management method and system
CN104363208A
Method and system for parallelizing password service network in cluster environment
CN108063813A
Distributed key management method and device, equipment and storage medium
CN115189931A