Abstract:
In one aspect, a method to manage encrypted data includes configuring a first portion of a storage medium to store encrypted data. The encrypted data is encrypted using a time-based encryption key. The method also includes configuring a second portion of the storage medium to include metadata identifying the time-based encryption key and storing the time-based encryption key in a location other than the storage medium.

Description:
RELATED PATENT APPLICATIONS 
     This patent application is a continuation of and claims priority to application Ser. No. 12/724,005, filed Mar. 15, 2010 and entitled “WRITING AND READING ENCRYPTED DATA USING TIME-BASED ENCRYPTION KEYS,” which is incorporated herein by reference in its entirety. 
    
    
     BACKGROUND 
     Data is generally encrypted to prevent access by unauthorized individuals. Typically, the data is encrypted using a key. In order for the encrypted data to be read, it must be unencrypted using the key. Thus, for example, if a laptop is stolen, data stored on its hard drive cannot be accessed by a perpetrator unless the key is used. To delete encrypted data typically all of the data is rewritten with 1 s  and 0 s , which is typically repeated a number of times. 
     SUMMARY 
     In one aspect, a method to manage encrypted data includes configuring a first portion of a storage medium to store encrypted data. The encrypted data is encrypted using a time-based encryption key. The method also includes configuring a second portion of the storage medium to include metadata identifying the time-based encryption key and storing the time-based encryption key in a location other than the storage medium. 
     In another aspect, an article includes a machine-readable medium that stores executable instructions to manage encrypted data. The instructions cause a machine to configure a first portion of a storage medium to store encrypted data. The encrypted data is encrypted using a time-based encryption key. The machine-readable medium further includes instructions that cause the machine to configure a second portion of the storage medium to include metadata identifying the time-based encryption key and to store the time-based encryption key in a location other than the storage medium. The location is at least one of a cache and a server. The storage medium includes one of a logical unit, a disk drive and a track storage. 
     In a further aspect, an apparatus, to manage encrypted data, includes circuitry to configure a first portion of a storage medium to store encrypted data. The encrypted data is encrypted using a time-based encryption key. The apparatus also includes circuitry to configure a second portion of the storage medium to include metadata identifying the time-based encryption key; and to store the time-based encryption key in a location other than the storage medium. The location is at least one of a cache and a server. The storage medium includes one of a logical unit, a disk drive and a track storage. 
    
    
     
       DESCRIPTION OF THE DRAWINGS 
         FIG. 1  is a block diagram of a storage system. 
         FIG. 2A  is a block diagram of an encrypted logical unit (LUN). 
         FIG. 2B  is a block diagram of the encrypted LUN after data has been updated. 
         FIG. 3  is a flowchart of an example of a process to write encrypted data. 
         FIG. 4  is a flowchart of an example of a process to read encrypted data. 
         FIG. 5  is a flowchart of an example of a process to delete encrypted data. 
         FIG. 6  is a computer on which any of the processes of  FIGS. 3 to 5  may be implemented. 
     
    
    
     DETAILED DESCRIPTION 
     Described herein is an approach to encrypt data that will allow easier maintenance of encrypted data. For example, data may be deleted by simply deleting an encryption key rather than deleting the actually data. While the data described herein is described with a logical unit (LUN), the techniques described herein may be used with file system storage or track storage. 
     Referring to  FIG. 1  an encryption storage system  10  includes a key server  20  (e.g., a RSA® Key Manager (RKM)) that stores encryption keys  22 , a computer  30 , a requestor  40  and an encrypted logical unit (LUN) ( 50 ). The requestor  40  may be an application, a user or a system that requests access to encrypted data, to encrypt data, delete encrypted data, control access to encrypted data and so forth. In one example, the encryption LUN  5 O encrypts/decrypts data. The LUN  50  accesses the key server  20  to retrieve the encryption key (e.g., one of the keys  22 ) for encrypting/decrypting the data. 
     As used herein, the encryption keys  22  are time-based encryption keys and are useable to encrypt and/or decrypt for a predetermined time period. For example, after the predetermined amount of time a new key is used to encrypt data. In one particular example, a new encryption key is used each week to encrypt data. In one example, the time-based encryption keys are updates based on a policy. 
     Referring to  FIG. 2A , the encrypted LUN  5 O includes data blocks (e.g., data block  0  ( 52   a ), data block  1  ( 52   b ), data block  2  ( 52   c ) and data block  3  ( 52   d )). Each data block includes a first portion and a second portion. For example, data block  0  ( 52   a ) includes a first portion  54   a  and a second portion  58   a ; data block  1  ( 52   b ) includes a first portion  54   b  and a second portion  58   b ; data block  2  ( 52   c ) includes a first portion  54   c  and a second portion  58   c ; and data block  3  ( 52   d ) includes a first portion  54   d  and a second portion  58   d.    
     The first portion  54   a - 54   d  is configured to store encrypted data and the second portion is configured to store an ID of a key (key ID) used to encrypt the data in the first portion. For example, encryption key  1  is identified as key ID  1 . It is important to emphasize that the actual key to encrypt the data in the data block is stored elsewhere. For example, the keys  22  are stored on the server  20 . In one example, data block  0  ( 52   a ) includes encrypted data W in the first portion  54   a  and a key ID  1  in the second portion  58   a ; data block  1  ( 52   b ) includes encrypted data X in the first portion  54   b  and a key ID  2  in the second portion  58   b ; data block  2 , ( 52   c ) includes encrypted data Y in the first portion  54   c  and a key ID  2  in the second portion  58   c ; and data block  3  ( 52   d ) includes encrypted data Z in the first portion  54   d  and a key ID  3  in the second portion  58   d.    
     Referring to  FIG. 2B , in one example, the data in data block  0  ( 52   a ) is updated with encrypted data W’ in the first portion  54   a.  In one example, the old key, key  1 , is expired and no longer useable. In other examples, the old key; key  1 , is not expired (e.g., the key  1  may be valid to read encrypted data), but it is not the newest key. The encrypted data W’ is encrypted with a new key, for example, key  4 . The ID of key  4 , Key ID  4 , is stored in the second portion  58   a  of data block  0  ( 52   a ) to identify the key that encrypted the data in data block  0  ( 52   a ). 
     In one example, the Key IDs may be stored immediately after the data itself is stored. For instance, in a storage system (e.g., the LUN  50 ) where each sector has 520 bytes instead of 512 bytes per sector, the key ID can be stored in some of the last 8 bytes of the sector. In other examples, the key ID may be stored in a special area of the LUN. 
     Referring to  FIG. 3 , one example of a process to store encrypted data is a process  100 . A policy is received ( 102 ). For example, a policy may be a write policy. In particular, the write policy may require that encryption keys are updated on a periodic basis. 
     New data is received to be encrypted ( 108 ). The data is encrypted ( 112 ) using the appropriate key and stored ( 114 ). For example, data W is encrypted using key  1  and stored in the first portion  54   a  of data block  0  ( 52   a )( FIG. 2A ). 
     The ID of the key is stored. For example, if the data W is encrypted using key  1  and stored in the first portion  54   a  of data block  0  ( 52   a ) then the ID of the key, key ID  1 , is stored in the second portion  58   a  of data block  0  ( 52   a )( FIG. 2A ). 
     If there are additional writes (i.e., data to be encrypted and stored) it is determined if there is a change in policy ( 124 ). If there is not a change in policy, then processing blocks  108 ,  112 ,  116  and  122  are repeated. If there is a change in policy, a new policy is received ( 102 ) and processing blocks  108 ,  112 ,  116  and  122  are repeated using the new policy. 
     Referring to  FIG. 4 , one example of a process to read encrypted data is a process  200 . A request is received to read encrypted data ( 212 ). The key ID associated with the key used to encrypt the data is determined ( 218 ) and used to decrypt the data so it may be read. For example, if a request to read data block  1  ( 52   b ) of LUN  50  is received, then it is determined that the key ID is key ID  1  so that key  1  is used to decrypt the data W (see  FIG. 2A ). In one example, the encryption key is requesting from the key server  20 . 
     In another example, the storage system  10  may cache keys in a cache (e.g., in a key cache  540  ( FIG. 6 )) so it will not have to access the key server  20  on every IO, but periodically. The storage system  10  will access the key server to get a new key policy, and if a key was erased the storage system  10  will erase it from the cache. In one example, the storage system  10  stores encryption keys in the cache in a volatile memory (e.g., volatile memory  524  ( FIG. 6 )). 
     Because of the time-based nature of updating the keys, some keys may be valid but not the newest key and some keys are so old that there are invalid. For example, there are at least three types of encryption keys used to read encrypted data. One type is a latest (e.g., newest, current) type key available. With the latest type key, the encrypted data is decrypted using the latest key and provided, for example, to the user when the user requests a read. Another type key is a valid but older type key (e.g., the key is valid for reading encrypted data but is older than allowed by a policy and is no longer used for encrypting new data). In this case, data is encrypted with the new key instead and stored but the unencrypted data is still provided, for example, to the user. A still further type key is an invalid type key. The invalid type key is a key that has been erased from the server  22  or has expired. In this case, using an invalid key will result in the read request failing, since storage cannot decrypt the data. 
     Process  300  will determine if the encryption key is invalid ( 224 ). If the key is invalid, the read request will fail ( 226 ). 
     If the key is not invalid, then process  300  will read and decrypt the data ( 227 ). Process  300  determines if the key needs updating based on a refresh policy ( 228 ). For example, even though keys used to encrypt data are updated once a week, in reading encrypted data, the refresh policy may require that keys used to read encrypted data be refreshed (updated) to the newest key only once a month. If the key does not need updating (refreshing), then the data is provided ( 262 ), for example, as a read IO. 
     If the key is not the newest key, for example, the encryption key is outdated based on a policy (e.g., keys older than a month are updated), then the key is updated on a request based on the policy, the data is decrypted using the old key then re-encrypted with the latest encryption key (e.g., a newer encryption key than an outdated encryption key) ( 234 ), the new encrypted data is stored back to the LUN  50  ( 244 ) and the key ID is updated to reference the new encryption key ( 254 ). In one example, processing blocks  234 ,  244  and  245  are performed before acknowledging the read ( 262 ). 
     Referring to  FIG. 5 , one example of a process to delete encrypted data is a process  300 . A request is received to delete encrypted data ( 302 ). The keys IDs associated with the encrypted data are determined ( 308 ). Keys associated with the key IDs are deleted ( 312 ). 
     For example, a request will be to erase all data older than a specific time. In one particular example, a regulation (e.g., a retention policy) may require deletion of all data older than 7 years so that process  300  will erase all older keys. The encryption keys are deleted from the key server  20 , and on a periodic update the storage system will erase their keys from memory. If a user had access to an old encryption key, when the data that used the old encryption key is changed to use a newer encryption key the user will not be able to read the newer data even if the user takes the physical spindles out of the storage system. 
     While a LUN is described herein other data storage environments may be used. For example, a file system may be used wherein a metadata file that includes a key ID of the key used to encrypt that data may be stored together with the encrypted data file. In one particular example, a portable storage drive includes an encrypted data file and another file includes the key ID. In another example, a track storage system may be used so that for each track or a number of tracks that includes data encrypted by an encryption key another track stores the key ID identifying the encryption key used to encrypt data. In a further example, like in an EMC® SYMMETRIX® Storage system for example, the minimum encryption portion may be a track of 64 KB, so that each track will have a key ID attached to it, and the key ID may be kept in a cache. 
     Referring to  FIG. 6 , an example of the computer  30  is a computer  30 ’. The computer  30 ’ includes a processor  522 , a volatile memory  524 , a non-volatile memory  528  (e.g., hard disk) and a user interface (UI)  528  (e.g., a mouse, a keyboard, a display, touch screen and so forth). The non-volatile memory  524  stores computer instructions  534 , an operating system  536  and data  538 . The volatile memory includes the key cache  540  to store a copy of encryption keys located on the server  20 . In one example, the computer instructions  534  are executed by the processor  522  out of volatile memory  524  to perform all or part of the processes described herein (e.g., processes  100 ,  200 ,  300 ,  400 ,  500 ). 
     The processes described herein (e.g., processes  100 ,  200 ,  300 ,  400 ,  500 ) are not limited to use with the hardware and software of  FIG. 6 ; they may find applicability in any computing or processing environment and with any type of machine or set of machines that is capable of running a computer program. The processes described herein may be implemented in hardware, software, or a combination of the two. The processes described herein may be implemented in computer programs executed on programmable computers/machines that each includes a processor, a storage medium or other article of manufacture that is readable by the processor(including volatile and non-volatile memory and/or storage elements), at least one input device, and one or more output devices. Program code may be applied to data entered using an input device to perform any of the processes described herein and to generate output information. 
     The system may be implemented, at least in part, via a computer program product, (e.g., in a machine-readable storage device), for execution by, or to control the operation of, data processing apparatus (e.g., a programmable processor, a computer, or multiple computers)). Each such program my he implemented in a high level procedural or object-oriented programming language to communicate with a computer system. However, the programs may be implemented in assembly or machine language. The language may be a compiled or an interpreted language and it may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program may be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a communication network. A computer program may be stored on a storage medium or device (e.g., CD-ROM, hard disk, or magnetic diskette) that is readable by a general or special purpose programmable computer for configuring and operating the computer when the storage medium or device is read by the computer to perform the processes described herein. The processes described herein may also be implemented as a machine-readable storage medium, configured with a computer program, where upon execution, instructions in the computer program cause the computer to operate in accordance with the processes. 
     The processes described herein are not limited to the specific embodiments described. For example, the processes  100 ,  200 ,  300 ,  400  and  500  are not limited to the specific processing order of  FIGS. 3 to 5 , respectively. Rather, any of the processing blocks of  FIGS. 3 to 5  may be reordered, combined or removed, performed in parallel or in serial, as necessary, to achieve the results set forth above. 
     The processing blocks in  FIGS. 3 to 5  associated with implementing the system may be performed by one or more programmable processors executing one or more computer programs to perform the functions of the system. All or part of the system may be implemented as, special purpose logic circuitry an (e.g., an FPGA (field programmable gate array) and/or an ASIC (application-specific integrated circuit)). 
     Elements of different embodiments described herein may be combined to form other embodiments not specifically set forth above. Other embodiments not specifically described herein are also within the scope of the following claims.