Key management method, device, electronic device and storage medium

By adopting a layer-by-layer nested key structure and dynamic update mechanism in key management, the problem of data leakage in existing key management methods is solved, and more efficient, flexible and secure key management is achieved.

CN118316606BActive Publication Date: 2024-11-29TIANJIN NANKAI UNIV GENERAL DATA TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410732874.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-11-29
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

Existing key management methods are prone to data leakage problems, and a fixed single key algorithm cannot meet the needs of efficiency, flexibility and security.

Method used

Adopt a layer-by-layer nested key structure, each key level is used to encrypt the key at the next key level and/or the data encrypted by the next key level. The encryption algorithms used by different key levels are different. And obtain the performance parameters during the encryption and decryption process in real time, and update the key based on the performance parameters.

Benefits of technology

By increasing the complexity and flexibility of keys, reduce the risk of data breaches, and improve the security and efficiency of keys.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118316606B_ABST
    Figure CN118316606B_ABST
Patent Text Reader

Abstract

The present invention provides a key management method, device, electronic device and storage medium. The method includes: establishing nested keys, and encrypting data based on the nested keys; the nested keys include: multiple key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms; during the use of the nested keys, the performance parameters in the encryption and decryption process are obtained in real time, and based on the performance parameters, the performance evaluation value of the nested keys is determined; based on the performance evaluation value of the nested keys, the nested keys are updated, and data is encrypted based on the updated keys. The present invention can improve the complexity of the key and reduce the risk of data leakage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic digital data processing, and in particular to a key management method, device, electronic equipment and storage medium. Background Art

[0002] With the rapid development of information technology, data security issues have become increasingly prominent. As the core link in ensuring the security of information encryption, key management faces huge challenges in terms of security, complexity and efficiency.

[0003] In the related art, a fixed single key algorithm is usually used for data encryption management. However, the fixed single key algorithm often cannot meet the current requirements for efficiency, flexibility and security, and is prone to the risk of data leakage. Summary of the invention

[0004] The embodiments of the present invention provide a key management method, device, electronic device and storage medium to solve the problem that the existing key management method is prone to data leakage.

[0005] In a first aspect, an embodiment of the present invention provides a key management method, including:

[0006] Establishing nested keys, and encrypting data based on the nested keys; the nested keys include: multiple key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms;

[0007] During the use of the layer-by-layer nested key, real-time acquisition of performance parameters in the encryption and decryption process, and based on the performance parameters, determination of a performance evaluation value of the layer-by-layer nested key;

[0008] Based on the performance evaluation value of the layer-by-layer nested key, the layer-by-layer nested key is updated, and data encryption is performed based on the updated key.

[0009] In a possible implementation, the multiple key levels include: a top-level key, at least one middle-level key, and a bottom-level key;

[0010] The top-level key is used to encrypt an intermediate-level key adjacent to the top-level key;

[0011] The at least one intermediate key is used to encrypt the key of the next key level and / or the data encrypted by the next key level;

[0012] The underlying key is used to encrypt data.

[0013] In a possible implementation, the performance parameters include: efficiency parameters, resource occupancy parameters, stability parameters and security parameters in the encryption and decryption process of each key level; the performance evaluation values ​​of the nested keys include: performance evaluation values ​​of each key level;

[0014] Determining the performance evaluation value of the layer-by-layer nested key based on the performance parameter includes:

[0015] For each key level, based on the efficiency parameter, resource occupation parameter, stability parameter and security parameter in the encryption and decryption process of the key level, determine the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level;

[0016] Obtain the weights corresponding to the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value of the key level;

[0017] Based on the weights, the efficiency evaluation value, the resource occupancy evaluation value, the stability evaluation value and the security evaluation value are weightedly summed to obtain a corresponding performance evaluation value of the key level.

[0018] In a possible implementation manner, updating the layer-by-layer nested key based on the performance evaluation value of the layer-by-layer nested key includes:

[0019] Obtain the usage time, usage frequency and key system load of each key level respectively;

[0020] The nested keys are updated based on the performance evaluation value of each key level in the nested keys and one or more of the usage time, usage frequency and key system load of each key level.

[0021] In a possible implementation, the method includes:

[0022] During the use of the layer-by-layer nested keys, detecting whether a data leakage event occurs at each key level;

[0023] For the highest key level among all key levels where data leakage occurs, a new key level is added under this key level, and this key level and all key levels under it are updated to obtain new nested keys, and data is encrypted based on the new keys.

[0024] In a possible implementation, updating the nested keys based on the performance evaluation value of each key level in the nested keys and the usage time of each key level includes:

[0025] For each key level, determine whether the usage time of the key level is greater than a preset time, and determine whether the performance evaluation value of the key level is lower than a preset value;

