# Patent

## Title
Map-based rapid data encryption policy compliance

## Abstract

To comply with a policy for a computing device indicating that data written by the computing device to the storage volume after activation of the policy be encrypted, a sector map is accessed. The sector map identifies one or more sectors of a storage volume and also identifies, for each of the one or more sectors of the storage volume, a signature of the content of the sector. In response to a request to read the content of a sector, the content of the sector is returned without decrypting the content if the sector is one of the one or more sectors and the signature of the content of the sector matches the signature of the sector identified in the sector map. Otherwise, the content of the sector is decrypted and the decrypted content is returned.

## Background
RELATED APPLICATIONS
This application is a continuation of U.S. patent application Ser. No. 14/506,167 entitled “Sector Map-Based Rapid Data Encryption Policy Compliance” and filed Oct. 3, 2014 which in turn is a continuation of U.S. patent application Ser. No. 13/221,629, filed Aug. 30, 2011, entitled “Sector Map-based Rapid Data Encryption Policy Compliance” to Innokentiy Basmov, et al., the entire disclosures of which are hereby incorporated by reference herein in their entirety.


BACKGROUND
Computers can be used in various settings, sometimes adhering to particular policies. For example, when accessing corporate data such as email from a personal computer, corporate policy may dictate that the personal computer must encrypt corporate data stored on the personal computer's storage device in order to grant access to the corporate data. The computer may be unable to access the particular corporate service until the policy is complied with, but waiting for a storage device to be encrypted (which can be on the order of several minutes or hours, depending on the size of the storage device) in order to use the corporate service can be frustrating for users.
SUMMARY
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In accordance with one or more aspects, a request to activate a policy for a computing device is received at the computing device. The policy indicates that data written by the computing device to a storage volume after activation of the policy be encrypted. In response to the request, the policy is activated for the device, including encrypting data written to the storage volume after returning the indication of compliance with the policy, and using a sector map to identify one or more sectors of the storage volume that are not encrypted. Additionally, in response to the request, an indication of compliance with the policy is returned despite one or more sectors of the storage volume being unencrypted.
In accordance with one or more aspects, to comply with a policy for a computing device indicating that data written by the computing device to the storage volume after activation of the policy be encrypted, a sector map is accessed. The sector map identifies one or more sectors of a storage volume and also identifies, for each of the one or more sectors of the storage volume, a signature of the content of the sector. In response to a request to read the content of a sector, the content of the sector is returned without decrypting the content if the sector is one of the one or more sectors identified in the storage map and the signature of the content of the sector matches the signature of the sector identified in the sector map. Otherwise, the content of the sector is decrypted and the decrypted content is returned.



BRIEF DESCRIPTION OF THE DRAWINGS
The same numbers are used throughout the drawings to reference like features.
FIG. 1 is a block diagram illustrating an example computing device implementing rapid compliance with a data encryption policy in accordance with one or more embodiments.
FIG. 2 illustrates an example sector map in accordance with one or more embodiments.
FIG. 3 illustrates an example of sector maps maintained in memory and persisted on a storage device in accordance with one or more embodiments.
FIG. 4 is a block diagram illustrating another example computing device implementing rapid compliance with a data encryption policy in accordance with one or more embodiments.
FIG. 5 is a flowchart illustrating an example process for implementing rapid compliance with a data encryption policy in accordance with one or more embodiments.
FIG. 6 is a flowchart illustrating another example process for implementing rapid compliance with a data encryption policy using a sector map in accordance with one or more embodiments.
FIG. 7 is a flowchart illustrating an example process for implementing rapid compliance with a data encryption policy using an encrypted chunks map in accordance with one or more embodiments.
FIG. 8 illustrates an example computing device that can be configured to implement rapid compliance with a data encryption policy in accordance with one or more embodiments.



