Recovery using an encrypted fallback key in metadata
A computer-implemented method (CIM), according to one approach, includes generating a primary cryptographic recovery key, and generating an alternate cryptographic recovery key, where the alternate cryptographic recovery key is generated and stored in a cryptographic Hardware Security Module (HSM). The method further includes storing an encrypted fallback key in metadata associated with a data set, where the encrypted fallback key is an operational key encrypted by the primary cryptographic recovery key, and storing a Recovery Key Verification Pattern (RKVP) in the metadata, where the RKVP is associated with the primary cryptographic recovery key and is stored for the primary cryptographic recovery key. In response to a determination that the operational key is unavailable, the encrypted fallback key is retrieved to perform a data decryption operation.
1 . A computer-implemented method (CIM), the CIM comprising:
generating a primary cryptographic recovery key;
generating an alternate cryptographic recovery key, wherein the alternate cryptographic recovery key is generated and stored in a cryptographic Hardware Security Module (HSM), wherein the cryptographic HSM is a cryptographic key store configured to encrypt operational key(s);
storing an encrypted fallback key in metadata associated with a data set, wherein the encrypted fallback key is an operational key encrypted by the primary cryptographic recovery key, wherein the metadata is stored in a data set encryption cell that comprises a logical and physical portion of memory that is dedicated to storing key labels, Recovery Key Verification Patterns (RKVPs) and encrypted fallback keys;
storing a RKVP in the metadata in the data set encryption cell, wherein the RKVP is associated with the primary cryptographic recovery key and is stored for the primary cryptographic recovery key; and
in response to a determination that the operational key is unavailable, retrieving the encrypted fallback key to perform a data decryption operation.
2 . The CIM of claim 1 , wherein retrieving the encrypted fallback key includes: determining whether an RKVP associated with a key label of a request for the data set matches the primary cryptographic recovery key, and in response to a determination that the RKVP associated with the key label matches the primary cryptographic recovery key: using the primary cryptographic recovery key to decrypt the encrypted fallback key; using a current master key stored in the cryptographic HSM to encrypt the decrypted fallback key; generating a protected key to be used for encrypting and decrypting the data set; storing the master key encrypted fallback key in a Cryptographic Key Data Set (CKDS); and returning both the protected key and the RKVP associated with the key label to an application programming interface (API) of a system that manages use of the fallback key and the data set.
3 . The CIM of claim 2 , comprising: determining whether the RKVP associated with the key label matches the RKVP stored in the metadata; and in response to a determination that the RKVP associated with the key label does not match the RKVP stored in the metadata, storing the master key encrypted fallback key and the RKVP associated with the key label to the metadata.
4 . The CIM of claim 1 , wherein the determination that the operational key is unavailable is based on an attempt to access the data set failing and predetermined recovery actions performed in an attempt to acquire the operational key to access the data set also failing.
5 . The CIM of claim 1 , wherein the data set is encrypted by the operational key, and comprising: receiving a request for the data set; and in response to receiving the request for the data set, performing a predetermined maintenance process, wherein the predetermined maintenance process includes: causing the cryptographic HSM to generate and return a protected key to be actively used for encryption and decryption of the data set; determining whether an RKVP associated with a key label of the request for the data set matches the primary cryptographic recovery key; and in response to a determination that the RKVP associated with a key label does not match the primary cryptographic recovery key, generating a new fallback key, wherein the new fallback key is encrypted by the primary cryptographic recovery key.
6 . The CIM of claim 5 , comprising: causing the RKVP associated with a key label to be compared with the RKVP stored in the metadata; and in response to a determination, from results of the comparison, that the RKVP associated with a key label does not match the RKVP stored in the metadata, causing the new fallback key and the RKVP associated with a key label to be stored in the metadata.
7 . The CIM of claim 1 , wherein retrieving the encrypted fallback key includes: determining whether an RKVP associated with a key label of a request for the data set matches the primary cryptographic recovery key; in response to a determination that the RKVP associated with the key label does not match the primary cryptographic recovery key, determining whether the RKVP associated with the key label matches the alternate cryptographic recovery key; in response to a determination that the RKVP associated with the key label does not match the alternate cryptographic recovery key, returning a failure to a device from which request for the data set is received; and in response to a determination that the RKVP associated with the key label matches the alternate cryptographic recovery key, performing a predetermined recover process, wherein the predetermined recover process includes: using the alternate cryptographic recovery key to decrypt the encrypted fallback key; encrypting the decrypted fallback key with a current master key stored in the cryptographic HSM; encrypting the decrypted fallback key with the primary cryptographic recovery key and returning the primary cryptographic recovery key encrypted fallback key and the RKVP associated with the key label to the device; generating a protected key to be actively used for encryption and decryption of the data set; and causing the master key encrypted fallback key and the RKVP associated with the key label in a Cryptographic Key Data Set (CKDS).
8 . The CIM of claim 7 , wherein the predetermined recover process includes: determining whether the RKVP associated with the key label matches the RKVP stored in the metadata; and in response to a determination that the RKVP associated with the key label does not match the RKVP stored in the metadata, causing the primary cryptographic recovery key encrypted fallback key and the RKVP associated with the key label to be stored in the metadata.
9 . A computer program product (CPP), the CPP comprising:
a set of one or more computer-readable storage media; and
program instructions, collectively stored in the set of one or more storage media, for causing a processor set to perform the following computer operations:
generate a primary cryptographic recovery key;
generate an alternate cryptographic recovery key, wherein the alternate cryptographic recovery key is generated and stored in a cryptographic Hardware Security Module (HSM), wherein the cryptographic HSM is a cryptographic key store configured to encrypt operational key(s);
store an encrypted fallback key in metadata associated with a data set, wherein the encrypted fallback key is an operational key encrypted by the primary cryptographic recovery key, wherein the metadata is stored in a data set encryption cell that comprises a logical and physical portion of memory that is dedicated to storing key labels, Recovery Key Verification Patterns (RKVPs) and encrypted fallback keys;
store a RKVP in the metadata in the data set encryption cell, wherein the RKVP is associated with the primary cryptographic recovery key and is stored for the primary cryptographic recovery key; and
in response to a determination that the operational key is unavailable, retrieve the encrypted fallback key to perform a data decryption operation.
10 . The CPP of claim 9 , wherein retrieving the encrypted fallback key includes: determining whether an RKVP associated with a key label of a request for the data set matches the primary cryptographic recovery key, and in response to a determination that the RKVP associated with the key label matches the primary cryptographic recovery key: using the primary cryptographic recovery key to decrypt the encrypted fallback key; using a current master key stored in the cryptographic HSM to encrypt the decrypted fallback key; generating a protected key to be used for encrypting and decrypting the data set; storing the master key encrypted fallback key in a Cryptographic Key Data Set (CKDS); and returning both the protected key and the RKVP associated with the key label to an application programming interface (API) of a system that manages use of the fallback key and the data set.
11 . The CPP of claim 10 , comprising: program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations: determine whether the RKVP associated with the key label matches the RKVP stored in the metadata; and in response to a determination that the RKVP associated with the key label does not match the RKVP stored in the metadata, store the master key encrypted fallback key and the RKVP associated with the key label to the metadata.
12 . The CPP of claim 9 , wherein the determination that the operational key is unavailable is based on an attempt to access the data set failing and predetermined recovery actions performed in an attempt to acquire the operational key to access the data set also failing.
13 . The CPP of claim 9 , wherein the data set is encrypted by the operational key, and comprising: program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations: receive a request for the data set; and in response to receiving the request for the data set, perform a predetermined maintenance process, wherein the predetermined maintenance process includes: causing the cryptographic HSM to generate and return a protected key to be actively used for encryption and decryption of the data set; determining whether an RKVP associated with a key label of the request for the data set matches the primary cryptographic recovery key; and in response to a determination that the RKVP associated with a key label does not match the primary cryptographic recovery key, generating a new fallback key, wherein the new fallback key is encrypted by the primary cryptographic recovery key.
14 . The CPP of claim 13 , program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations: cause the RKVP associated with a key label to be compared with the RKVP stored in the metadata; and in response to a determination, from results of the comparison, that the RKVP associated with a key label does not match the RKVP stored in the metadata, cause the new fallback key and the RKVP associated with a key label to be stored in the metadata.
15 . The CPP of claim 9 , wherein retrieving the encrypted fallback key includes: determining whether an RKVP associated with a key label of a request for the data set matches the primary cryptographic recovery key; in response to a determination that the RKVP associated with the key label does not match the primary cryptographic recovery key, determining whether the RKVP associated with the key label matches the alternate cryptographic recovery key; in response to a determination that the RKVP associated with the key label does not match the alternate cryptographic recovery key, returning a failure to a device from which request for the data set is received; and in response to a determination that the RKVP associated with the key label matches the alternate cryptographic recovery key, performing a predetermined recover process, wherein the predetermined recover process includes: using the alternate cryptographic recovery key to decrypt the encrypted fallback key; encrypting the decrypted fallback key with a current master key stored in the cryptographic HSM; encrypting the decrypted fallback key with the primary cryptographic recovery key and returning the primary cryptographic recovery key encrypted fallback key and the RKVP associated with the key label to the device; generating a protected key to be actively used for encryption and decryption of the data set; and causing the master key encrypted fallback key and the RKVP associated with the key label in a Cryptographic Key Data Set (CKDS).
16 . The CPP of claim 15 , wherein the predetermined recover process includes: determining whether the RKVP associated with the key label matches the RKVP stored in the metadata; and in response to a determination that the RKVP associated with the key label does not match the RKVP stored in the metadata, causing the primary cryptographic recovery key encrypted fallback key and the RKVP associated with the key label to be stored in the metadata.
17 . A computer system (CS), the CS comprising:
a processor set;
a set of one or more computer-readable storage media;
program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations:
generate a primary cryptographic recovery key;
generate an alternate cryptographic recovery key, wherein the alternate cryptographic recovery key is generated and stored in a cryptographic Hardware Security Module (HSM), wherein the cryptographic HSM is a cryptographic key store configured to encrypt operational key(s);
store an encrypted fallback key in metadata associated with a data set, wherein the encrypted fallback key is an operational key encrypted by the primary cryptographic recovery key, wherein the metadata is stored in a data set encryption cell that comprises a logical and physical portion of memory that is dedicated to storing key labels, Recovery Key Verification Patterns (RKVPs) and encrypted fallback keys;
store a RKVP in the metadata in the data set encryption cell, wherein the RKVP is associated with the primary cryptographic recovery key and is stored for the primary cryptographic recovery key; and
in response to a determination that the operational key is unavailable, retrieve the encrypted fallback key to perform a data decryption operation.
18 . The CS of claim 17 , wherein retrieving the encrypted fallback key includes: determining whether an RKVP associated with a key label of a request for the data set matches the primary cryptographic recovery key, and in response to a determination that the RKVP associated with the key label matches the primary cryptographic recovery key: using the primary cryptographic recovery key to decrypt the encrypted fallback key; using a current master key stored in the cryptographic HSM to encrypt the decrypted fallback key; generating a protected key to be used for encrypting and decrypting the data set; storing the master key encrypted fallback key in a Cryptographic Key Data Set (CKDS); and returning both the protected key and the RKVP associated with the key label to an application programming interface (API) of a system that manages use of the fallback key and the data set.
19 . The CS of claim 18 , comprising: program instructions, collectively stored in the set of one or more storage media, for causing the processor set to perform the following computer operations: determine whether the RKVP associated with the key label matches the RKVP stored in the metadata; and in response to a determination that the RKVP associated with the key label does not match the RKVP stored in the metadata, store the master key encrypted fallback key and the RKVP associated with the key label to the metadata.
20 . The CS of claim 17 , wherein the determination that the operational key is unavailable is based on an attempt to access the data set failing and predetermined recovery actions performed in an attempt to acquire the operational key to access the data set also failing.