[0026] When the usage time of the key level is greater than the preset time, or the performance evaluation value of the key level is lower than the preset value, the key level is updated.

[0027] In a possible implementation, for each key level, based on the efficiency parameter, resource occupation parameter, stability parameter and security parameter in the encryption and decryption process of the key level, the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level are determined, including:

[0028] The efficiency parameters, resource occupation parameters, stability parameters and security parameters in the encryption and decryption process of the key level are respectively input into each pre-trained regression model, and the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level are obtained accordingly; wherein the regression model is trained based on the efficiency parameters, resource occupation parameters, stability parameters, security parameters in the encryption and decryption process and the corresponding efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value.

[0029] In a second aspect, an embodiment of the present invention provides a key management device, including:

[0030] An establishment module is used to establish a layer-by-layer nested key and perform data encryption based on the layer-by-layer nested key; the layer-by-layer nested key includes: a plurality of key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms;

[0031] A detection module, used for acquiring performance parameters in the encryption and decryption process in real time during the use of the layer-by-layer nested keys, and determining a performance evaluation value of the layer-by-layer nested keys based on the performance parameters;

[0032] An updating module is used to update the nested keys based on the performance evaluation values ​​of the nested keys, and to perform data encryption based on the updated keys.

[0033] In a third aspect, an embodiment of the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the processor implements the steps of the method described in the first aspect or any possible implementation manner of the first aspect.

[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in the first aspect or any possible implementation method of the first aspect are implemented.

[0035] Embodiments of the present invention provide a key management method, device, electronic device and storage medium, which encrypt data through nested keys. The nested keys include different key levels, each key level is used to encrypt the keys of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms, which can effectively improve the decryption complexity and reduce the risk of data leakage. In addition, during the use of the above-mentioned nested keys, the embodiments of the present invention detect the performance parameters in the encryption and decryption process in real time to determine the performance evaluation value, and dynamically update the key based on the performance evaluation value, and use the updated key to encrypt data, further reducing the risk of data leakage. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, 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 some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0037] Figure 1 is a flowchart of an implementation of a key management method provided by an embodiment of the present invention;

[0038] Figure 2 is a flowchart for implementing the determination of performance evaluation values ​​of nested keys layer by layer provided by an embodiment of the present invention;

[0039] Figure 3 is a flowchart of implementing a key level update provided by an embodiment of the present invention;

[0040] Figure 4 is a structural diagram of a key management device provided by an embodiment of the present invention;

[0041] Figure 5 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.

[0043] In the related technology, a fixed single key algorithm is usually used for data encryption management. However, a fixed single key algorithm often cannot meet the current requirements for efficiency, flexibility and security, and is prone to data leakage risks. For example, if a company's confidential materials are encrypted using a single key algorithm, they can be easily cracked, resulting in the leakage of confidential materials and causing unexpected losses to the company.

[0044] In order to reduce the risk of data leakage and ensure data security, in an embodiment of the present invention, nested keys are established, and data is encrypted based on the nested keys, thereby increasing the difficulty of key cracking and reducing the risk of data leakage. In addition, in an embodiment of the present invention, during the use of the above-mentioned nested keys, performance parameters in the encryption and decryption process are obtained in real time, and the performance evaluation value of the nested keys is determined. The key is updated based on the performance evaluation value, which can further reduce the risk of data leakage.

[0045] In order to make the purpose, technical solutions and advantages of the present invention more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0046] Figure 1 The implementation flow chart of the key management method provided by the embodiment of the present invention is detailed as follows:

[0047] Step 101, establish a nested key layer by layer, and encrypt data based on the nested key layer by layer. The nested key layer by layer includes: multiple key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms.

[0048] Among them, each key level is used to encrypt the keys of the next key level and / or the data encrypted by the next key level. This makes the entire nested keys organized into a hierarchical set, forming a recursive protection mechanism, which is conducive to reducing the risk of data leakage.

[0049] Here, different key levels use different encryption algorithms, which means that each key level represents an independent security level. Even if a certain key level is cracked, it is difficult to directly obtain the original data, thereby ensuring data security.

[0050] It should be noted that different encryption algorithms can be understood as different types of encryption algorithms, or different versions of encryption algorithms, that is, different key levels use different types of encryption algorithms, and / or different key levels use different versions of the same type of encryption algorithm.

[0051] For example, the first key level can use an asymmetric public key encryption algorithm, such as the RSA encryption algorithm, and the second key level can use a symmetric key encryption algorithm, such as the AES encryption algorithm. This heterogeneity can increase the complexity of the key. In addition, algorithms of the same type with different strengths can also be used alternately between different key levels. For example, at the symmetric encryption algorithm level, the 128-bit, 192-bit or 256-bit AES encryption algorithm version can be selected according to the sensitivity and security requirements.