DETAILED DESCRIPTION
Rapid compliance with a data encryption policy is discussed herein. A sector map for a storage volume used by a computing device can be generated, the sector map identifying one or more sectors of a storage volume as well as a signature of the content of each of the one or more sectors. The sector map can be generated shortly after (or as part of) installing an operating system on the computing device, or alternatively at a later time prior to activating a policy for the computing device. The policy activated for the computing device indicates that content written by the computing device to the storage volume after activation of the policy be encrypted. After activation of the policy, the computing device encrypts content written to sectors of the storage volume. Additionally, after activation of the policy, content in a particular sector may or may not be encrypted. The sector map is used to identify which sectors of the storage volume have encrypted content, and thus which content is to be decrypted before being returned to the requester.
Alternatively, an encrypted chunks map for a storage volume used by a computing device can be generated, the encrypted chunks map identifying chunks of sectors of the storage volume. For each chunk of sectors of the storage volume, the encrypted chunks map indicates whether the sectors in the chunk are encrypted (or not in use) or are unencrypted. After activation of a policy for the computing device indicating that content written by the computing device to the storage volume after activation of the policy is encrypted, data written to the storage volume is encrypted. If data is written to a chunk that is unencrypted (as determined by the encrypted chunks map), then the sectors in the chunk are encrypted, the data is encrypted and written to the sector, and the encrypted chunks map is updated to indicate that the chunk is encrypted. Whether data read from the storage volume is decrypted is determined based on whether the sector from which the data is read is unencrypted (as determined by the encrypted chunks map).
References are made herein to cryptography, which can include symmetric key cryptography, public key cryptography and public/private key pairs. Although such key cryptography is well-known to those skilled in the art, a brief overview of such cryptography is included here to assist the reader. In public key cryptography, an entity (such as a user, hardware or software component, a device, a domain, and so forth) has a key (a public key and/or a private key). The public key of a public/private key pair can be made publicly available, but the private key is kept a secret. Without the private key it is computationally very difficult to decrypt data that is encrypted using the public key. Using some public key cryptography algorithms, data can be encrypted by any entity with the public key and only decrypted by an entity with the corresponding private key. Additionally, using some public key cryptography algorithms, a digital signature for data can be generated by using the data and the private key. Without the private key it is computationally very difficult to create a signature that can be verified using the public key. Any entity with the public key can use the public key to verify the digital signature by executing a suitable digital signature verification algorithm on the public key, the signature, and the data that was signed.
In symmetric key cryptography, on the other hand, a shared key (also referred to as a symmetric key) is known by and kept secret by the two entities. Any entity having the shared key is typically able to decrypt data encrypted with that shared key. Without the shared key it is computationally very difficult to decrypt data that is encrypted with the shared key. So, if two entities both know the shared key, each can encrypt data that can be decrypted by the other, but other entities cannot decrypt the data if the other entities do not know the shared key. Similarly, an entity with a shared key can encrypt data that can be decrypted by that same entity, but other entities cannot decrypt the data if the other entities do not know the shared key. Additionally, authentication codes or message authentication codes can be generated based on symmetric key cryptography, such as using a keyed-hash message authentication code mechanism. Any entity with the shared key can generate and verify the authentication code or message authentication code. For example, a trusted third party can generate a symmetric key based on an identity of a particular entity, and then can both generate and verify the authentication codes or message authentication codes for that particular entity (e.g., by encrypting or decrypting the data using the symmetric key).
FIG. 1 is a block diagram illustrating an example computing device 100 implementing rapid compliance with a data encryption policy in accordance with one or more embodiments. Computing device 100 can be a variety of different types of devices, such as a physical device or a virtual device. For example, computing device 100 can be a physical device such as a desktop computer, a server computer, a laptop or netbook computer, a tablet or notepad computer, a mobile station, an entertainment appliance, a set-top box communicatively coupled to a display device, a television or other display device, a cellular or other wireless phone, a game console, an automotive computer, and so forth. Computing device 100 can also be a virtual device, such as a virtual machine running on a physical device. A virtual machine can be run on any of a variety of different types of physical devices (e.g., any of the various types listed above). Thus, computing device 100 may range from a full resource device with substantial memory and processor resources (e.g., personal computers, game consoles) to a low-resource device with limited memory and/or processing resources (e.g., traditional set-top boxes, hand-held game consoles).
Computing device 100 includes an encryption/decryption control module 102, a read/write control module 104, a policy module 106, a sector map 108, and a storage volume 110. Although particular modules 102, 104, and 106 are illustrated in computing device 100, it should be noted that one or more of modules 102, 104, and 106 can be combined into a single module, or that the functionality of one or more of modules 102, 104, and/or 106 can be separated into multiple modules. Encryption/decryption control module 102 manages encryption and decryption of data stored on storage volume 110 using any of a variety of different cryptographic techniques (e.g., using symmetric key cryptography and/or public key cryptography). The data stored on storage volume 110 refers to any information that can be stored, such as program data, user data, system data, instructions or code, and so forth.
Encryption/decryption control module 102 typically allows data to be encrypted and/or decrypted only when authorized to do so. Module 102 can be authorized to allow data to be encrypted and/or decrypted in different manners. For example, module 102 can be authorized to allow data to be encrypted and/or decrypted only after a user of computing device 100 has proven that he or she possesses valid credentials to access the data. Various different credentials can be used, such as knowledge of a secret phrase (e.g., a password), a private key corresponding to a certificate, a temporal secret (e.g., a one-time password), and so forth. By way of another example, module 102 can be authorized to allow data to be encrypted and/or decrypted only after detecting that computing device 100 is in a particular state (e.g., conforms to a particular policy). By way of yet another example, module 102 can be authorized to allow data to be encrypted and/or decrypted only after obtaining particular encryption and/or decryption keys stored in or by computing device 100.
Read/write control module 104 manages reading data from and writing data to storage volume 110. This reading and writing includes reading and writing of encrypted data (also referred to as ciphertext) as well as unencrypted data (also referred to as plaintext). Read/write control module 104 can invoke module 102 to encrypt and/or decrypt data read and/or written as appropriate.
Policy module 106 implements various policies on computing device 100. Each policy identifies one or more behaviors that device 100 is to follow, such as types of programs that are to be running on device 100 (e.g., anti-malware programs), types of security that are to be implemented by device 100 (e.g., encrypting and decrypting data), and so forth. In one or more embodiments, a policy can indicate that once the policy is activated on device 100 (and optionally until the policy is deactivated), data stored on storage volume 110 is to be encrypted. Activation of a policy refers to the policy being enforced on, and complied with by, computing device 100. Policy module 106 can obtain one or more policies to implement in various manners, such as being pre-configured with one or more policies, receiving a user input (e.g., from an administrative user) of one or more policies, receiving one or more policies from a remote server or service, and so forth.
Storage volume 110 is a storage device that can be implemented using a variety of different technologies, such as a flash memory device, a magnetic disk, an optical disc, combinations thereof, and so forth. Storage volume 110 can also be a portion of a storage device that is treated by computing devices and operating systems logically as a storage device. For example, a storage volume can be a partition of a hard drive, a portion of a flash memory device, and so forth.
Storage volume 110 is illustrated as being included as part of computing device 100. For example, storage volume 110 can be an internal storage device coupled to an internal bus of device 100, such as using a Serial Advanced Technology Attachment (SATA) interface, Parallel ATA (PATA) interface, Small Computer System Interface (SCSI) interface, and so forth. By way of another example, storage volume can be an internal storage device implemented as one or more chips on a same circuit board as chips implementing one or more of modules 102-106, can be an internal storage device implemented in the same chip as one or more of modules 102-106, and so forth.
Storage volume 110 can alternatively be external to computing device 100 and coupled to computing device 100 in a variety of different wired and/or wireless manners. For example, storage volume 110 can be coupled to computing device 100 via a Universal Serial Bus (USB) connection, a wireless USB connection, an IEEE 1394 connection, an external SATA (eSATA) connection, a Bluetooth connection, and so forth. Storage volume 110 can be designed to be coupled to different computing devices (concurrently or at different times). In one or more embodiments, storage volume 110 is a removable volume, such as being part of a storage device designed to be easily coupled to and decoupled from computing device 100 and transported to other computing devices. An example of such a removable storage volume is a thumb drive or USB flash memory device. Alternatively, storage volume 110 can take other forms, such as being a network storage device that is coupled to computing device 100 via a network (e.g., the Internet, a local area network (LAN), a cellular or other phone network, an intranet, a storage area network (SAN), network-attached storage (NAS), other public and/or proprietary networks, combinations thereof, and so forth).
Storage volume 110 includes multiple sectors in which data can be stored. The data stored in a sector is also referred to as the content of that sector. Each sector is a portion of storage volume 110, and different storage volumes can have different sector sizes (e.g., 512 bytes, 4 k bytes, 8 k bytes, and so forth). A storage volume typically has sectors of the same size, but can alternatively have sectors of different sizes. Sector map 108 identifies one or more sectors of storage volume 110 as well as a signature of the content of each of the one or more sectors. The usage of sector map 108 and the signatures of the contents of the sectors are discussed in more detail below. Although discussed herein as operating on a per-sector basis, it should be noted that the techniques discussed herein can alternatively operate based on other groupings of content on storage volume 110 in an analogous manner (e.g., based on groupings of multiple sectors or other collections of content).
Sector map 108 is typically stored on a storage device (e.g., storage volume 110) and copied into a memory (e.g., RAM) of computing device 100 when computing device 100 starts operation (e.g., is powered on, reset, etc.). The memory is typically a volatile memory that does not maintain its state when computing device 100 is powered off, but that typically has faster access time than storage volume 110. Alternatively, sector map 108 can be maintained in a nonvolatile memory (e.g., Flash memory) that does maintain its state when computing device 100 is powered off.
In one or more embodiments, encryption/decryption control module 102, read/write control module 104, and policy module 106 are implemented in an operating system of computing device 100. In response to activation of a policy on computing device 100 indicating data is to be encrypted, data written to storage volume 110 subsequent to activation of the policy is encrypted regardless of the application or other program writing the data to storage. Encryption/decryption control module 102 encrypts data written to storage volume 110 for multiple applications, rather than simply a single application.
FIG. 2 illustrates an example sector map 200 in accordance with one or more embodiments. Sector map 200 can be, for example, sector map 108 of FIG. 1. Sector map 200 includes multiple sector identifiers and corresponding sector signatures 202(1), . . . 202(x). The sector identifiers in sector map 200 can take a variety of different forms, such as numeric identifiers of the sectors.
It should be noted that although multiple sector identifiers each having a corresponding sector signature are illustrated in FIG. 2, sector map 200 can alternatively be configured in different manners. For example, sector map 200 can arrange sector signatures in groups having a contiguous set or run of sector identifiers. A single sector identifier (e.g., the sector identifier at the beginning or start of the run of sector identifiers) can be included in sector map 200, and then given the size of the sector signatures a particular sector signature within that group can be readily identified. For example, if the sector identifier at the beginning of a group is sector 732 and sector signatures are 6 bytes in length, then it can be readily determined that the sector signature for sector 735 is 3×6=18 bytes offset into the group of sector signatures. Although only a single sector identifier is included in sector map 200 for a group, it should be noted that the sector map is still viewed as identifying the multiple sectors (and corresponding sector signatures) of the sector identifiers in the set or run included in that group.
At a particular point in time, sector map 200 is locked. Sector map 200 being locked refers to sector map 200 being set or fixed in its current state, with no changes to sector map 200 being allowed. Sector map 200 can be locked in various manners, such as being stored in a nonvolatile write-once memory location, being stored in a portion of storage volume 110 accessible only to an operating system of computing device 100 and the operating system refusing to perform any writes to sector map 200, and so forth. Sector map 200 can be locked at different times (e.g., when an operating system is installed or a policy is activated), as discussed in more detail below.
Sector map 200 need not, and typically does not, include an identifier and corresponding signature for every sector of the storage volume. Rather, sector map 200 includes identifiers and corresponding signatures of sectors that were written to prior to sector map 200 being locked. Alternatively, sector map 200 can include identifiers of multiple sectors that were not written to prior to sector map 200 being locked, and also include one or more indications of which identified sectors were written to prior to sector map 200 being locked (e.g., flag values, include signatures for only those sectors that were written to prior to sector map 200 being locked, etc.).
The sector signatures in sector map 200 are a representation of at least part of the content in the sector. Sector signatures can be generated in a variety of different manners as a function of the content of the sector. In one or more embodiments, the signature of a sector is generated by selecting a particular number of bytes of the content of the sector (e.g., the content in the first 6 bytes of the sector, the content in the 8 bytes of the sector starting at the 11th byte of the sector, etc.). Alternatively, the signature of a sector can be generated in different manners, such as by applying a variety of different hash algorithms to the content of the sector to obtain a hash value, applying various other algorithms or rules to the content of the sector to obtain a value representing the content of the sector, and so forth.
The sector signatures in sector map 200 are used to identify whether content of the corresponding sector has changed (which can be used to determine whether the content is to be decrypted, as discussed in more detail below) after sector map 200 was locked. At any given time, a signature of the content of a sector identified in sector map 200 can be generated in the same manner as the signature for that sector was generated for sector map 200. The signature from sector map 200 is compared to the generated signature for the sector, and a determination made as to whether the two signatures match (e.g., are the same). If the two signatures match, then the content of the corresponding signature was not changed after sector map 200 was locked. However, if the two signatures do not match, then the content of the corresponding signature was changed after sector map 200 was locked.
In one or more embodiments, sector map 200 is maintained in memory or on a storage device in a manner that facilitates quick access to the content of sector map 200. For example, sector map 200 can be maintained on the storage device in a group of contiguous sectors of the storage device, in a group of contiguous addresses in memory, and so forth. The content of sector map 200 can additionally be stored on the storage device and/or in memory in numeric order based on sector identifier, in a binary tree indexed based sector identifier, and so forth.
In one or more embodiments, the content of sector map 200 is maintained on the storage device in groups of sector identifiers, each group including a contiguous set or run of sector identifiers. Each group includes a header identifying various information about the group, such as the size of the group (e.g., the number of sectors of the storage device that are used to store the group, the number of sector identifiers in the run, etc.), a checksum value for the group, an offset into the storage volume (or memory) to access the first sector identifier and sector signature in the group, and so forth. These groups can then be readily mapped into a sector map in memory when the computing device starts operation (e.g., is powered on, reset, etc.). It should be noted that in such embodiments sector map 200 need not include an identifier of each sector identifier, but rather just an indication of the first sector identifier in the run of sector identifiers and the sector signatures corresponding to the sector identifiers in the run. The sector signature corresponding to a particular sector in the run can thus be readily given the size of the sector signatures.
Returning to FIG. 1, sector map 108 includes identifiers and corresponding signatures of sectors that were written to prior to sector map 108 being locked. After sector map 108 is locked, data written to storage volume 110 is encrypted by encryption/decryption control module 102. Such data can include data written to sectors of storage volume 110 not previously written to, as well as data written to sectors of storage volume 110 that were previously written to (overwriting sectors). However, data written to storage volume 110 prior to sector map 108 being locked is not encrypted. Accordingly, after sector map 108 is locked, sector map 108 is used to determine whether the sector was written to before sector map 108 was locked (and thus is not encrypted), or whether the sector was written to after sector map 108 was locked (and thus is encrypted).
After sector map 108 is locked, when data is requested to be read from a sector of storage volume 110, a check is made (e.g., by read/write control module 104 or policy module 106) as to whether the sector is identified in sector map 108. If the sector is not identified in sector map 108, then the data written to the sector was written after sector map 108 was locked, and thus the content of the sector is encrypted. Accordingly, read/write control module 104 invokes encryption/decryption control module 102 to decrypt the content of the sector prior to returning the content of the sector to the requester.
However, if the sector is identified in sector map 108, then a check is made (e.g., by read/write control module 104 or policy module 106) as to whether the signature of the current content of the sector matches the signature of the sector in sector map 108. If the two signatures match, then the data written to the sector was written before sector map 108 was locked, and thus the content of the sector is not encrypted. Accordingly, read/write control module 104 can return the content of the sector to the requester and need not invoke encryption/decryption control module 102 to decrypt the content of the sector. However, if the two signatures do not match, then the data written to the sector was written after sector map 108 was locked, and thus the content of the sector is encrypted. Accordingly, read/write control module 104 invokes encryption/decryption control module 102 to decrypt the content of the sector prior to returning the content of the sector to the requester.
In one or more embodiments, read/write control module 104 also maintains a bitmap corresponding to storage volume 110, each bit in the bitmap corresponding to a sector of storage volume 110. If a particular sector of volume 110 is written to after sector map 108 is locked (optionally just the first time the particular sector is written to after sector map 108 is locked), module 104 sets (e.g., to a value of 1) the bit corresponding to that particular sector. If a sector has not been written to after sector map 108 was locked then the corresponding bit is not set (e.g., has a value of 0). When reading the content of a sector, if the bit in the bitmap corresponding to the sector is set, module 104 knows that the sector was written to after sector map 108 was locked. Accordingly, module 104 invokes encryption/decryption control module 102 to decrypt the content of the sector prior to returning the content of the sector to the requester. However, if the bit in the bitmap corresponding to the sector is not set, then module 104 proceeds to check whether the sector is identified in sector map 108 and/or whether signatures match as discussed above. Alternatively, writing data to a sector of storage volume 110 and updating of the bitmap (e.g., setting the bit corresponding to the sector to a value of 1) can be performed as an atomic operation, in which case if the bit in the bitmap corresponding to the sector is not set, then module 104 can return the content of the sector to the requester and need not invoke encryption/decryption control module 102 to decrypt the content of the sector.
This bitmap can also be used to address signature collisions. A signature collision occurs when two different contents of a sector result in the same signature. The bitmap allows situations in which there is a signature collision to be resolved because the bit corresponding to a sector is set when the sector is written to, so module 104 knows that the sector was written to after sector map 108 was locked. The bit corresponding to a sector being set indicates that the sector was written to after sector map 108 was locked regardless of whether the signature of the current content of the sector matches the signature of the sector in sector map 108.
Sector map 108 can be generated and locked at a variety of different times. In one or more embodiments, sector map 108 is generated and locked as part of installing or initializing an operating system on computing device 100. This can be done, for example, by a vendor or distributor of computing device 100 (e.g., before the purchaser of computing device 100 receives computing device 100), by a user of computing device 100, and so forth. The generation and locking of sector map 108 can be performed as part of the process of installing the operating system on computing device 100, or as part of a separate initialization or setup process for computing device 100. The operating system is installed on computing device 100 with data written to sectors of storage volume 110 without being encrypted by encryption/decryption control module 102.
In such embodiments, sector map 108 can be generated in various manners. For example, during installation of the operating system a record of which sectors of storage volume 110 are written to can be maintained. The sectors identified in this record can be identified as sectors in sector map 108, and corresponding signatures generated and stored in sector map 108. By way of another example, storage volume 110 can be scanned to identify which sectors were written to and which were not, and those sectors that were written to can be identified as sectors in sector map 108 and corresponding signatures generated and stored in sector map 108. By way of yet another example, an operating system can be installed on computing device 100 by copying a storage volume image to storage volume 110, and this storage volume image can include sector map 108.
Thus, in such embodiments sector map 108 is generated and locked when the operating system is installed on computing device 100, with subsequent writes to storage volume 110 being encrypted as discussed above. When a policy is activated on device 100 indicating that data stored on storage volume 110 after activation of the policy be encrypted, computing device 100 is in rapid compliance with the policy because any data written to storage volume 110 after sector map 108 was locked is encrypted. Computing device 100 need not wait until all of storage volume 100 is encrypted before being in compliance with the policy. Policy module 106 can thus rapidly indicate compliance with the policy despite some sectors of storage volume 110 being unencrypted, because device 100 is already encrypting data written to storage volume 110 (and thus will be encrypting data stored on storage volume 110 after activation of the policy).
As used herein, rapid compliance with a policy refers to compliance within a threshold amount of time and/or without requiring encrypting of an entire storage volume. This threshold amount of time is typically a small number (e.g., on the order of several seconds) that is not expected to cause a noticeable delay to the user. Similarly, rapid indication of compliance with a policy refers to indicating compliance within such a threshold amount of time and/or without requiring encrypting of an entire storage volume. It should be noted that policy module 106 need not intentionally delay in complying with and/or indicating compliance with a policy, but that some delay may occur (e.g., while waiting for device 100 to perform other functions unrelated to complying with the policy, while locking sector map 108, while encrypting particular special-purpose files (e.g., paging files, files used for crash dumps, hibernate files, etc.), and so forth).
In other embodiments, rather than locking sector map 108 as part of installing or initializing an operating system on computing device 100, sector map 108 is locked in response to activation of a policy on computing device 100. Prior to locking sector map 108, data is written to sectors of storage volume 110 without being encrypted by encryption/decryption control module 102, and data is read from sectors of storage volume 110 without being decrypted by module 102. An initial sector map 108 is generated (e.g., as part of installing or initializing an operating system on computing device 100 as discussed above). For each write to a sector, sector map 108 is updated with an identifier of the sector written to (if not already included in sector map 108) and a corresponding signature of the content written to that sector. Thus, in such embodiments sector map 108 is generated over time, and keeps an ongoing current identification of which sectors of storage volume 110 have been written to as well as the signatures of those sectors that have been written to.
In response to a request to activate a policy on computing device 100 indicating that data stored on storage volume 110 after activation of the policy be encrypted, policy module 106 activates the policy. As part of activating the policy, sector map 108 is locked, so subsequent writes to storage volume 110 are encrypted as discussed above. Computing device 100 is in rapid compliance with the policy because data written to storage volume 110 after sector map 108 is locked is encrypted. Computing device 100 need not wait until all of storage volume 100 is encrypted before being in compliance with the policy. Policy module 106 can thus rapidly indicate (e.g., with less than a threshold amount of delay) compliance with the policy even though some sectors of storage volume 110 are unencrypted, because subsequent writes to storage volume 110 will be encrypted, and device 100 thus will be encrypting data stored on storage volume 110 after activation of the policy.
In embodiments in which sector map 108 keeps an ongoing current identification of which sectors of storage volume 110 have been written to as well as the signatures of those sectors that have been written to, sector map 108 can be maintained in memory (e.g., RAM) and persisted on a storage device (e.g., storage volume 110). In such embodiments, the sectors in sector map 108 can be grouped together, with each group being a collection of multiple sectors of sector map 108. The number of sectors in a group can vary, and different groups can have different numbers of sectors. Which sectors are included in which groups can be determined in different manners. For example, sectors can be grouped together by sector number in numeric order, based on hash values of the sector identifiers, and so forth.
FIG. 3 illustrates an example of sector maps maintained in memory and persisted on a storage device in accordance with one or more embodiments. FIG. 3 illustrates a storage volume 300 storing a sector map 302, and a memory 310 storing a sector map 312. Memory 310 is typically a volatile memory that does not maintain its state when the computing device including memory 310 is powered off, but that typically has faster access time than storage volume 300. Sector maps 302 and 312 are each a version of the same sector map, which can be sector map 108 of FIG. 1.
As illustrated, sector maps 302 and 312 each include sectors grouped into multiple groups. Each group includes multiple sector identifiers and corresponding sector signatures. Additionally, each group has a flag indicating whether the group is dirty or clean, which is used as discussed below.
When the computing device starts operation (e.g., is powered on, reset, etc.), sector map 302 is copied from storage volume 300 into memory 310 as sector map 312. At this point, the flag value of each group in sector maps 302 and 312 are set to indicate the corresponding groups are clean (although situations can arise where one or more flag values are set to indicate the corresponding groups are dirty, as discussed below). The group being clean indicates that the content of the group (sector identifiers and corresponding sector signatures) on storage volume 300 is the same as the content of the group in memory 310. When data is subsequently written to a sector of the storage volume, sector map 312 is updated with the signature of the newly written content of that sector. However, sector map 302 is not yet updated to include the signature of the newly written content of that sector. Additionally, the flag for the group in sector map 312 including that sector, as well as the flag for the group in sector map 302 including that sector, is set to indicate the group is dirty (if not already set to indicate the group is dirty). The group being dirty indicates that the content of the group on storage volume 300 is not the same as the content of the group in memory 310.
The content of the dirty groups in sector map 312 are flushed to storage volume 300 at some point. Flushing the dirty groups to storage volume 300 refers to writing the data groups from sector map 312 to sector map 302, and setting the corresponding flags of those written groups in sector maps 302 and 312 to indicate the corresponding groups are clean. The particular point at which the dirty groups are flushed can vary, such as in response to a threshold number of groups being marked dirty, a threshold amount of time elapsing since a group was marked as being dirty, during a time of low storage volume usage (e.g., less than a threshold number of read and/or write access to storage volume 300 in a threshold amount of time), and so forth.
When the computing device again starts operation (e.g., is powered on, reset, etc.), each group of sector map 302 that is marked as clean is copied from storage volume 300 into memory 310 as a group of sector map 312. For each group of sector map 302 that is marked as dirty, the sector signatures for the identified sectors in that group are generated based on the contents of those identified sectors. These generated sector signatures are stored in the group in sector map 302 as well as in sector map 312, and the groups are marked as clean in sector maps 302 and 312. Thus, although situations can arise in which the computing device crashes or loses power before one or more dirty groups in sector map 312 are flushed to storage volume 300, such situations are readily resolved when the computing device again starts operation. The flags in sector map 302 of each of the one or more dirty groups in sector map 312 that were not flushed to storage volume 300 still indicate the group is dirty, and thus the sector signatures are re-generated.
In one or more embodiments, when setting a flag in sector map 302 and sector map 312 due to a particular write to a sector, the write to the sector is not finalized until the flags in maps 302 and 312 are set to indicate the group including the identifier of that sector is dirty. Accordingly, if the computing device were to crash or lose power during a write, the write to the sector would not be finalized before the flags in maps 302 and 312 are set to indicate the group is dirty. Thus, due to a crash or loss of power, situations can arise in which a flag in sector map 302 is set to indicate the group is dirty, but the data that caused that flag to be set to indicate the group is dirty was not actually written to storage volume 300. Such situations are readily resolved because when the computing device again starts operation the flag in sector map 302 is set to indicate that the group is dirty, so the sector signatures of the sectors identified in that group are re-generated. Thus, sector maps 302 and 312 maintain an accurate signature for the sector.
Returning to FIG. 1, in one or more embodiments, in response to activating a policy on computing device 100 indicating that data stored on storage volume 110 after activation of the policy be encrypted, policy module 106 begins the process of encrypting the unencrypted data in sectors of storage volume 110. Which sectors have unencrypted data can be readily identified (e.g., based on sector map 108, based on a bitmap corresponding to storage volume 110 as discussed above, etc.). This can be performed, for example, by requesting that the unencrypted data from a sector be read and then written back to the sector. As the request to write the data back to the sector is received after the policy is activated, the data written back is encrypted. When no unencrypted data remains on storage volume 110, use of sector map 108 can cease—sector map 108 can be deleted and/or ignored because the data that was written to storage volume 110 before sector map 108 was locked has been re-written as encrypted data.
When performing such a process of encrypting the unencrypted data in sectors of storage volume 110, a record of which sectors have been encrypted can be maintained in different manners. For example, after unencrypted data from a sector is read and written back to the storage volume as encrypted data, the sector identifier and corresponding sector signature for that sector can be removed from sector map 108 (effectively unlocking sector map 108 for removal of the sector identifier and corresponding sector signature). By way of another example, after unencrypted data from a sector is read and written back to the storage volume as encrypted data, a bit in a bitmap (which corresponds to storage volume 110 as discussed above) that corresponds to that sector can be set.
Policy module 106 can perform this process of encrypting the unencrypted data in sectors of storage volume 110 in different manners. For example, policy module 106 can monitor computing device 100 for, and perform the process during, times of low storage volume usage (e.g., less than a threshold number of read and/or write access to storage volume 110 in a threshold amount of time). By way of another example, policy module 106 can monitor computing device 100 for, and perform the process during, times when computing device 100 is not typically being used (e.g., between midnight and 4:00 am). By way of yet another example, policy module 106 can monitor computing device 100 for, and perform the process during, times when computing device 100 is plugged in (e.g., operating on AC power rather than on battery power).
FIG. 4 is a block diagram illustrating another example computing device 400 implementing rapid compliance with a data encryption policy in accordance with one or more embodiments. Computing device 400 can be a variety of different types of devices, such as a physical device or a virtual device, analogous to computing device 100 of FIG. 1.
Computing device 400 includes an encryption/decryption control module 102, a read/write control module 104, a policy module 106, and a storage volume 110, analogous to computing device 100 of FIG. 1. However, rather than a sector map, computing device 400 includes an encrypted chunks map 402 and a conversion log 404.
In embodiments using encrypted chunks map 402, encrypted chunks map 402 groups sectors of storage volume 110 together into chunks. Each chunk is a collection of multiple sectors of storage volume 110. The number of sectors in a chunk can vary, and different chunks can have different numbers of sectors. Which sectors are included in which chunks can be determined in different manners. For example, sectors can be grouped together by sector number in numeric order. Encrypted chunks map 402 identifies whether, for each chunk of sectors of storage volume 110, the sectors included in the chunk are unencrypted or encrypted (or optionally not in use). If the sectors in the chunk are unencrypted then the chunk is also referred to as being unencrypted. Similarly, if the sectors in the chunk are encrypted (or not in use), then the chunk is also referred to as being encrypted (or not in use).
Encrypted chunks map 402 is typically a bitmap. For example, encrypted chunks map 402 can include multiple bits, each bit corresponding to a chunk of sectors of storage volume 110, and each bit being set (e.g., to a value of 1) to indicate that the sectors in the corresponding chunk are encrypted (or not in use), or is not set (e.g., have a value of 0) to indicate that the sectors in the corresponding chunk are unencrypted. Alternatively other maps or records other than a bitmap can be used.
Discussions herein make reference to indicating whether a corresponding chunk is encrypted or not in use (e.g., the bit corresponding to the chunk is set). Alternatively, encrypted chunks map 402 can indicate whether a corresponding chunk is encrypted without supporting the possibility that the chunk is not in use. For example, the bit corresponding to the chunk is set to indicate the chunk is encrypted (and is not set solely because the chunk is not in use).
Prior to activation of a policy on computing device 400 indicating that data stored on storage volume 110 after activation of the policy be encrypted, encrypted chunks map 402 need not be used. Data can be written to and read from storage volume 110 without being encrypted. However, in response to activation of a policy on computing device 400 indicating that data stored on storage volume 110 after activation of the policy be encrypted, read/write control module 104 invokes encryption/decryption control module 102 to have data written to storage volume 110 encrypted. Read/write control module 104 also uses encrypted chunks map 402 to determine whether to decrypt data read from storage volume 110. Computing device 400 is thus in rapid compliance with the policy because data written to storage volume 110 after the policy is activated is encrypted. Computing device 400 need not wait until all of storage volume 100 is encrypted before being in compliance with the policy. Policy module 106 can thus rapidly indicate (e.g., with less than a threshold amount of delay) compliance with the policy even though some sectors of storage volume 110 are unencrypted, because subsequent writes to storage volume 110 will be encrypted, and device 400 thus will be encrypting data stored on storage volume 110 after activation of the policy.
In one or more embodiments, multiple versions of encrypted chunks map 402 are maintained. For example, two versions (a most recent version and a previous version) of encrypted chunks map 402 can be maintained. Each version typically has a version number or other identifier (e.g., with more recent versions having higher version numbers than less recent versions). When a change is made to encrypted chunks map 402, the previous version of encrypted chunks map 402 is replaced by the most recent version of encrypted chunks map 402, and then the change is made to the most recent version of encrypted chunks map 402. Thus, the two versions of encrypted chunks map 402 include a most recent version of encrypted chunks map 402, and the next most recent version of encrypted chunks map 402.
Additionally, versions of encrypted chunks map 402 can be can be maintained in memory (e.g., RAM) and persisted on a storage device (e.g., storage volume 110). In one or more embodiments, each time a change is made to a version of encrypted chunks map 402, the version in memory as well as the version persisted on the storage device are updated. Alternatively, at least part of encrypted chunks map 402 can be maintained in a nonvolatile memory (e.g., Flash memory) that maintains its state when computing device 400 is powered off, in which case versions of at least that part of encrypted chunks map 402 need not be both maintained in memory and persisted on a storage device.
After the policy (indicating that data stored on storage volume 110 after activation of the policy be encrypted) is activated, when data is requested to be read from a sector of storage volume 110, encrypted chunks map 402 is checked (e.g., by read/write control module 104 or policy module 106) to determine whether the chunk including the sector being read from is unencrypted (e.g., the bit corresponding to the chunk including the sector is not set). If the chunk is unencrypted, then read/write control module 104 reads the sector and returns the content of the sector to the requester. However, if the chunk has been encrypted or is not in use (e.g., the bit corresponding to the chunk including the sector is set), then read/write control module 104 invokes encryption/decryption control module 102 to decrypt the content of the sector, and returns the decrypted content of the sector to the requester.
After the policy (indicating that data stored on storage volume 110 after activation of the policy be encrypted) is activated, when data is requested to be written to a sector of storage volume 110, encrypted chunks map 402 is checked (e.g., by read/write control module 104 or policy module 106) to determine whether the chunk including the sector being written to is unencrypted (e.g., the bit corresponding to the chunk including the sector is not set). If the chunk is not unencrypted (the sectors in the chunk have already been encrypted or are not in use), then read/write control module 104 invokes encryption/decryption control module 102 to encrypt the content of the sector, and writes the encrypted content of the sector to storage volume 110.
However, if the chunk is unencrypted, then read/write control module 104 holds the write request to allow the other sectors in the chunk that includes the sector being written to be encrypted. Module 104 reads the content of the sectors in the chunk (e.g., all the sectors in the chunk, or those sectors in the chunk other than the sector to which data is requested to be written). Module 104 invokes encryption/decryption control module 102 to encrypt each of the sectors that is read, and writes the encrypted content of each of those sectors to storage volume 110.
Module 104 also maintains a record of the sectors that were encrypted in conversion log 404. Conversion log 404 includes identifiers of the sectors that were encrypted and signatures of the sectors, analogous to the sector identifiers and sector signatures of sector map 108 discussed above. However, the signatures in conversion log 404 are typically signatures of the sectors storing encrypted content. Conversion log 404 is maintained in memory (e.g., RAM) and persisted on a storage device (e.g., storage volume 110), analogous to versions of encrypted chunks map 402. Alternatively, conversion log 404 can be maintained in a nonvolatile memory (e.g., Flash memory) that maintains its state when computing device 400 is powered off, in which case conversion log 404 need not be both maintained in memory and persisted on a storage device. Additionally, multiple versions of conversion log 404 can be maintained, analogous to encrypted chunks map 402 versions.
After the encrypted content of the sectors is written to storage volume 110 and conversion log 404 (in memory and persisted on the storage device) is updated, encrypted chunks map 402 is changed to reflect that the chunk that includes the data being written to has been encrypted. For example, the bit corresponding to the chunk that includes the sector being written to is set. Read/write control module 104 then ceases holding the write request, and re-processes the write request. The chunk that includes the sector being written to is no longer unencrypted, and thus read/write control module 104 invokes encryption/decryption control module 102 to encrypt the content of the sector, and writes the encrypted content of the sector to storage volume 110 as discussed above. It should be noted that various changes to this ordering can be made. For example, the data being written can be encrypted prior to the write request being held.
Alternatively, rather than re-processing the write request, module 104 can read the content of the sectors in the chunk, replace the sector being written to with the content being written as part of the write request, and write the encrypted content of the sectors of the chunk to storage volume 110. Thus, the write request is effectively incorporated into the reading, encrypting, and writing of the chunk.
In one or more embodiments, in response to activating a policy on computing device 400 indicating that data stored on storage volume 110 after activation of the policy be encrypted, policy module 106 begins a process of identifying chunks of sectors of storage volume 110 that are not in use. Whether a particular sector of storage volume 110 is in use can be determined in different manners, such as by obtaining an indication from an operating system of computing device 400 as to which sectors are in use and which sectors are not in use. In response to detecting a chunk for which all sectors in the chunk are not in use, policy module 106 changes encrypted chunks map 402 to indicate that chunk is encrypted or not in use (e.g., a bit corresponding to that chunk is set). Thus, encrypted chunks map 402 can initially indicate that all chunks are unencrypted, and then have chunks marked as encrypted or not in use as those chunks are encrypted or identified as not in use.
Policy module 106 can perform this process of identifying chunks that are not in use in different manners. For example, policy module 106 can monitor computing device 400 for, and perform the process during, times of low storage volume usage (e.g., less than a threshold number of read and/or write access to storage volume 110 in a threshold amount of time). By way of another example, policy module 106 can monitor computing device 400 for, and perform the process during, times when computing device 400 is not typically being used (e.g., between midnight and 4:00 am). By way of yet another example, policy module 106 can monitor computing device 400 for, and perform the process during, times when computing device 400 is plugged in (e.g., operating on AC power rather than on battery power).
Similarly, in one or more embodiments policy module 106 can begin a process of encrypting the unencrypted data in sectors of storage volume 110. Policy module 106 can begin encrypting the unencrypted data in sectors of storage volume 110 at different times, such as after the process of identifying chunks of sectors of storage volume 110 that are not in use has been completed, in response to activating a policy on computing device 400 indicating that data stored on storage volume 110 after activation of the policy be encrypted, and so forth. Which sectors have unencrypted data can be readily identified (e.g., the sectors included in chunks having corresponding bits in encrypted chunks map 402 that are not set, other records or logs maintained by policy module 106 and/or an operating system of computing device 400). The encrypting of unencrypted data in sectors of storage volume 110 can be performed, for example, by requesting that the unencrypted data from sectors in a chunk be read and then written back to those sectors. As the request to write the data back to the sectors is received after the policy is activated, the data written back is encrypted. Once the encrypted sectors of a chunk are written back, encrypted chunks map 402 is changed to reflect that the chunk is no longer unencrypted (e.g., the bit corresponding to the chunk is set).
When no unencrypted data remains on storage volume 110, use of encrypted chunks map 402 can cease, and encrypted chunks map 402 can be deleted and/or ignored. The data that was written to storage volume 110 before encrypted chunks map 402 was used has been re-written as encrypted data, and data written to storage volume 110 using encrypted chunks map 402 is encrypted. Read/write control module 104 can simply invoke encryption/decryption control module 102 to encrypt data being written and decrypt data being read without using encrypted chunks map 402.
When performing such a process of encrypting the unencrypted data in sectors of storage volume 110, a record of which sectors have been encrypted can be maintained in different manners. For example, a separate log or record of which sectors have been encrypted can be maintained by policy module 106. By way of another example, after unencrypted data from sectors in a chunk is read and written back to the storage volume as encrypted data, a bit in encrypted chunks map 402 corresponding to the chunk can be set.
Policy module 106 can perform this process of encrypting unencrypted sectors in different manners. For example, policy module 106 can monitor computing device 400 for, and perform the process during, times of low storage volume usage (e.g., less than a threshold number of read and/or write access to storage volume 110 in a threshold amount of time). By way of another example, policy module 106 can monitor computing device 400 for, and perform the process during, times when computing device 400 is not typically being used (e.g., between midnight and 4:00 am). By way of yet another example, policy module 106 can monitor computing device 400 for, and perform the process during, times when computing device 400 is plugged in (e.g., operating on AC power rather than on battery power).
Although a single encrypted chunks map 402 is illustrated in computing device 400, alternatively multiple encrypted chunks maps 402 can be included (each having multiple versions as discussed above). These different encrypted chunks maps 402 can correspond to different parts of storage volume 110. These different parts can be determined in different manners, such as particular collections of sectors of storage volume 110 having a particular size (e.g., collections of sectors totaling 2-4 Gigabytes). Each of these different encrypted chunks maps is used as discussed above, and which of the multiple encrypted chunks maps is used is dependent on the particular sector or sectors being read from or written to for a particular request.
Situations can arise in which computing device 400 crashes or loses power during a write, such as when data is being written to storage volume 110, when a conversion log or encrypted chunks map is being persisted, and so forth. To resolve such situations, when computing device 400 boots (e.g., due to being restarted, reset, etc.) read/write control module 104 retrieves the most recent valid version of encrypted chunks map 402 persisted on storage volume 110. Whether a particular version of encrypted chunks map 402 is valid can be determined in different manners (e.g., based on a checksum or other value stored with the encrypted chunks map 4020 on storage volume 110). Read/write control module 104 also retrieves the most recent valid version of conversion log 404 persisted on storage volume 110. Whether a particular version of conversion log 404 is valid can be determined in different manners (e.g., based on a checksum or other value stored with the conversion log 404 on storage volume 110).
Conversion log 404 includes an indication of the most recently encrypted sector (or chunk). For the most recently encrypted sector (or chunk), if encrypted chunks map 402 indicates that the chunk that includes the most recently encrypted sector (or the most recently encrypted chunk) is not unencrypted (e.g., the bit corresponding to the chunk is set), then no recovery need be performed. However, if encrypted chunks map 402 indicates that the chunk that includes the most recently encrypted sector (or the most recently encrypted chunk) is unencrypted (e.g., the bit corresponding to the chunk is not set), then recovery may be performed. What recovery is to be performed can be determined in different manners, such as based on signatures of the sectors (e.g., which sectors in the chunk have been encrypted can be determined based on the signatures—if the signature of the sector in conversion log 404 matches (e.g., is the same as) the signature of the sector on storage volume 110 then the sector has been encrypted, and if the signatures do not match then the sector has not been encrypted). Sectors in the chunk that have not been encrypted are encrypted, and the bit in the encrypted chunks map 402 corresponding to the chunk is set. One or more other operating system modules supporting recovery can optionally be invoked to perform the recovery.
Signatures of encrypted sectors are discussed above as stored in conversion log 404. Alternatively, the signatures in conversion log 404 can be signatures of unencrypted sectors. In such situations, a sector can be decrypted and the signature of the unencrypted content of the sector generated. If the signature of the unencrypted content of the sector matches (e.g., is the same as) the signature of the sector in conversion log 404 then the sector has been encrypted, and if the signatures do not match then the sector has not been encrypted.
FIG. 5 is a flowchart illustrating an example process 500 for implementing rapid compliance with a data encryption policy in accordance with one or more embodiments. Process 500 is carried out by a computing device, such as computing device 100 of FIG. 1, and can be implemented in software, firmware, hardware, or combinations thereof. Process 500 is shown as a set of acts and is not limited to the order shown for performing the operations of the various acts. Process 500 is an example process for implementing rapid compliance with a data encryption policy; additional discussions of implementing rapid compliance with a data encryption policy are included herein with reference to different figures.
In process 500, a request to activate a policy for a computing device is received (act 502). The policy indicates that data written by the computing device to a storage volume after activation of the policy be encrypted. The request can be received from various sources, such as user of the computing device, a service being accessed by the computing device, an administrator of a network to which the computing device is coupled, and so forth.
The policy is activated for the computing device in response to the request (act 504). By activating the policy, data written to the storage volume after returning the indication of compliance with the policy is encrypted, despite one or more sectors of the storage volume being unencrypted (plaintext).
An indication of compliance with the policy is also returned in response to the request (act 506). This indication can be returned immediately as a rapid indication of compliance, and can be returned despite one or more sectors of the storage volume being unencrypted (plaintext).
FIG. 6 is a flowchart illustrating an example process 600 for implementing rapid compliance with a data encryption policy using a sector map in accordance with one or more embodiments. Process 600 is carried out by a computing device, such as computing device 100 of FIG. 1, and can be implemented in software, firmware, hardware, or combinations thereof. Process 600 is shown as a set of acts and is not limited to the order shown for performing the operations of the various acts. Process 600 is an example process for implementing rapid compliance with a data encryption policy using a sector map; additional discussions of implementing rapid compliance with a data encryption policy using a sector map are included herein with reference to different figures.
In process 600, a sector map identifying one or more sectors of a storage volume is accessed (act 602). The sector map is accessed to comply with a policy indicating that data written by the computing device to the storage volume after activation of the policy be encrypted. The sector map is typically accessed from volatile memory as discussed above, and can be copied into volatile memory from the storage volume as appropriate.
After activation of the policy, a request to read the content of a sector of the storage volume is received (act 604). In response to the request, a check is made as to whether the sector is identified in the sector map (act 606).
If the sector is identified in the sector map, then a check is made as to whether the signature of the content of the sector matches the signature for that sector as identified in the sector map (act 608). If the signature of the content of the sector matches the signature for that sector as identified in the sector map, then the content of the sector is returned without decrypting the content (act 610). The content is returned to a requester from which the request to read the content was received, such as another program or application running on the computing device.
However, if the signature of the content of the sector does not match the signature for that sector as identified in the sector map in act 608, or if the sector is not identified in the sector map in act 606, then the content of the sector is decrypted (act 612), and the decrypted content is returned (act 614). The content is returned to a requester from which the request to read the content was received, such as another program or application running on the computing device.
Alternatively, a bitmap with bits indicating whether corresponding sectors have been written to after the sector map was locked can be used as discussed above. When using such a bitmap, an additional act prior to act 606 is included in process 600, the additional act being checking whether the bitmap indicates that the sector has been written to after the sector map was locked. If the bitmap indicates that the sector has been written to after the sector map was locked, then the content of the sector is decrypted (act 612) and returned (act 614). However, if the bitmap indicates that the sector has not been written to after the sector map was locked, then process 600 proceeds to act 606.
FIG. 7 is a flowchart illustrating an example process for implementing rapid compliance with a data encryption policy using an encrypted chunks map in accordance with one or more embodiments. Process 700 is carried out by a computing device, such as computing device 100 of FIG. 1, and can be implemented in software, firmware, hardware, or combinations thereof. Process 700 is shown as a set of acts and is not limited to the order shown for performing the operations of the various acts. Process 700 is an example process for implementing rapid compliance with a data encryption policy using an encrypted chunks map; additional discussions of implementing rapid compliance with a data encryption policy using an encrypted chunks map are included herein with reference to different figures.
In process 700, an encrypted chunks map identifying one or more chunks of sectors of a storage volume is accessed (act 702). The encrypted chunks map is accessed to comply with a policy indicating that data written by the computing device to the storage volume after activation of the policy be encrypted.
A chunk that includes a sector to which data is requested to be written is identified (act 704). Which sectors are included in which chunks can be determined in different manners, as discussed above.
A determination is made as to whether the chunk is unencrypted (act 706). This determination is made based on the encrypted chunks map as discussed above. For example, if a bit in the encrypted chunks map corresponding to the chunk is not set then the chunk is unencrypted, and if the bit in the encrypted chunks map corresponding to the chunk is set then the chunk is encrypted (or not in use).
If the chunk is not unencrypted, then the data to be written to the sector is encrypted (act 708), and the encrypted data is written to the sector of the storage volume (act 710).
However, if the chunk is unencrypted, then the write request is placed on hold (act 712). Placing the write request on hold allows the sectors in the chunk that includes the sector to which data is requested to be written to be encrypted.
The sectors in the chunk that includes the sector to which data is requested to be written are encrypted (act 714). All sectors included in the chunk can be encrypted, or alternatively sectors in the chunk other than the sector to which data is requested to be written can be encrypted as discussed above.
The encrypted chunks map is updated in memory and the updated map is persisted on the storage volume (act 716). The update to the encrypted chunks map is a change to the encrypted chunks map to reflect that the chunk including the sectors that were encrypted in act 714 is no longer unencrypted as discussed above. Multiple versions of the encrypted chunks map can also be maintained as discussed above.
The hold on the write request ceases (act 718), and process 700 returns to act 706 to again check whether the chunk is unencrypted. As the chunk is no longer unencrypted, process 700 proceeds to acts 708 and 710 as discussed above. Alternatively, process 700 can return to act 708 rather than act 706.
The rapid compliance with data encryption policy techniques discussed herein support various usage scenarios, allowing a rapid indication to be provided of compliance with a policy indicating that data written to a storage volume after activation of the policy be encrypted despite one or more sectors of the storage volume being unencrypted. For example, the sector map can be used to identify which sectors were written to prior to the sector map being locked. This sector map can be locked when an operating system is installed or initialized on the computing device, or alternatively in response to the request to comply with the policy. Regardless of when the sector map is locked, after being locked data written to the storage volume is encrypted, and the sector map can be used to determine whether to decrypt or not decrypt data based on when the data was written to the storage volume. By way of another example, the encrypted chunks map can be used to identify which chunks of sectors are unencrypted after application of the policy to the computing device. Data written to sectors after activation of the policy is encrypted, and the encrypted chunks map can be used to determine whether to decrypt or not decrypt data based on whether the chunk that includes the sector from which data is read is unencrypted.
Various actions such as receiving, returning, recording, storing, generating, obtaining, and so forth performed by various modules are discussed herein. A particular module discussed herein as performing an action includes that particular module itself performing the action, or alternatively that particular module invoking or otherwise accessing another component or module that performs the action (or performs the action in conjunction with that particular module). Thus, a particular module performing an action includes that particular module itself performing the action and/or another module invoked or otherwise accessed by that particular module performing the action.
FIG. 8 illustrates an example computing device 800 that can be configured to implement rapid compliance with a data encryption policy in accordance with one or more embodiments. Computing device 800 can be, for example, computing device 100 of FIG. 1.
Computing device 800 includes one or more processors or processing units 802, one or more computer readable media 804 which can include one or more memory and/or storage components 806, one or more input/output (I/O) devices 808, and a bus 810 that allows the various components and devices to communicate with one another. Computer readable media 804 and/or one or more I/O devices 808 can be included as part of, or alternatively may be coupled to, computing device 800. Processor 802, computer readable media 804, one or more of devices 808, and/or bus 810 can optionally be implemented as a single component or chip (e.g., a system on a chip). Bus 810 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or local bus, and so forth using a variety of different bus architectures. Bus 810 can include wired and/or wireless buses.
Memory/storage component 806 represents one or more computer storage media. Component 806 can include volatile media (such as random access memory (RAM)) and/or nonvolatile media (such as read only memory (ROM), Flash memory, optical disks, magnetic disks, and so forth). Component 806 can include fixed media (e.g., RAM, ROM, a fixed hard drive, etc.) as well as removable media (e.g., a Flash memory drive, a removable hard drive, an optical disk, and so forth).
The techniques discussed herein can be implemented in software, with instructions being executed by one or more processing units 802. It is to be appreciated that different instructions can be stored in different components of computing device 800, such as in a processing unit 802, in various cache memories of a processing unit 802, in other cache memories of device 800 (not shown), on other computer readable media, and so forth. Additionally, it is to be appreciated that the location where instructions are stored in computing device 800 can change over time.
One or more input/output devices 808 allow a user to enter commands and information to computing device 800, and also allows information to be presented to the user and/or other components or devices. Examples of input devices include a keyboard, a cursor control device (e.g., a mouse), a microphone, a scanner, and so forth. Examples of output devices include a display device (e.g., a monitor or projector), speakers, a printer, a network card, and so forth.
Various techniques may be described herein in the general context of software or program modules. Generally, software includes routines, programs, applications, objects, components, data structures, and so forth that perform particular tasks or implement particular abstract data types. An implementation of these modules and techniques may be stored on or transmitted across some form of computer readable media. Computer readable media can be any available medium or media that can be accessed by a computing device. By way of example, and not limitation, computer readable media may comprise “computer storage media” and “communication media.”
“Computer storage media” include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Computer storage media refer to media for storage of information in contrast to mere signal transmission, carrier waves, or signals per se. Thus, computer storage media refers to non-signal bearing media, and is not communication media.
“Communication media” typically embody computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as carrier wave or other transport mechanism. Communication media also include any information delivery media. The term “modulated data signal” means a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared, and other wireless media. Combinations of any of the above are also included within the scope of computer readable media.
Generally, any of the functions or techniques described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or a combination of these implementations. The terms “module” and “component” as used herein generally represent software, firmware, hardware, or combinations thereof. In the case of a software implementation, the module or component represents program code that performs specified tasks when executed on a processor (e.g., CPU or CPUs). The program code can be stored in one or more computer readable memory devices, further description of which may be found with reference to FIG. 8. In the case of hardware implementation, the module or component represents a functional block or other hardware that performs specified tasks. For example, in a hardware implementation the module or component can be an application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), complex programmable logic device (CPLD), and so forth. The features of the rapid compliance with data encryption policy techniques described herein are platform-independent, meaning that the techniques can be implemented on a variety of commercial computing platforms having a variety of processors.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

