Intelligent implementation method and device for key recovery
By comparing the hash values of archived records in the key recovery information and decrypting the hash values of the key encryption key in the protected area, the problem of strong passwords being easily cracked in the prior art is solved, reducing the risk of illegal recovery of keys and data leakage.
Patent Information
- Application Number
- CN202410475960.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-19
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-04-19
AI Technical Summary
In the existing key recovery methods, strong passwords are easily cracked, resulting in the key backup file being leaked and tampered, which in turn leads to illegal access and data leakage of the data protected by the key.
By reading the key recovery information, the hash value of the archived record to be verified and compared with the hash value of the archived record that is stored in advance. If it is equal, the key encryption key is decrypted, its hash value is calculated and compared. If it is equal, the key to be recovered is restored to reduce the chance of illegal key recovery.
It effectively reduces the chance of successfully recovering the key with unauthorized keys, and reduces the risk of illegal access and leakage of data.
Smart Images

Figure CN118555059B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology security technology, and in particular to an intelligent implementation method and device for key recovery. Background Art
[0002] Key recovery is a technique to recover keys in the event that they are lost, damaged, or stolen. In data encryption, if the keys are lost or damaged, the encrypted data will also be inaccessible, resulting in permanent loss of information. To prevent this, or to meet legal and regulatory requirements, key recovery mechanisms are designed to recover or reconstruct keys. Such mechanisms are critical to maintaining data availability and compliance, especially in enterprise and government environments where the need for data recovery may become particularly important due to legal investigations, compliance audits, or data backups.
[0003] In the industry, a common key recovery method is to encrypt the key backup file with a strong password and store it, and set up identity authentication for accessing the encrypted key backup file. However, as computer computing power becomes increasingly powerful, strong passwords are also at risk of being cracked, resulting in the key backup file being leaked and tampered with. Injecting the tampered key backup file into the key management system for recovery will cause illegal access to the data protected by the key and data leakage. Summary of the invention
[0004] The present invention provides an intelligent key recovery implementation method and device, which can reduce the probability of successfully recovering a key using an unauthorized key recovery file and reduce the risk of illegal access and leakage of data.
[0005] In order to solve the above technical problems, the first aspect of the present invention discloses an intelligent implementation method for key recovery, the method comprising:
[0006] Reading key recovery information, the key recovery information includes a protected key information set to be verified, a key encryption key to be verified encrypted by a security key, and an archive record to be verified, the protected key information set to be verified includes key records of all keys to be recovered, each of the key records includes an encrypted key to be recovered, the archive record to be verified includes an encrypted key encryption key hash value, and the security key refers to a key that can only be accessed in a protected area;
[0007] Calculating the hash value of the archived record to be verified to obtain the hash value of the archived record to be verified, and determining whether the hash value of the archived record to be verified is equal to a pre-stored hash value of the archived record, wherein the hash value of the archived record refers to the hash value of the archived record;
[0008] If the hash value of the archived record to be verified is equal to the hash value of the archived record, the encrypted key encryption key to be verified is decrypted using the security key to obtain the key encryption key to be verified, the hash value of the key encryption key to be verified is calculated to obtain the key encryption key hash value to be verified, the encrypted key encryption key hash value is decrypted using the security verification private key in the protection area to obtain the key encryption key hash value, and the key encryption key hash value is compared with the key encryption key hash value to be verified to see if they are equal, the security verification private key being the private key in the asymmetric key generated in the protection area;
[0009] If the key encryption key hash value is equal to the key encryption key hash value to be verified, all the keys to be recovered are recovered according to the key recovery information, and the key encryption key to be verified is recovered to obtain the key encryption key, and the storage key is recovered to obtain the key to be recovered.
[0010] As an optional implementation manner, in the first aspect of the present invention, all the keys to be recovered are recovered according to the key recovery information, the key encryption key to be verified is recovered to obtain the key encryption key, and the storage key is recovered to obtain the key to be recovered, including:
[0011] Decrypting the encrypted keys to be restored in all the key records in the protection area using the key encryption key to be verified, to obtain all the keys to be restored;
[0012] Using the key encryption key to be verified as the key encryption key, and using the key to be recovered as the storage key;
[0013] The key encryption key and all the storage keys are stored in the protected area. For the storage keys that are predetermined to be stored in the open area, they are encrypted with the key encryption key and stored in the open area. All the storage keys are encrypted with the key encryption key and stored in the database.
[0014] As an optional implementation, in the first aspect of the present invention, before recovering all the keys to be recovered according to the key recovery information, the intelligent implementation method of key recovery further includes:
[0015] Decrypting the encrypted keys to be restored in all the key records in the protection area using the key encryption key to be verified, and obtaining all the keys to be restored as a set of keys to be traversed;
[0016] The key set to be traversed is traversed to search for each test key in the pre-stored test key set. If all the test keys in the test key set are found, the operation of restoring all the keys to be restored according to the key recovery information is triggered.
[0017] As an optional implementation, in the first aspect of the present invention, the test key set is pre-stored in the protection area;
[0018] And, in the protection area, the encrypted keys to be restored in all the key records are decrypted using the key encryption key to be verified, and all the keys to be restored are obtained as the key set to be traversed, specifically including:
[0019] The encrypted keys to be restored in all key records with verification identifiers are decrypted in the protection area using the key encryption key to be verified, and all the keys to be restored are obtained as a set of keys to be traversed.
[0020] As an optional implementation, in the first aspect of the present invention, the key encryption key to be verified refers to a plurality of keys generated in the protection area based on the security key and different quantum random numbers according to predefined different business rules; each of the keys to be recovered corresponds to a key encryption key to be verified according to a strategy selected according to predefined business rules.
[0021] As an optional implementation, in the first aspect of the present invention, after all the keys to be recovered are recovered according to the key recovery information, the intelligent implementation method of key recovery further includes:
[0022] Find out all the key encryption keys whose business rules are the same as the predefined business rules to be discarded as the key encryption keys to be deleted;
[0023] Deleting all the key encryption keys to be deleted in the protection area;
[0024] The storage key corresponding to the key encryption key to be deleted in the database is deleted from the protection area.
[0025] As an optional implementation, in the first aspect of the present invention, before recovering all the keys to be recovered according to the key recovery information, the intelligent implementation method of key recovery further includes:
[0026] Receive M different key components from different administrators, and recover the system management encryption private key based on the M key components according to the Shamir secret sharing protocol. One of the key components refers to one of the N key components obtained by splitting the system management encryption private key according to the Shamir secret sharing protocol, where 1 < M ≤ N, and M represents the minimum number of key components required to recover the system management encryption private key;
[0027] Use the system management encryption private key to decrypt the to-be-verified encrypted system management password encrypted with the system management encryption public key in the open area to obtain the to-be-verified encrypted system management password. The system management encryption public key and the system management encryption private key are a pair of pre-generated asymmetric keys;
[0028] Compare the to-be-verified encrypted system management password with the encrypted system management password saved in the protected area. If the two are equal, trigger the operation of recovering all the to-be-recovered keys using the key recovery information.
[0029] The second aspect of the present invention discloses an intelligent implementation device for key recovery, and the device includes:
[0030] A reading module, configured to read key recovery information, where the key recovery information includes a to-be-verified protected key information set, a to-be-verified key encryption key encrypted with a security key, and a to-be-verified archival record. The to-be-verified protected key information set includes key records of all to-be-recovered keys, and each key record includes an encrypted to-be-recovered key. The to-be-verified archival record includes a hashed value of the encrypted key encryption key. The security key refers to a key that can only be accessed within the protected area;
[0031] A judgment module, configured to calculate the hashed value of the to-be-verified archival record to obtain a to-be-verified archival record hashed value, and judge whether the to-be-verified archival record hashed value is equal to a pre-stored archival record hashed value. The archival record hashed value refers to the hashed value of the archival record;
[0032] A second judgment module, configured to, when the judgment module determines that the to-be-verified archival record hashed value is equal to the archival record hashed value, decrypt the encrypted to-be-verified key encryption key using the security key to obtain the to-be-verified key encryption key, calculate the hashed value of the to-be-verified key encryption key to obtain a to-be-verified key encryption key hashed value, decrypt the hashed value of the encrypted key encryption key using a security verification private key within the protected area to obtain a key encryption key hashed value, and compare whether the key encryption key hashed value is equal to the to-be-verified key encryption key hashed value. The security verification private key is the private key in the asymmetric keys generated within the protected area;
[0033] A recovery module is used to recover all the keys to be recovered according to the key recovery information when the second judgment module determines that the key encryption key hash value is equal to the key encryption key hash value to be verified, and obtain the key encryption key after the key encryption key to be verified is recovered, and obtain the storage key after the key to be recovered is recovered.
[0034] As an optional implementation manner, in the second aspect of the present invention, all the keys to be recovered are recovered according to the key recovery information, the key encryption key to be verified is recovered to obtain the key encryption key, and the storage key is recovered to obtain the key to be recovered, including:
[0035] Decrypting the encrypted keys to be restored in all the key records in the protection area using the key encryption key to be verified, to obtain all the keys to be restored;
[0036] Using the key encryption key to be verified as the key encryption key, and using the key to be recovered as the storage key;
[0037] The key encryption key and all the storage keys are stored in the protected area. For the storage keys that are predetermined to be stored in the open area, they are encrypted with the key encryption key and stored in the open area. All the storage keys are encrypted with the key encryption key and stored in the database.
[0038] As an optional implementation mode, in the second aspect of the present invention, the intelligent implementation device for key recovery further includes:
[0039] A search module, used for decrypting the encrypted keys to be restored in all the key records in the protection area using the key encryption key to be verified before restoring all the keys to be restored according to the key recovery information, and obtaining all the keys to be restored as a key set to be traversed;
[0040] And, traverse the key set to be traversed, search for each test key in the pre-stored test key set, and if all the test keys in the test key set are found, trigger the operation of restoring all the keys to be restored according to the key recovery information.
[0041] As an optional implementation, in the second aspect of the present invention, the test key set is pre-stored in the protection area;
[0042] Moreover, in the protection area, use the key for verifying the key to decrypt the encrypted key to be restored in all the key records, and all the obtained keys to be restored are used as the key set to be traversed, which specifically includes:
[0043] In the protection area, use the key for verifying the key to decrypt the encrypted key to be restored in all the key records with attached verification identifiers, and all the obtained keys to be restored are used as the key set to be traversed.
[0044] As an optional implementation manner, in the second aspect of the present invention, the key for verifying the key refers to a plurality of keys generated based on the security key and different quantum random numbers according to predefined different service rules in the protection area; each key to be restored corresponds to a key for verifying the key according to a predefined service rule selection strategy.
[0045] As an optional implementation manner, in the second aspect of the present invention, the intelligent implementation device for key restoration further includes:
[0046] A deletion module, configured to, after restoring all the keys to be restored according to the key restoration information, find out all the keys for encrypting the key whose service rules are the same as the predefined service rules to be discarded as the keys for encrypting the key to be deleted;
[0047] Delete all the keys for encrypting the key to be deleted in the protection area;
[0048] Delete the stored key corresponding to the key for encrypting the key to be deleted in the protection area and the database.
[0049] As an optional implementation manner, in the second aspect of the present invention, the intelligent implementation device for key restoration further includes:
[0050] A second restoration module, configured to, before restoring all the keys to be restored according to the key restoration information, receive M different key components from different administrators, and restore the system management encryption private key based on the M key components according to the Shamir secret sharing protocol. One key component refers to one of the N key components obtained by splitting the system management encryption private key according to the Shamir secret sharing protocol, 1 < M ≤ N, and M represents the minimum number of key components required to restore the system management encryption private key;
[0051] A decryption module, configured to use the system management encryption private key to decrypt the encrypted system management password to be verified encrypted with the system management encryption public key in the open area, and obtain the encrypted system management password to be verified. The system management encryption public key and the system management encryption private key are a pair of pre-generated asymmetric keys;
[0052] The third judgment module is used to compare the encryption system management password to be verified with the encryption system management password stored in the protection area. If the two are equal, it triggers the operation of executing the key recovery information to recover all the keys to be recovered.
[0053] The third aspect of the present invention discloses another intelligent implementation device for key recovery, the device comprising:
[0054] A memory storing executable program code;
[0055] a processor coupled to the memory;
[0056] The processor calls the executable program code stored in the memory to execute the intelligent implementation method for key recovery disclosed in the first aspect of the present invention.
[0057] The fourth aspect of the present invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the intelligent implementation method for key recovery disclosed in the first aspect of the present invention.
[0058] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0059] The present invention obtains a credible archive record by comparing the hash value of the archive record to be verified with the pre-stored archive record hash value; decrypts the encrypted key encryption key hash value in the credible archive record in a secure area to obtain a credible key encryption key hash value, and obtains a credible key encryption key by comparing the key encryption key hash values; recovers the key to be recovered based on the credible key encryption key, reduces the probability of illegal keys being erroneously recovered to memory and database, effectively reduces the probability of recovering keys by recovering files with unauthorized keys, and further reduces the risk of illegal access and leakage of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0061] Figure 1 It is a flow chart of an intelligent implementation method of key recovery disclosed in an embodiment of the present invention;
[0062] Figure 2It is a schematic diagram of a process of splitting an encryption system management password using the Shamir secret sharing protocol disclosed in an embodiment of the present invention;
[0063] Figure 3 It is a structural schematic diagram of an intelligent key recovery implementation device disclosed in an embodiment of the present invention;
[0064] Figure 4 It is a structural schematic diagram of another intelligent key recovery implementation device disclosed in an embodiment of the present invention;
[0065] Figure 5 It is a structural diagram of another intelligent key recovery implementation device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0067] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or end including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or ends.
[0068] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0069] The present invention discloses an intelligent key recovery method and device, which can reduce the probability of using unauthorized keys to recover files and keys, and further reduce the risk of illegal access and leakage of data. The following are detailed descriptions.
[0070] Embodiment 1
[0071] See also Figure 1, Figure 1 1 is a flow chart of an intelligent implementation method for key recovery disclosed in an embodiment of the present invention. Figure 1 The described intelligent implementation method of key recovery can be applied to any operating system that supports protection zones provided by any vendor, such as ARM's TrustZone system, and the embodiments of the present invention are not limited thereto. Figure 1 As shown, the intelligent implementation method of key recovery may include the following operations:
[0072] 101. Read key recovery information, the key recovery information includes a protected key information set to be verified, a key encryption key to be verified encrypted by a security key, and an archive record to be verified. The protected key information set to be verified includes key records of all keys to be recovered, each key record includes an encrypted key to be recovered, and the archive record to be verified includes an encrypted key encryption key hash value. The security key refers to a key that can only be accessed in the protection area.
[0073] In this embodiment, the security key can be a system startup key, a system root key, or other keys that can be accessed in the protected area, which is not limited in the embodiment of the present invention. The carrier format of the key recovery information can be a file or a network data stream, which is not limited in the embodiment of the present invention.
[0074] 102. Calculate the hash value of the archived record to be verified, obtain the hash value of the archived record to be verified, and determine whether the hash value of the archived record to be verified is equal to the pre-stored hash value of the archived record, where the hash value of the archived record refers to the hash value of the archived record;
[0075] In this embodiment, the archive record includes the encrypted key encryption key hash value, and may also include one or more of the key archiving date, and / or archiver information, and / or the key manager's private key signature.
[0076] In this embodiment, the pre-stored archive record hash value refers to the value obtained by performing hash calculation on the archive record when the key is archived. The hash function used to calculate the hash value of the archive record to be verified should be the same as the hash function used to perform hash calculation on the archive record when the key is archived.
[0077] In this embodiment, the pre-stored archived record hash value may be stored in an encrypted state, and its decryption can only be performed in the protection area to reduce the risk of the archived record hash value being tampered with.
[0078] 103. If the hash value of the archived record to be verified is equal to the hash value of the archived record, the encrypted key encryption key to be verified is decrypted using the security key to obtain the key encryption key to be verified, the hash value of the key encryption key to be verified is calculated to obtain the key encryption key hash value to be verified, the encrypted key encryption key hash value is decrypted using the security verification private key in the protection area to obtain the key encryption key hash value, and the key encryption key hash value is compared with the key encryption key hash value to be verified to see if they are equal, the security verification private key is the private key in the asymmetric key generated in the protection area;
[0079] In this embodiment, the protection area refers to a hardware-isolated execution area based on confidential computing, which can ensure the integrity and confidentiality of code and data. Even if the operating system or management software is attacked, the security area can prevent unauthorized access or modification of sensitive data therein. The hash function used when calculating the hash value of the key encryption key to be verified should be the same as the hash function used when generating the key encryption key hash value when the key is archived.
[0080] 104. If the key encryption key hash value is equal to the key encryption key hash value to be verified, all keys to be recovered are recovered according to the key recovery information, and the key encryption key is obtained after the key encryption key to be verified is recovered, and the storage key is obtained after the key to be recovered is recovered.
[0081] It can be seen that this embodiment obtains a trusted archive record by comparing the hash value of the archive record to be verified with the hash value of the pre-stored archive record; decrypts the encrypted key-encrypted key hash value in the trusted archive record in the security area to obtain a trusted key-encrypted key hash value, and obtains a trusted key-encrypted key by comparing the key-encrypted key hash value; recovers the key to be recovered based on the trusted key-encrypted key, reduces the probability of illegal keys being erroneously recovered to the memory and database, effectively reduces the probability of recovering keys by recovering files with unauthorized keys, and further reduces the risk of illegal access and leakage of data.
[0082] In an optional embodiment, all keys to be recovered are recovered according to the key recovery information, the key encryption key is obtained after the key encryption key to be verified is recovered, and the storage key is obtained after the key to be recovered is recovered, including:
[0083] Decrypt the encrypted keys to be recovered in all key records using the key encryption key to be verified in the protection area to obtain all keys to be recovered;
[0084] Using the key encryption key to be verified as the key encryption key and using the key to be recovered as the storage key;
[0085] The key encryption key and all storage keys are stored in the protected area. For the storage keys that are predetermined to be stored in the open area, they are encrypted with the key encryption key and stored in the open area. All storage keys are encrypted with the key encryption key and stored in the database.
[0086] In this optional embodiment, the storage key is predetermined to be stored in a protected area or an open area based on its business attributes or security requirements. For example, a session key used by a module itself in an open area with business attributes can be stored in the open area, while a key for a terminal user with business attributes should be stored in a protected area.
[0087] It can be seen that this optional embodiment uses the key encryption key to be verified to decrypt the key to be recovered in a protected area, thereby ensuring that only the key encryption key that has passed verification can be used to decrypt the key to be recovered, thereby improving the security of key recovery; only the predetermined storage key will be saved in an open area after encryption, which greatly reduces the exposure scope of sensitive information and enhances data security.
[0088] In another optional embodiment, before all keys to be recovered are recovered according to the key recovery information, the intelligent implementation method of key recovery further includes:
[0089] Decrypt the encrypted keys to be recovered in all key records using the key encryption key to be verified in the protection area, and obtain all the keys to be recovered as the key set to be traversed;
[0090] The key set to be traversed is traversed to search for each test key in the pre-stored test key set. If all the test keys in the test key set are found, an operation of restoring all the keys to be restored according to the key recovery information is triggered.
[0091] It can be seen that this embodiment traverses the key set to be traversed to find each test key in the test key set. Only when all test keys are successfully matched, the key recovery operation is allowed to continue, which reduces the risk of incorrect key recovery due to data corruption or malicious tampering, improves the accuracy of the key recovery process, thereby further ensuring data security and reducing the possibility of data leakage.
[0092] In yet another optional embodiment, the test key set is pre-stored in a protected area;
[0093] And, in the protection area, the encrypted keys to be recovered in all key records are decrypted using the key encryption key to be verified, and all the keys to be recovered are obtained as the key set to be traversed, specifically including:
[0094] In the protection area, the encrypted keys to be restored in all key records with verification identifiers are decrypted using the key encryption key to be verified, and all the keys to be restored are obtained as the key set to be traversed.
[0095] In this optional embodiment, the attached verification mark may refer to adding a special field to identify the key to be recovered, or adding a special field in the protected key information set to specify which keys to be recovered need to be compared with the test key, which is not limited by the embodiment of the present invention.
[0096] It can be seen that this optional embodiment specifies the key range for comparison with the test key by attaching a verification mark, accurately limits the key range for comparison with the test key, improves the accuracy of the comparison result with the test key, reduces the probability of recovering the key by using an unauthorized key to recover the file, and further reduces the risk of illegal access and leakage of data. Moreover, by limiting the key range for comparison with the test key, the amount of data that needs to be compared can be reduced, and the efficiency of key recovery can be improved.
[0097] In another optional embodiment, the key encryption key to be verified refers to multiple keys generated in a protection area based on security keys and different quantum random numbers according to predefined different business rules; each key to be recovered corresponds to a key encryption key to be verified according to a strategy selected according to predefined business rules.
[0098] In this optional embodiment, a key encryption key is generated according to business rules, for example, based on a time series, or generated by device type, or generated by business type, or generated by the deployment area of the device applying for the key, or generated by the type of the device applying for the key, or generated by the confidentiality level of the key, or generated by the effective duration of the key. The business rule selection strategy refers to the priority of the business rule, for example, the corresponding key encryption key is searched first according to the confidentiality level, and then according to the effective duration of the key; under this business rule selection strategy, a key to be recovered first corresponds to a key encryption key according to its own confidentiality level, and if it does not define a confidentiality level, it corresponds to a key encryption key according to its effective duration.
[0099] It can be seen that this optional embodiment decrypts the key to be recovered based on multiple key encryption keys generated based on business rules, and each key to be recovered is associated with a specific key encryption key, thereby increasing the complexity of key recovery. Even if an attacker obtains a key encryption key, he can only decrypt a portion of the key to be recovered corresponding to it, which effectively reduces the risk of single point failure and enhances the security of the key recovery process.
[0100] In yet another alternative embodiment, after all the keys to be recovered are recovered according to the key recovery information, the intelligent implementation method for key recovery further includes:
[0101] Find all key encryption keys whose business rules are the same as the predefined business rules to be discarded as the key encryption keys to be deleted;
[0102] Delete all the key encryption keys to be deleted in the protected area;
[0103] Delete the storage keys corresponding to the key encryption keys to be deleted in the protected area and the database.
[0104] In this alternative embodiment, the business rules to be discarded are, for example, that the key generation time is earlier than January 1, 2023, or the valid duration exceeds 2 years, or the business type is a test password.
[0105] It can be seen that this alternative embodiment provides batch processing of keys corresponding to insecure business rules by finding and deleting those keys that meet the business rules to be discarded, reducing the risk of key leakage and enhancing data security; moreover, batch deleting passwords for key encryption keys improves the efficiency of the password deletion process.
[0106] In yet another alternative embodiment, before all the keys to be recovered are recovered according to the key recovery information, the intelligent implementation method for key recovery further includes:
[0107] Receive M different key components from different administrators, and recover the system management encryption private key based on the M key components according to the Shamir secret sharing protocol. A key component refers to one of the N key components obtained by splitting the system management encryption private key according to the Shamir secret sharing protocol, where 1 < M ≤ N, and M represents the minimum number of key components required to recover the system management encryption private key;
[0108] Use the system management encryption private key to decrypt the encrypted system management password to be verified encrypted with the system management encryption public key in the open area to obtain the encrypted system management password to be verified. The system management encryption public key and the system management encryption private key are a pair of pre-generated asymmetric keys;
[0109] Compare the encrypted system management password to be verified with the encrypted system management password saved in the protected area. If they are equal, trigger the operation of recovering all the keys to be recovered according to the key recovery information.
[0110] In this alternative embodiment, the encrypted system management password refers to the key generated based on quantum random numbers in the protected area, which can be used for permission control of key recovery, key destruction, and key archiving.
[0111] The following is to generate the encrypted system management password Kadmin And use the encryption system to manage the password K admin Example of performing key recovery verification:
[0112] Generate an encrypted system management password K in the protection area admin , System management encryption public key AK pub Manage encryption private key AK with the system pri ,Use the key encryption key PSK to encrypt the three and save them;
[0113] Use the system management encryption public key AK in the protection area pub Management password K for encryption system admin Encrypting the encrypted system management password to obtain the encrypted password, and saving it in an open area;
[0114] 5 different administrators each generate their own asymmetric keys, where the administrator public key {K pub1 ,K pub2 ,K pub3 ,K pub4 ,K pub5}public;
[0115] The system management encryption private key AK is stored in the protection area. pri According to the Shamir secret sharing protocol, the key is split into five key components, which are encrypted with five administrator public keys to obtain the encrypted key components {AK s1 ,AK s2 ,AK s3 ,AK s4 ,AK s5}, restore the system management encryption private key AK pri The minimum number of key components required is 3;
[0116] Each key component is distributed to the administrator corresponding to the administrator public key corresponding to the key component. Each administrator uses his own administrator private key to decrypt it to obtain the key component. The splitting process of the encryption system management password is as follows: Figure 2 As shown;
[0117] Before key recovery, three key components are randomly obtained from the five administrators, and the system management encryption private key AK is recovered in the protection area according to the Shamir secret sharing protocol. pri ;
[0118] Use the system management encryption private key AK in the protection area pri Decrypt the encrypted encryption system management password to obtain the encryption system management password to be verified;
[0119] In the protected area, the key encryption key PSK is used to decrypt the encrypted system management password Kadmin , compare it with the encryption system management password to be verified, and if the two are equal, perform the key recovery operation.
[0120] It can be seen that this optional embodiment implements multi-factor authentication by requiring multiple administrators to provide different key components to recover the private key; moreover, the key recovery operation will only be triggered when the encryption system management password to be verified is the same as the encryption system management password in the protection area, thereby enhancing the security of the key recovery process.
[0121] Embodiment 2
[0122] See also Figure 3 , Figure 3 1 is a schematic diagram of a structure of an intelligent key recovery device disclosed in an embodiment of the present invention. Figure 3 The device shown can be applied to any operating system that supports protection areas provided by any vendor, such as ARM's TrustZone system, and the embodiment of the present invention is not limited thereto. Figure 3 The device shown includes:
[0123] The reading module 301 is used to read the key recovery information, wherein the key recovery information includes a protected key information set to be verified, a key encryption key to be verified encrypted by a security key, and an archive record to be verified, wherein the protected key information set to be verified includes key records of all keys to be recovered, each key record includes an encrypted key to be recovered, and the archive record to be verified includes an encrypted key encryption key hash value, and the security key refers to a key that can only be accessed in a protected area;
[0124] The judgment module 302 is used to calculate the hash value of the archived record to be verified, obtain the hash value of the archived record to be verified, and judge whether the hash value of the archived record to be verified is equal to the pre-stored hash value of the archived record, where the hash value of the archived record refers to the hash value of the archived record;
[0125] The second judgment module 303 is used to, when the judgment module 302 judges that the archived record hash value to be verified is equal to the archived record hash value, decrypt the encrypted key encryption key to be verified by using the security key to obtain the key encryption key to be verified, calculate the hash value of the key encryption key to be verified to obtain the key encryption key hash value to be verified, decrypt the encrypted key encryption key hash value in the protection area by using the security verification private key to obtain the key encryption key hash value, compare whether the key encryption key hash value is equal to the key encryption key hash value to be verified, and the security verification private key is the private key in the asymmetric key generated in the protection area;
[0126] The recovery module 304 is used to recover all the keys to be recovered according to the key recovery information when the second judgment module 303 determines that the key encryption key hash value is equal to the key encryption key hash value to be verified, and obtain the key encryption key after the key encryption key to be verified is recovered, and obtain the storage key after the key to be recovered is recovered.
[0127] It can be seen that this embodiment obtains a trusted archive record by comparing the hash value of the archive record to be verified with the hash value of the pre-stored archive record; decrypts the encrypted key-encrypted key hash value in the trusted archive record in the security area to obtain a trusted key-encrypted key hash value, and obtains a trusted key-encrypted key by comparing the key-encrypted key hash value; recovers the key to be recovered based on the trusted key-encrypted key, reduces the probability of illegal keys being erroneously recovered to the memory and database, effectively reduces the probability of recovering keys by recovering files with unauthorized keys, and further reduces the risk of illegal access and leakage of data.
[0128] In an optional embodiment, all keys to be recovered are recovered according to the key recovery information, the key encryption key is obtained after the key encryption key to be verified is recovered, and the storage key is obtained after the key to be recovered is recovered, including:
[0129] Decrypt the encrypted keys to be recovered in all key records using the key encryption key to be verified in the protection area to obtain all keys to be recovered;
[0130] Using the key encryption key to be verified as the key encryption key and using the key to be recovered as the storage key;
[0131] The key encryption key and all storage keys are stored in the protected area. For the storage keys that are predetermined to be stored in the open area, they are encrypted with the key encryption key and stored in the open area. All storage keys are encrypted with the key encryption key and stored in the database.
[0132] It can be seen that this optional embodiment uses the key encryption key to be verified to decrypt the key to be recovered in a protected area, thereby ensuring that only the key encryption key that has passed verification can be used to decrypt the key to be recovered, thereby improving the security of key recovery; only the predetermined storage key will be saved in an open area after encryption, which greatly reduces the exposure scope of sensitive information and enhances data security.
[0133] In another optional embodiment, Figure 4 As shown, the intelligent implementation device for key recovery also includes:
[0134] A search module 305 is used to decrypt the encrypted keys to be recovered in all key records in the protection area using the key encryption key to be verified before recovering all the keys to be recovered according to the key recovery information, and obtain all the keys to be recovered as the key set to be traversed;
[0135] And, traverse the key set to be traversed, search for each test key in the pre-stored test key set, and if all the test keys in the test key set are found, trigger an operation of restoring all the keys to be restored according to the key recovery information.
[0136] It can be seen that this embodiment traverses the key set to be traversed to find each test key in the test key set. Only when all test keys are successfully matched, the key recovery operation is allowed to continue, which reduces the risk of incorrect key recovery due to data corruption or malicious tampering, improves the accuracy of the key recovery process, thereby further ensuring data security and reducing the possibility of data leakage.
[0137] In yet another optional embodiment, the test key set is pre-stored in a protected area;
[0138] And, in the protection area, the encrypted keys to be recovered in all key records are decrypted using the key encryption key to be verified, and all the keys to be recovered are obtained as the key set to be traversed, specifically including:
[0139] In the protection area, the encrypted keys to be restored in all key records with verification identifiers are decrypted using the key encryption key to be verified, and all the keys to be restored are obtained as the key set to be traversed.
[0140] It can be seen that this optional embodiment specifies the key range for comparison with the test key by attaching a verification mark, accurately limits the key range for comparison with the test key, improves the accuracy of the comparison result with the test key, reduces the probability of recovering the key by using an unauthorized key to recover the file, and further reduces the risk of illegal access and leakage of data. Moreover, by limiting the key range for comparison with the test key, the amount of data that needs to be compared can be reduced, and the efficiency of key recovery can be improved.
[0141] In another optional embodiment, the key encryption key to be verified refers to multiple keys generated in a protection area based on security keys and different quantum random numbers according to predefined different business rules; each key to be recovered corresponds to a key encryption key to be verified according to a strategy selected according to predefined business rules.
[0142] It can be seen that in this alternative embodiment, multiple key encryption keys generated based on business rules are used to decrypt the keys to be restored. Each key to be restored is associated with a specific key encryption key, thereby increasing the complexity during key restoration. Even if an attacker obtains a key encryption key, they can only decrypt a part of the keys to be restored corresponding to it, effectively reducing the risk of single point of failure and enhancing the security of the key restoration process.
[0143] In yet another alternative embodiment, as Figure 4 shown, the intelligent implementation device for key restoration further includes:
[0144] A deletion module 306, configured to, after restoring all keys to be restored according to key restoration information, find all key encryption keys whose business rules are the same as the predefined business rules to be discarded as the key encryption keys to be deleted;
[0145] Delete all key encryption keys to be deleted in the protected area;
[0146] Delete the storage keys corresponding to the key encryption keys to be deleted in the protected area and the database.
[0147] It can be seen that this alternative embodiment provides batch processing of keys corresponding to insecure business rules by finding and deleting those keys that conform to the business rules to be discarded, reducing the risk of key leakage and enhancing data security; moreover, the batch deletion of key encryption keys improves the efficiency of the password deletion process.
[0148] In yet another alternative embodiment, as Figure 4 shown, the intelligent implementation device for key restoration further includes:
[0149] A second restoration module 307, configured to, before restoring all keys to be restored according to key restoration information, receive M different key components from different administrators, and restore the system management encryption private key based on the M key components according to the Shamir secret sharing protocol. A key component refers to one of the N key components obtained by splitting the system management encryption private key according to the Shamir secret sharing protocol, where 1 < M ≤ N, and M represents the minimum number of key components required to restore the system management encryption private key;
[0150] A decryption module 308, configured to use the system management encryption private key to decrypt the encrypted system management password to be verified encrypted with the system management encryption public key in the open area to obtain the encrypted system management password to be verified. The system management encryption public key and the system management encryption private key are a pair of pre-generated asymmetric keys;
[0151] The third judgment module 309 is used to compare the encryption system management password to be verified with the encryption system management password stored in the protection area. If the two are equal, it triggers the operation of executing the key recovery information to recover all the keys to be recovered.
[0152] It can be seen that this optional embodiment implements multi-factor authentication by requiring multiple administrators to provide different key components to recover the private key; moreover, the key recovery operation will only be triggered when the encryption system management password to be verified is the same as the encryption system management password in the protection area, thereby enhancing the security of the key recovery process.
[0153] Embodiment 3
[0154] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the structure of another intelligent key recovery device disclosed in an embodiment of the present invention. Figure 5 As shown, the intelligent implementation device for key recovery may include:
[0155] A memory 501 storing executable program codes;
[0156] a processor 502 coupled to the memory 501;
[0157] Furthermore, it may also include an input interface 503 and an output interface 504 coupled to the processor 502;
[0158] The processor 502 calls the executable program code stored in the memory 501 to execute the steps of the intelligent implementation method for key recovery described in the first embodiment of the present invention.
[0159] Embodiment 4
[0160] The embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps of the intelligent implementation method of key recovery described in the first embodiment of the present invention or the second embodiment of the present invention.
[0161] Embodiment 5
[0162] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the intelligent implementation method of key recovery described in the first embodiment.
[0163] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0164] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.
[0165] Finally, it should be noted that the intelligent implementation method and device for key recovery disclosed in the embodiment of the present invention discloses only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that it is still possible to modify the technical solutions recorded in the aforementioned embodiments, or to replace some of the technical features therein by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An intelligent method for key recovery, characterized in that: The method comprises: Reading key recovery information, the key recovery information includes a protected key information set to be verified, a key encryption key to be verified encrypted by a security key, and an archive record to be verified, the protected key information set to be verified includes key records of all keys to be recovered, each of the key records includes an encrypted key to be recovered, the archive record to be verified includes an encrypted key encryption key hash value, and the security key refers to a key that can only be accessed in a protected area; Calculating the hash value of the archived record to be verified to obtain the hash value of the archived record to be verified, and determining whether the hash value of the archived record to be verified is equal to a pre-stored hash value of the archived record, wherein the hash value of the archived record refers to the hash value of the archived record; If the hash value of the archived record to be verified is equal to the hash value of the archived record, the encrypted key encryption key to be verified is decrypted using the security key to obtain the key encryption key to be verified, the hash value of the key encryption key to be verified is calculated to obtain the key encryption key hash value to be verified, the encrypted key encryption key hash value is decrypted using the security verification private key in the protection area to obtain the key encryption key hash value, and the key encryption key hash value is compared with the key encryption key hash value to be verified to see if they are equal, the security verification private key being the private key in the asymmetric key generated in the protection area; If the key encryption key hash value is equal to the key encryption key hash value to be verified, decrypt the encrypted keys to be restored in all the key records in the protection area using the key encryption key to be verified, and obtain all the keys to be restored as the key set to be traversed; The key set to be traversed is traversed to search for each test key in the pre-stored test key set. If all the test keys in the test key set are found, all the keys to be recovered are recovered according to the key recovery information. After the key encryption key to be verified is recovered, the key encryption key is obtained, and after the key to be recovered is recovered, the storage key is obtained.
2. The intelligent implementation method for key recovery according to claim 1, characterized in that: The method further comprises: restoring all the keys to be restored according to the key recovery information, obtaining a key encryption key after the key encryption key to be verified is restored, and obtaining a storage key after the key to be restored is restored, including: Decrypting the encrypted keys to be restored in all the key records in the protection area using the key encryption key to be verified, to obtain all the keys to be restored; Using the key encryption key to be verified as the key encryption key, and using the key to be recovered as the storage key; The key encryption key and all the storage keys are stored in the protected area. For the storage keys that are predetermined to be stored in the open area, they are encrypted with the key encryption key and stored in the open area. All the storage keys are encrypted with the key encryption key and stored in the database.
3. The intelligent implementation method for key recovery according to claim 1, characterized in that: The test key set is pre-stored in the protection area; And, in the protection area, the encrypted keys to be restored in all the key records are decrypted using the key encryption key to be verified, and all the keys to be restored are obtained as the key set to be traversed, specifically including: The encrypted keys to be restored in all key records with verification identifiers are decrypted in the protection area using the key encryption key to be verified, and all the keys to be restored are obtained as a set of keys to be traversed.
4. The intelligent implementation method for key recovery according to claim 1, characterized in that: The key encryption key to be verified refers to multiple keys generated in the protection area based on the security key and different quantum random numbers according to predefined different business rules; each key to be recovered corresponds to one of the key encryption keys to be verified according to a strategy selected according to predefined business rules.
5. The intelligent implementation method for key recovery according to claim 4, characterized in that: After all the keys to be restored according to the key restoration information are restored, the method further includes: Find out all the key encryption keys whose business rules are the same as the predefined business rules to be discarded as the key encryption keys to be deleted; Deleting all the key encryption keys to be deleted in the protection area; The storage key corresponding to the key encryption key to be deleted in the database and the protection area is deleted.
6. The intelligent implementation method for key recovery according to claim 1, characterized in that: Before restoring all the keys to be restored according to the key recovery information, the method further includes: Receive from different administrators Different key components, according to the Shamir secret sharing protocol based on The key component restores the system management encryption private key, and the key component refers to the system management encryption private key split according to the Shamir secret sharing protocol One of the key components, , represents the minimum number of key components required to recover the system managed encryption private key; Decrypting the encrypted system management password to be verified in the open area after being encrypted using the system management encryption public key using the system management encryption private key to obtain the encrypted system management password to be verified, wherein the system management encryption public key and the system management encryption private key are a pair of pre-generated asymmetric keys; The encryption system management password to be verified is compared with the encryption system management password stored in the protection area. If the two are equal, an operation of executing the key recovery information to recover all the keys to be recovered is triggered.
7. An intelligent key recovery device, characterized in that: The device comprises: a reading module, configured to read key recovery information, wherein the key recovery information includes a protected key information set to be verified, a key encryption key to be verified encrypted by a security key, and an archive record to be verified, wherein the protected key information set to be verified includes key records of all keys to be recovered, each of which includes an encrypted key to be recovered, and the archive record to be verified includes an encrypted key encryption key hash value, and the security key refers to a key that can only be accessed in a protected area; A judgment module, used for calculating the hash value of the archived record to be verified, obtaining the hash value of the archived record to be verified, and judging whether the hash value of the archived record to be verified is equal to the hash value of the archived record stored in advance, wherein the hash value of the archived record refers to the hash value of the archived record; a second judgment module, configured to, when the judgment module determines that the archived record hash value to be verified is equal to the archived record hash value, decrypt the encrypted key encryption key to be verified by using the security key to obtain the key encryption key to be verified, calculate the hash value of the key encryption key to be verified to obtain the key encryption key hash value to be verified, decrypt the encrypted key encryption key hash value by using the security verification private key in the protection area to obtain the key encryption key hash value, and compare whether the key encryption key hash value is equal to the key encryption key hash value to be verified, wherein the security verification private key is a private key in the asymmetric key generated in the protection area; a recovery module, configured to, when the second judgment module determines that the key encryption key hash value is equal to the key encryption key hash value to be verified, recover all the keys to be recovered according to the key recovery information, obtain the key encryption key after the key encryption key to be verified is recovered, and obtain the storage key after the key to be recovered is recovered; The intelligent implementation device for key recovery also includes: A search module, used for decrypting the encrypted keys to be restored in all the key records in the protection area using the key encryption key to be verified before restoring all the keys to be restored according to the key recovery information, and obtaining all the keys to be restored as a key set to be traversed; And, traverse the key set to be traversed, search for each test key in the pre-stored test key set, and if all the test keys in the test key set are found, trigger the operation of restoring all the keys to be restored according to the key recovery information.
8. An intelligent key recovery device, characterized in that: The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the intelligent implementation method for key recovery as described in any one of claims 1-6.
9. A computer storage medium, characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the intelligent implementation method for key recovery as described in any one of claims 1-6.
Citation Information
Patent Citations
Securing wireless network credentials without a user login
US10129499B1