[0052] The embodiment of the present invention adopts a variety of encryption algorithms for encryption processing, which can form a complex protection hierarchy and significantly enhance the anti-cracking ability and security of the layer-by-layer nested keys.

[0053] Step 102: During the use of the layer-by-layer nested keys, the performance parameters in the encryption and decryption process are acquired in real time, and the performance evaluation values ​​of the layer-by-layer nested keys are determined based on the performance parameters.

[0054] Among them, the key performance parameters may include: encryption and decryption speed, number of bytes processed, CPU usage, memory usage, disk I / O usage, performance fluctuations, key entropy value, key usage time, and number of security risk events.

[0055] The embodiment of the present invention can determine the performance evaluation value of the key through the performance parameters of the key during the encryption and decryption process. The performance evaluation value is used to quantitatively characterize the performance of the key. That is, the lower the performance evaluation value, the worse the performance of the key.

[0056] Step 103: based on the performance evaluation value of the layer-by-layer nested key, update the layer-by-layer nested key, and encrypt data based on the updated key.

[0057] It is understandable that the lower the performance evaluation value of the key, the worse the performance of the key, and the more likely it is that a data leakage event will occur. Therefore, the embodiment of the present invention dynamically updates the key based on the performance evaluation value of the key to reduce the risk of data leakage.

[0058] Compared with the prior art, the embodiment of the present invention establishes a layered nested key, which includes different key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms. By encrypting data with the layered nested key, the decryption complexity can be effectively improved and the risk of data leakage can be reduced. In addition, during the use of the above-mentioned layered nested key, the embodiment of the present invention detects the performance parameters in the encryption and decryption process in real time to determine the performance evaluation value, and dynamically updates the key based on the performance evaluation value, which can greatly improve the flexibility of the key and help further reduce the risk of data leakage.

[0059] In some embodiments, the multiple key levels include: a top-level key, at least one middle-level key, and a bottom-level key. The top-level key is used to encrypt an middle-level key adjacent to the top-level key; the at least one middle-level key is used to encrypt a key of a next key level and / or data encrypted by the next key level; and the bottom-level key is used to encrypt data.

[0060] Here, the top-level key, the middle-level key, and the bottom-level key are nested layer by layer to form a recursive protection mechanism to increase the complexity of the key structure and reduce the risk of data leakage.

[0061] For ease of understanding, the embodiment of the present invention is described by taking two intermediate layer keys as an example. Exemplarily, multiple key hierarchies may include: a top-level key, a first intermediate layer key, a second intermediate layer key, and a bottom-level key that are nested in sequence. Among them, the top-level key is the highest-level key, which is used to encrypt the first intermediate layer key. The first intermediate layer key and the second intermediate layer key are both secondary keys. The first intermediate layer key is used to encrypt the second intermediate layer key, and / or, specific sensitive data encrypted by the second intermediate layer key. The second intermediate layer key is used to encrypt the bottom layer key, and / or, specific sensitive data encrypted by the bottom layer key. The bottom layer key is a basic key, which is directly used to encrypt the original data. The specific sensitive data here can be determined according to actual conditions, such as identity information. Accordingly, when decrypting data, the top-level key can be used to decrypt the first intermediate layer key, the first intermediate layer key can be used to decrypt the second intermediate layer key, and / or, specific sensitive data encrypted by the second intermediate layer key. The second intermediate layer key decrypts the bottom layer key, and / or, specific sensitive data encrypted by the bottom layer key. The bottom layer key decrypts the original data.

[0062] In some embodiments, the performance parameters may include: efficiency parameters, resource occupation parameters, stability parameters and security parameters in the encryption and decryption process of each key level. The performance evaluation value of the nested keys includes: the performance evaluation value of each key level.

[0063] On this basis, see Figure 2The above-mentioned determination of the performance evaluation value of the nested keys layer by layer based on the performance parameters may include:

[0064] Step 201, for each key level, based on the efficiency parameters, resource occupancy parameters, stability parameters and security parameters in the encryption and decryption process of the key level, determine the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value of the key level.

[0065] The embodiment of the present invention can perform performance evaluation on each key level in the above-mentioned nested keys from aspects such as efficiency, resource usage, stability and security in the encryption and decryption process to determine the performance evaluation value of each key level.

[0066] Here, the efficiency parameter may include the encryption and decryption rate. The resource occupancy parameter may include the CPU usage, the memory usage, and the disk I / O usage. The stability parameter may include: the fluctuation of the CPU usage and the fluctuation of the memory usage during the encryption and decryption process. Exemplarily, in an embodiment of the present invention, the standard deviation may be used to quantify the fluctuation, or the fluctuation may be quantified by time series analysis. The security parameters may include: the key entropy value, the number of security risk events, and the key usage time.