## Claims

1. A method implemented in a computing device, the method comprising:
accessing an encrypted chunks map of a storage volume to comply with a policy for the computing device, the encrypted chunks map grouping sectors of the storage volume into one or more chunks and indicating for each chunk whether sectors in the chunk are unencrypted or encrypted, the policy indicating that data written by the computing device to the storage volume after activation of the policy be encrypted;
in response to a request to write data to a sector of the storage volume:
identifying a chunk that includes the sector of the storage volume to which the data is requested to be written; and
determining, using the encrypted chunks map, whether the identified chunk is unencrypted;
in response to determining the identified chunk is not unencrypted:
encrypting the data to be written; and
writing the encrypted data to the sector of the storage volume to which the data is requested to be written; and
in response to determining the identified chunk is unencrypted:
encrypting sectors included in the identified chunk;
updating the encrypted chunks map;
encrypting the data to be written; and
writing the encrypted data to the sector of the storage volume to which the data is requested to be written.

2. The method as recited in claim 1, the encrypting the sectors included in the identified chunk comprising encrypting all sectors included in the identified chunk.

3. The method as recited in claim 1, the encrypting the sectors included in the identified chunk comprising encrypting sectors included in the identified chunk other than the sector to which the data is requested to be written.

4. The method as recited in claim 1, wherein the one or more chunks have different numbers of sectors.

