Disk encryption is a special case of data at rest protection when the storage medium is a sector-addressable device (e.g., a hard disk). This article presents cryptographic aspects of the problem. For an overview, see disk encryption. For discussion of different software packages and hardware devices devoted to this problem, see disk encryption software and disk encryption hardware.
Problem definition
Disk encryption methods aim to provide three distinct properties:
The data on the disk should remain confidential. Data retrieval and storage should both be fast operations, no matter where on the disk the data is stored. The encryption method should not waste disk space (i.e., the amount of storage used for encrypted data should not be significantly larger than the size of plaintext). The first property requires defining an adversary from whom the data is being kept confidential. The strongest adversaries studied in the field of disk encryption have these abilities:
they can read the raw contents of the disk at any time; they can request the disk to encrypt and store arbitrary files of their choosing; and they can modify unused sectors on the disk and then request their decryption. A method provides good confidentiality if the only information such an adversary can determine over time is whether the data in a sector has or has not changed since the last time they looked. The second property requires dividing the disk into several sectors, usually 512 bytes (4096 bits) long, which are encrypted and decrypted independently of each other. In turn, if the data is to stay confidential, the encryption method must be tweakable; no two sectors should be processed in exactly the same way. Otherwise, the adversary could decrypt any sector of the disk by copying it to an unused sector of the disk and requesting its decryption. Whereas a purpose of a usual block cipher EK is to mimic a random permutation for any secret key K, the purpose of tweakable encryption EKT is to mimic a random permutation for any secret key K and any known tweak T. The third property is generally non-controversial. However, it indirectly prohibits the use of stream ciphers, since stream ciphers require, for their security, that the same initial state not be used twice (which would be the case if a sector is updated with different data); thus this would require an encryption method to store separate initial states for every sector on disk—seemingly a waste of space. The alternative, a block cipher, is limited to a certain block size (usually 128 or 256 bits). Because of this, disk encryption chiefly studies chaining modes, which expand the encryption block length to cover a whole disk sector. The considerations already listed make several well-known chaining modes unsuitable: ECB mode, which cannot be tweaked, and modes that turn block ciphers into stream ciphers, such as the CTR mode. These three properties do not provide any assurance of disk integrity; that is, they don't tell you whether an adversary has been modifying your ciphertext. In part, this is because an absolute assurance of disk integrity is impossible: no matter what, an adversary could always revert the entire disk to a prior state, circumventing any such checks. If some non-absolute level of disk integrity is desired, it can be achieved within the encrypted disk on a file-by-file basis using message authentication codes.
When taking additional space is acceptable Although it used to be commonly accepted that disk encryption should be length-preserving, some additional features do justify the use of extra space. One example is authenticated encryption, which takes extra space in exchange for guaranteeing the integrity of the sector. One application of this guarantee would be to prevent an attacker from triggering kernel bugs by breaking the filesystem.
Narrow and wide block Disk encryption methods are also distinguished into "narrow-block" and "wide-block" methods. For a sector-sized plaintext, narrow-block method encrypts it in multiple blocks, while a wide-block methods does it in just one. Narrow-block methods such as LRW, XES, and XTS allow an attacker to exploit the block granularity to perform traffic analysis and replay. A wide-block cipher ideally makes the entire ciphertext unrecognizable for a change anywhere in the plaintext.
Block cipher-based modes Like most encryption schemes, block cipher-based disk encryption makes use of modes of operation, which allow encrypting larger amounts of data than the ciphers' block-size (typically 128 bits). Modes are therefore rules on how to repeatedly apply the ciphers' single-block operations.
Cipher-block chaining (CBC)
Cipher-block chaining (CBC) is a common chaining mode in which the previous block's ciphertext is xored with the current block's plaintext before encryption:
Ci=EK(Ci−1⊕Pi). Since there isn't a "previous block's ciphertext" for the first block, an initialization vector (IV) must be used as C−1. This, in turn, makes CBC tweakable in some ways. CBC suffers from some problems. For example, if the IVs are predictable, then an adversary may leave a "watermark" on the disk, i.e., store a specially created file or combination of files identifiable even after encryption. The exact method of constructing the watermark depends on the exact function providing the IVs, but the general recipe is to create two encrypted sectors with identical first blocks b1 and b2; these two are then related to each other by b1⊕IV1=b2⊕IV2. Thus the encryption of b1 is identical to the encryption of b2, leaving a watermark on the disk. The exact pattern of "same-different-same-different" on disk can then be altered to make the watermark unique to a given file. To protect against the watermarking attack, a cipher or a hash function is used to generate the IVs from the key and the current sector number, so that an adversary cannot predict the IVs. In particular, the ESSIV approach uses a block cipher in CTR mode to generate the IVs.
… excerpt ends here. Continue reading the full article.