[0067] In the embodiment of the present invention, based on the encryption and decryption rate of each key level during the encryption and decryption process, the efficiency evaluation value of each key level can be determined accordingly. Among them, the encryption and decryption rate is positively correlated with the efficiency evaluation value. Based on the CPU usage rate, memory occupancy and disk I / O occupancy of each key level during the encryption and decryption process, the resource occupancy evaluation value of each key level can be determined accordingly. Among them, the CPU usage rate, memory occupancy and disk I / O occupancy are all negatively correlated with the resource occupancy evaluation value. Based on the fluctuation of the CPU usage rate and the fluctuation of the memory occupancy during the encryption and decryption process of each key level, the stability evaluation value can be determined accordingly. Among them, the fluctuation of the CPU usage rate and the fluctuation of the memory occupancy are both negatively correlated with the stability evaluation value. During the encryption and decryption process, each key level will monitor and prompt security risk events in real time. In the embodiment of the present invention, the number of security risk events can be counted in real time, and the security evaluation value can be determined accordingly based on the number of security risk events, key entropy value and key usage time during the encryption and decryption process of each key level. Among them, the number of security risk events and the key usage time are negatively correlated with the security evaluation value, and the key entropy value is positively correlated with the security evaluation value.

[0068] In some embodiments, when the efficiency parameter, resource occupancy parameter, stability parameter and security parameter are correspondingly determined to determine the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value, the efficiency parameter, resource occupancy parameter, stability parameter and security parameter in the encryption and decryption process of the key level can be respectively input into each pre-trained regression model to obtain the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value of the key level. The regression model is trained based on the efficiency parameter, resource occupancy parameter, stability parameter and security parameter in the encryption and decryption process and the corresponding efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value.

[0069] That is to say, the embodiment of the present invention pre-uses efficiency parameters, resource occupancy parameters, stability parameters, security parameters and corresponding efficiency evaluation values, resource occupancy evaluation values, stability evaluation values, and security evaluation values ​​to train the regression model. Among them, the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value, and security evaluation value used for training the regression model can be determined by industry experts based on the efficiency parameters, resource occupancy parameters, stability parameters, and security parameters.

[0070] Before model training, the obtained efficiency parameters, resource occupancy parameters, stability parameters and security parameters can be cleaned and normalized in advance. Data cleaning can remove invalid values ​​and outliers, and normalization can ensure that each performance parameter is at the same scale, which is convenient for subsequent model training.

[0071] The regression model in the embodiment of the present invention may be a linear regression model, a decision tree regression model, a neural network regression model or other regression models.

[0072] Step 202, obtaining the weights corresponding to the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value of the key level.

[0073] Here, the weights corresponding to the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value, and security evaluation value can be determined by a weighting algorithm such as principal component analysis or entropy weight method, or can be set according to actual application requirements. For example, if the user's requirements for resource occupancy, efficiency, stability, and security increase in sequence, the weights of the resource occupancy evaluation value, efficiency evaluation value, stability evaluation value, and security evaluation value can be increased in sequence accordingly.

[0074] Step 203, based on the weights, weighted sum is performed on the efficiency evaluation value, the resource occupancy evaluation value, the stability evaluation value and the security evaluation value to obtain the corresponding performance evaluation value of the key level.

[0075] The calculation formula of the performance evaluation value can be expressed as: .

[0076] in, represents the performance evaluation value, represents the weight corresponding to the efficiency evaluation value, represents the efficiency evaluation value, Indicates the weight corresponding to the resource occupancy evaluation value, Indicates the resource occupancy evaluation value, represents the weight corresponding to the stability evaluation value, represents the stability evaluation value, represents the weight corresponding to the safety evaluation value, Indicates the safety rating value.

[0077] The embodiment of the present invention determines the performance evaluation value of each key level by comprehensively considering the efficiency, resource occupation, stability and security in the encryption and decryption process, and dynamically updates the performance evaluation value of each key level to improve the security level of the key and ensure data security.

[0078] In some embodiments, when updating the nested keys, the usage time, usage frequency and key system load of each key level can be obtained respectively; and based on the performance evaluation value of each key level in the nested keys, and one or more of the usage time, usage frequency and key system load of each key level, the nested keys are updated.

[0079] In the embodiment of the present invention, in addition to considering the performance evaluation value, the use time, use frequency and key system load of the key hierarchy are also considered. Among them, the use time of the key hierarchy can be understood as the length of time that the encryption algorithm in the key hierarchy is put into use. The use frequency of the key hierarchy can be understood as the number of encryption and decryption times within the use time. The key system load can be understood as the encryption pressure of the nested keys when encrypting data.