5. The method as recited in claim 1, wherein the sectors included in each chunk are grouped by sector number in numeric order.

6. The method as recited in claim 1, wherein the encrypted chunks map comprises a bitmap, each chunk corresponding to a bit of the bitmap, each bit being set to indicate that sectors in the corresponding chunk are encrypted or each bit being not set to indicate that sectors in the corresponding chunk are unencrypted.

7. The method as recited in claim 1, wherein the encrypted chunks map comprises a most recent version of the encrypted chunks map and a next most recent version of the encrypted chunks map.

8. The method as recited in claim 1, wherein the updating the encrypted chunks map comprises replacing a previous version of the encrypted chunks map with a most recent version of the encrypted chunks map and changing the most recent version of the encrypted chunks map.

9. The method as recited in claim 1, further comprising, responsive to receiving a request from a requestor to read content from a sector of the storage volume:
determining, using the encrypted chunks map, whether a chunk including the sector from which the content is requested to be read is unencrypted;
responsive to determining the chunk is unencrypted, returning the content from the sector to the requestor; and
responsive to determining the chunk is not unencrypted:
decrypting the content from the sector; and
returning the decrypted content to the requestor.

10. The method as recited in claim 1, further comprising maintaining a conversion log including identifiers of sectors that have been encrypted and signatures of sectors storing encrypted content.

11. A computing device comprising:
one or more hardware processors; and
one or more computer storage media devices having stored thereon multiple instructions that, when executed by the one or more processors to, cause the one or more processors to:
access an encrypted chunks map of a storage volume to comply with a policy for the computing device, the encrypted chunks map grouping sectors of the storage volume into one or more chunks and indicating for each chunk whether sectors in the chunk are unencrypted or encrypted, the policy indicating that data written by the computing device to the storage volume after activation of the policy be encrypted;
in response to a request to write data to a sector of the storage volume:
identify a chunk that includes the sector of the storage volume to which the data is requested to be written; and
determine, using the encrypted chunks map, whether the identified chunk is unencrypted;
in response to determining the identified chunk is not unencrypted:
encrypt the data to be written; and
write the encrypted data to the sector of the storage volume to which the data is requested to be written; and
in response to determining the identified chunk is unencrypted:
read the sectors included in the identified chunk;
replace, from the read sectors, the content of the sector being written to with the data begin written to the sector;
encrypt the sectors included in the identified chunk, including the replaced sector;
write the encrypted content of the sectors included in the identified chunk to the storage volume.

12. The computing device as recited in claim 11, wherein the encrypted chunks map initially indicates that all chunks are unencrypted.

13. The computing device as recited in claim 11, wherein the multiple instructions further cause the one or more hardware processors to, responsive to receiving a request from a requestor to read content from a sector of the storage volume:
determine, using the encrypted chunks map, whether a chunk including the sector from which the content is requested to be read is unencrypted;
responsive to determining the chunk is unencrypted, return the content from the sector to the requestor; and
responsive to determining the chunk is not unencrypted:
decrypt the content from the sector; and
return the decrypted content to the requestor.