[0080] In an embodiment of the present invention, whether to update the nested keys can be determined based on the performance evaluation value of each key level and one or more of the usage time, usage frequency, and key system load. Updating the nested keys can be understood as updating the encryption algorithm in the key level, increasing the key level, or reducing the key level.

[0081] Here, after the update is completed, the relevant system components and services in the key system are notified to ensure that each system component and service can correctly load and use the updated key. If the key is distributed to other clients or servers, it must also be updated and verified synchronously through a secure channel.

[0082] In some embodiments, the nested keys can be updated based on the performance evaluation value of each key level in the nested keys and the usage time of each key level. First, for each key level, it is determined whether the usage time of the key level is greater than a preset time, and whether the performance evaluation value of the key level is lower than a preset value; when the usage time of the key level is greater than the preset time, or the performance evaluation value of the key level is lower than the preset value, the key level is updated.

[0083] The preset time here can be understood as a preset service life. That is, for each key level, when the usage time of the key level reaches the preset service life, or when the performance evaluation value of the key level is lower than the preset value, the encryption algorithm in the key level is updated.

[0084] The preset time here can be determined according to the actual situation. Different key levels have different corresponding preset times. The security sensitivity of the bottom layer key is lower, and accordingly, the corresponding preset time is shorter. Exemplarily, it can be one week. The security sensitivity of the middle layer key is relatively high, and the corresponding preset time is also longer, and exemplarly, it can be one month. The security sensitivity of the top layer key is the highest, and the corresponding preset time is also the longest, and exemplarly, it can be six months.

[0085] Similarly, the preset value can also be determined according to the actual situation. For example, in the embodiment of the present invention, the performance evaluation value can be mapped to , on this basis, the preset value can be 0.5.

[0086] In some embodiments, the nested keys can be updated based on the performance evaluation value of each key level in the nested keys and the usage frequency of each key level. First, for each key level, it is determined whether the usage frequency of the key level is greater than a preset frequency, and whether the performance evaluation value of the key level is lower than a preset value; when the usage time of the key level is greater than the preset frequency, or the performance evaluation value of the key level is lower than the preset value, the key level is updated.

[0087] The preset frequency here can be understood as the preset upper limit of encryption and decryption times. That is to say, for each key level, when the number of encryption and decryption times of the key level within the usage time reaches the preset upper limit of encryption and decryption times, or when the performance evaluation value of the key level is lower than the preset value, the encryption algorithm in the key level is updated and replaced.

[0088] The preset frequency here can be determined according to actual conditions. For example, the preset frequency can be 100.

[0089] In the embodiment of the present invention, when the encryption algorithm in a certain key level is updated, the encryption algorithm of the key level above the key level is used to re-encrypt the key or data of the key level, and the encryption algorithm of the key level is used to re-encrypt the key or data of the next key level. That is, the original key nesting relationship is maintained, and only the encryption algorithm in the key level is updated and replaced.

[0090] In some embodiments, the nested keys can be updated based on the performance evaluation value of each key level in the nested keys, the usage time of each key level, the usage frequency and the key system load. First, determine whether the key system load is greater than the preset system load. For each key level, determine whether the usage time of the key level is greater than the preset time, determine whether the usage frequency of the key level is greater than the preset frequency, and determine whether the performance evaluation value of the key level is lower than the preset value. When the key system load is greater than the first preset system load, add a key level; when the usage time of the key level is greater than the preset time, or the usage frequency of the key level is greater than the preset frequency, or the performance evaluation value of the key level is lower than the preset value, update and replace the encryption algorithm in the key level.

[0091] When the key system load is less than a second preset system load, the key level may be reduced, wherein the first preset system load is greater than the second preset system load.

[0092] In other words, the key system load is used to decide whether to increase or decrease the key levels in the nested keys. The usage time, usage frequency and performance evaluation value of each key level are used to decide whether to update and replace the encryption algorithm in the corresponding key level. Among them, when the key system load is greater than the first preset system load, that is, the key system load is too large, the key level can be increased to reduce the data encryption pressure. When the key system load is less than the second preset system load, that is, the key system load is too small, the key level can be reduced to save computing resources and improve encryption and decryption efficiency.

[0093] In some embodiments, see Figure 3 In addition to the above method for updating the key hierarchy according to the system load, the embodiment of the present invention also provides the following key hierarchy update method:

[0094] Step 301, during the use of the nested keys, detecting whether a data leakage event occurs at each key level;

[0095] Step 302, for the highest key level among all key levels where the data leakage incident occurs, a new key level is added under the key level, and the key level and all key levels under it are updated to obtain new nested keys, and data is encrypted based on the new keys.