14. The computing device as recited in claim 11, wherein the multiple instructions further cause the one or more hardware processors to:
identify one or more chunks that includes sectors of the storage volume that are not in use; and
update the encrypted chunks map to indicate the identified one or more chunks are encrypted.

15. A method comprising:
receiving, by a computing device, a request to activate a policy for the computing device, the policy indicating that data written by the computing device to a storage volume after activation of the policy be encrypted;
activating, in response to the request, the policy for the computing device, including:
encrypting data written to the storage volume after returning an indication of compliance with the policy,
using a map to identify one or more collections of content on the storage volume that are not encrypted, the map identifying one or more collections of content written to prior to the map being locked to prohibit changes to the map and the map including signatures of collections of content that were written to the storage volume prior to the map being locked, data written to the storage volume after the map is locked being encrypted but at least some data written to the storage volume before the map is locked not being encrypted, and
using the map to determine whether to decrypt a collection of content in response to a request to read the collection of content; and
returning, in response to the request to activate the policy, the indication of compliance with the policy despite at least part of the storage volume being unencrypted.

16. The method as recited in claim 15, the returning comprising returning the response without waiting for the storage volume to be encrypted.

17. The method as recited in claim 15, the map being locked in response to the request to activate the policy for the computing device.

18. The method as recited in claim 15, further comprising:
encrypting unencrypted data from the storage volume;
determining when no unencrypted data remains on the storage volume; and
deleting the map and ceasing using the map in response to no unencrypted data remaining on the storage volume.

19. The method as recited in claim 15, the signature of a collection of content comprising a value generated as a function of the collection of content.

20. The method as recited in claim 15, further comprising maintaining the map on the storage volume, and mapping the map from the storage volume into a map in volatile memory when the computing device starts operation.