[0096] It is understandable that during the use of the nested keys, the key management system monitors the data security in the encryption and decryption process in real time. Once a data leakage event is determined, a new key level is added under the key level where the data leakage occurred, and the encryption algorithms in the key level and all the key levels under it are updated to obtain a new nested key, and data is encrypted based on the new key.

[0097] If there are multiple key levels where data leakage occurs, determine the highest key level where data leakage occurs. Add a new key level under the highest key level, and update the encryption algorithm of the highest key level and all key levels under it to obtain new nested keys, and encrypt data based on the new keys.

[0098] The highest key level here can be understood as the highest key level among all key levels where data leakage occurs. In the nested keys, the key levels of the top key, the middle key and the bottom key decrease in sequence.

[0099] In the embodiment of the present invention, when adding a new key level under a certain key level, the new key level can be added at any position between the key level and the bottom key. However, considering the mutual influence of each nested key level, the new key level can also be added directly under the bottom key to reduce the workload as much as possible and save computing resources.

[0100] In addition, the resource consumption of the bottom-level key is smaller and its security sensitivity is lower. Therefore, the bottom-level key can be updated regularly. That is, regardless of whether the usage time, usage frequency, and performance evaluation value of the bottom-level key meet the update standard, the encryption algorithm in the bottom-level key can be updated and replaced when the usage time of the bottom-level key reaches the preset update time. However, the resource consumption of the middle-level key and the top-level key is greater and the security sensitivity is higher. Therefore, there is no need to update regularly, and the encryption algorithm is only updated when the update standard is met.

[0101] The update standard here can be understood as at least one of the usage time reaching a preset time, the usage frequency reaching a preset frequency, and the performance evaluation value being lower than a preset value.

[0102] The preset update time here can be determined according to actual conditions. For example, the preset update time can be one day.

[0103] The embodiment of the present invention hierarchically and gradually updates the encryption algorithms in each key level based on the usage time, usage frequency, and performance evaluation value of the key level, which can reduce the impact of the update process on the performance of the key system, and at the same time increase the complexity and flexibility of the key to reduce the risk of data leakage. In addition, the embodiment of the present invention also updates the key level based on the key system load and data leakage events to further reduce the risk of data leakage.

[0104] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0105] The following is an embodiment of the device of the present invention. For details not described in detail, reference may be made to the corresponding method embodiments described above.

[0106] Figure 4 The structure diagram of the key management device provided by the embodiment of the present invention is shown. For the convenience of explanation, only the part related to the embodiment of the present invention is shown, which is described in detail as follows:

[0107] like Figure 4 As shown, the key management device 4 includes: an establishment module 41, a detection module 42 and an update module 43.

[0108] Establishing module 41, used to establish nested keys, and encrypt data based on the nested keys; the nested keys include: multiple key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms;

[0109] A detection module 42, used to obtain performance parameters in the encryption and decryption process in real time during the use of the layer-by-layer nested keys, and determine the performance evaluation value of the layer-by-layer nested keys based on the performance parameters;

[0110] The updating module 43 is used to update the nested keys based on the performance evaluation values ​​of the nested keys, and perform data encryption based on the updated keys.

[0111] In one possible implementation, the plurality of key levels include: a top-level key, at least one middle-level key, and a bottom-level key;

[0112] The top-level key is used to encrypt an intermediate-level key adjacent to the top-level key;

[0113] At least one intermediate key, used to encrypt the key of the next key level and / or the data encrypted by the next key level;

[0114] The underlying key used to encrypt data.

[0115] In a possible implementation, the performance parameters include: efficiency parameters, resource occupation parameters, stability parameters, and security parameters in the encryption and decryption process of each key level; the performance evaluation values ​​of the nested keys include: the performance evaluation value of each key level;

[0116] The detection module 42 is specifically used for:

[0117] For each key level, based on the efficiency parameter, resource occupation parameter, stability parameter and security parameter in the encryption and decryption process of the key level, determine the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level;

[0118] Obtain the weights corresponding to the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value of the key level;

[0119] Based on the weights, the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value are weighted and summed to obtain the corresponding performance evaluation value of the key level.

[0120] In a possible implementation, the updating module 43 is specifically configured to:

[0121] Obtain the usage time, usage frequency and key system load of each key level respectively;

[0122] The nested keys are updated based on a performance evaluation value of each key level in the nested keys and one or more of a usage time, a usage frequency, and a key system load of each key level.

[0123] In a possible implementation, the updating module 43 is further configured to:

[0124] During the use of nested keys, detect whether data leakage occurs at each key level;

[0125] For the highest key level among all key levels where data leakage occurs, a new key level is added under this key level, and this key level and all key levels under it are updated to obtain new nested keys, and data is encrypted based on the new keys.

[0126] In a possible implementation, the updating module 43 is specifically configured to:

[0127] For each key level, determine whether the usage time of the key level is greater than a preset time, and determine whether the performance evaluation value of the key level is lower than a preset value;

[0128] When the usage time of the key level is greater than the preset time, or the performance evaluation value of the key level is lower than the preset value, the key level is updated.

[0129] In a possible implementation, the detection module 42 is specifically configured to:

[0130] The efficiency parameters, resource occupation parameters, stability parameters and security parameters in the encryption and decryption process of the key level are respectively input into each pre-trained regression model, and the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level are obtained accordingly; wherein the regression model is trained based on the efficiency parameters, resource occupation parameters, stability parameters, security parameters in the encryption and decryption process and the corresponding efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value.

[0131] In the embodiment of the present invention, the establishment module 41 establishes a nested key, which includes different key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms. The establishment module 41 uses the nested key to encrypt data, which can effectively improve the complexity of decryption and reduce the risk of data leakage. In addition, during the use of the nested key, the detection module 42 detects the performance parameters in the encryption and decryption process in real time to determine the performance evaluation value, so that the update module 43 can dynamically update the key based on the performance evaluation value, which can greatly improve the flexibility of the key and help to further reduce the risk of data leakage.

[0132] Figure 5 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the above-mentioned key management method embodiments are implemented, such as Figure 1 Alternatively, when the processor 50 executes the computer program 52, the functions of each module / unit in the above-mentioned device embodiments are realized, for example, Figure 4 The functions of modules 41 to 43 are shown.

[0133] Exemplarily, the computer program 52 may be divided into one or more modules / units, which are stored in the memory 51 and executed by the processor 50 to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program 52 in the electronic device 5. For example, the computer program 52 may be divided into Figure 4 Modules 41 to 43 are shown.

[0134] The electronic device 5 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 5 may include, but is not limited to, a processor 50 and a memory 51. Those skilled in the art will appreciate that Figure 5 It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0135] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0136] The memory 51 may be an internal storage unit of the electronic device 5, such as a hard disk or memory of the electronic device 5. The memory 51 may also be an external storage device of the electronic device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 5. Further, the memory 51 may also include both an internal storage unit of the electronic device 5 and an external storage device. The memory 51 is used to store the computer program and other programs and data required by the electronic device. The memory 51 may also be used to temporarily store data that has been output or is to be output.

[0137] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0138] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0139] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0140] In the embodiments provided by the present invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0141] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0142] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0143] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned key management method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.

Claims

1. A key management method, characterized in that: include: Establishing layer-by-layer nested keys, and encrypting data based on the layer-by-layer nested keys; The nested keys include: multiple key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms; During the use of the layer-by-layer nested key, real-time acquisition of performance parameters in the encryption and decryption process, and based on the performance parameters, determination of a performance evaluation value of the layer-by-layer nested key; Based on the performance evaluation value of the layer-by-layer nested key, updating the layer-by-layer nested key, and encrypting data based on the updated key; The performance parameters include: efficiency parameters, resource occupancy parameters, stability parameters and security parameters in the encryption and decryption process of each key level; the performance evaluation values ​​of the nested keys include: performance evaluation values ​​of each key level; Determining the performance evaluation value of the layer-by-layer nested key based on the performance parameter includes: For each key level, based on the efficiency parameter, resource occupation parameter, stability parameter and security parameter in the encryption and decryption process of the key level, determine the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level; Obtain the weights corresponding to the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value of the key level; Based on the weights, weighted summation is performed on the efficiency evaluation value, the resource occupancy evaluation value, the stability evaluation value, and the security evaluation value to obtain a corresponding performance evaluation value of the key level; Based on the performance evaluation value of the layer-by-layer nested key, updating the layer-by-layer nested key includes: Obtain the usage time, usage frequency and key system load of each key level respectively; Based on the performance evaluation value of each key level in the nested keys, and one or more of the usage time, usage frequency and key system load of each key level, updating the nested keys; wherein updating the nested keys includes: updating the encryption algorithm in the key level, increasing the key level or decreasing the key level; Based on the performance evaluation value of each key level in the nested keys, the usage time and usage frequency of each key level and the key system load, the nested keys are updated, including: Determine whether the key system load is greater than a preset system load, and for each key level, determine whether the usage time of the key level is greater than a preset time, determine whether the usage frequency of the key level is greater than a preset frequency, and determine whether the performance evaluation value of the key level is lower than a preset value; When the key system load is greater than the first preset system load, increasing the key level; When the usage time of the key level is greater than the preset time, or the usage frequency of the key level is greater than the preset frequency, or the performance evaluation value of the key level is lower than the preset value, the encryption algorithm in the key level is updated and replaced; When the key system load is less than or lower than a second preset system load, reducing the key level; wherein the first preset system load is greater than the second preset system load; The method further comprises: During the use of the layer-by-layer nested keys, detecting whether a data leakage event occurs at each key level; For the highest key level among all key levels where data leakage occurs, a new key level is added under this key level, and this key level and all key levels under it are updated to obtain new nested keys, and data is encrypted based on the new keys.

2. The key management method according to claim 1, characterized in that: The plurality of key hierarchies include: a top-level key, at least one middle-level key, and a bottom-level key; The top-level key is used to encrypt an intermediate-level key adjacent to the top-level key; The at least one intermediate key is used to encrypt the key of the next key level and / or the data encrypted by the next key level; The underlying key is used to encrypt data.

3. The key management method according to claim 1, characterized in that: For each key level, based on the efficiency parameter, resource occupation parameter, stability parameter and security parameter in the encryption and decryption process of the key level, the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level are determined, including: The efficiency parameters, resource occupation parameters, stability parameters and security parameters in the encryption and decryption process of the key level are respectively input into each pre-trained regression model, and the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level are obtained accordingly; wherein the regression model is trained based on the efficiency parameters, resource occupation parameters, stability parameters, security parameters in the encryption and decryption process and the corresponding efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value.

4. A key management device, characterized in that: include: An establishment module, used for establishing a layer-by-layer nested key, and performing data encryption based on the layer-by-layer nested key; The nested keys include: multiple key levels, each key level is used to encrypt the key of the next key level and / or the data encrypted by the next key level, and different key levels use different encryption algorithms; A detection module, used for acquiring performance parameters in the encryption and decryption process in real time during the use of the layer-by-layer nested keys, and determining a performance evaluation value of the layer-by-layer nested keys based on the performance parameters; An updating module, used for updating the layer-by-layer nested keys based on the performance evaluation values ​​of the layer-by-layer nested keys, and performing data encryption based on the updated keys; The performance parameters include: efficiency parameters, resource occupancy parameters, stability parameters and security parameters in the encryption and decryption process of each key level; the performance evaluation values ​​of the nested keys include: performance evaluation values ​​of each key level; Determining the performance evaluation value of the layer-by-layer nested key based on the performance parameter includes: For each key level, based on the efficiency parameter, resource occupation parameter, stability parameter and security parameter in the encryption and decryption process of the key level, determine the efficiency evaluation value, resource occupation evaluation value, stability evaluation value and security evaluation value of the key level; Obtain the weights corresponding to the efficiency evaluation value, resource occupancy evaluation value, stability evaluation value and security evaluation value of the key level; Based on the weights, weighted summation is performed on the efficiency evaluation value, the resource occupancy evaluation value, the stability evaluation value, and the security evaluation value to obtain a corresponding performance evaluation value of the key level; Based on the performance evaluation value of the layer-by-layer nested key, updating the layer-by-layer nested key includes: Obtain the usage time, usage frequency and key system load of each key level respectively; Based on the performance evaluation value of each key level in the nested keys, and one or more of the usage time, usage frequency and key system load of each key level, updating the nested keys; wherein updating the nested keys includes: updating the encryption algorithm in the key level, increasing the key level or decreasing the key level; Based on the performance evaluation value of each key level in the nested keys, the usage time and usage frequency of each key level and the key system load, the nested keys are updated, including: Determine whether the key system load is greater than a preset system load, and for each key level, determine whether the usage time of the key level is greater than a preset time, determine whether the usage frequency of the key level is greater than a preset frequency, and determine whether the performance evaluation value of the key level is lower than a preset value; When the key system load is greater than the first preset system load, increasing the key level; When the usage time of the key level is greater than the preset time, or the usage frequency of the key level is greater than the preset frequency, or the performance evaluation value of the key level is lower than the preset value, the encryption algorithm in the key level is updated and replaced; When the key system load is less than or lower than a second preset system load, reducing the key level; wherein the first preset system load is greater than the second preset system load; The update module is further used for: During the use of the layer-by-layer nested keys, detecting whether a data leakage event occurs at each key level; For the highest key level among all key levels where data leakage occurs, a new key level is added under this key level, and this key level and all key levels under it are updated to obtain new nested keys, and data is encrypted based on the new keys.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the key management method according to any one of claims 1 to 3 are implemented.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the key management method as described in any one of claims 1 to 3 are implemented.

Citation Information

Patent Citations

  • Multi-layer key configuration method and device

    CN115766086A

  • Power grid data secure communication transmission method and system based on cloud encryption

    CN117336064A

  • Commercial password-based data processing method and device, and medium

    CN117459275A