dm-crypt
From Wikipedia, the free encyclopedia
dm-crypt is a transparent disk encryption subsystem in Linux kernel versions 2.6 and later. It is part of the device mapper infrastructure, and uses cryptographic routines from the kernel's Crypto API. Unlike its predecessor cryptoloop, dm-crypt was designed to support advanced modes of operation, such as XTS, LRW and ESSIV (see disk encryption theory), in order to avoid watermarking attacks.[1] In addition to that, dm-crypt also addresses some reliability problems of cryptoloop.[2]
Since dm-crypt deals with encrypting raw block devices transparently, it supports encrypting whole disks, partitions, logical volumes, as well as files, and can be used with any file system. Pre-boot authentication can be used with an initrd.[3]
Contents |
[edit] Frontends
The dm-crypt device mapper target resides entirely in kernel space, and is only concerned with encryption of the block device — it does not interpret any data itself. It relies on user space front-ends to create and activate encrypted volumes, and manage authentication. Three frontends are currently available: cryptsetup, cryptsetup-luks [3] and cryptmount.
[edit] cryptsetup
The "cryptsetup" command-line interface does not write any headers to the encrypted volume, and hence only provides the bare essentials: Encryption settings have to be provided every time the disk is mounted (although usually employed with automated scripts), and only one key can be used per volume; the symmetric encryption key directly derived from the supplied passphrase. For these reasons, the use of cryptsetup is discouraged with plain passphrases.[4] However, the simplicity of cryptsetup makes it useful when combined with third party software, for example, with smart card authentication.
[edit] cryptsetup-luks
The "cryptsetup-luks" interface is based on the original cryptsetup utility and retains full compatibility, but adds extra commands to deal with the Linux Unified Key Setup (LUKS) on-disk format. This format provides additional features such as key management and key strengthening, and remembers encrypted volume configuration across reboots.[5][3]
As of May 2007, the codebases of cryptsetup-luks and cryptsetup have been merged, supporting both the old as well as the LUKS interface.
[edit] cryptmount
The "cryptmount" interface is an alternative to the "cryptsetup" tool that allows any user to mount/unmount a dm-crypt file system when needed, without needing superuser privileges after the device has been configured by a superuser.
[edit] Features
The fact that disk encryption (volume encryption) software like dm-crypt only deals with transparent encryption of abstract block devices gives it a lot of flexibility. This means that it can be used for encrypting any disk-backed file systems supported by the operating system, as well as swap space. Encrypted volumes can be stored on disk partitions, logical volumes, whole disks as well as file-backed disk images (through the use of loop devices with the losetup utility). It can also be configured to encrypt RAID volumes and LVM physical volumes.
It can also be configured to use provide pre-boot authentication through an initrd, thus encrypting all data on the computer (except the bootloader and initrd itself).[3]
When using the cipher block chaining mode of operation with predictable initialization vectors as other disk encryption software, the disk is vulnerable to watermarking attacks. This means that an attacker is able to detect the presence of specially crafted data on the disk. To address this problem in its predecessors, dm-crypt included provisions for more elaborate, disk encryption-specific modes of operation.[1] Support for ESSIV (encrypted salt-sector initialization vector) was introduced in Linux kernel version 2.6.10, LRW in 2.6.20 and XTS in 2.6.24. However, the CBC mode is still the default for compatibility with older volumes.
The Linux Crypto API includes support for most popular block ciphers and hash functions, which are all usable with dm-crypt.
[edit] Compatibility
dm-crypt and LUKS encrypted disks can be accessed and used under MS Windows by using FreeOTFE, provided that the filesystem used is supported by Windows (e.g. FAT/FAT32/NTFS)
Encrypted EXT3 and EXT2 filesystems are supported by use of Ext2 Installable File System for Windows and with FreeOTFE
[edit] See also
[edit] References
- ^ a b Clemens Fruhwirth (2005-07-18). "New Methods in Hard Disk Encryption" (PDF). . Vienna University of Technology Retrieved on 2007-04-20.
- ^ Mike Peters (2004-06-08). "Encrypting partitions using dm-crypt and the 2.6 series kernel".
- ^ a b c d W. Michael Petullo (2007-01-18). Disk encryption in Fedora: Past, present and future. Red Hat Magazine. Retrieved on 2007-04-20.
- ^ Markus Reichelt (2004-06-20). Why Mainline Cryptoloop Should Not Be Used. Retrieved on 2007-04-20.
- ^ Clemens Fruhwirth (2004-07-15). "TKS1 – An anti-forensic, two level, and iterated key setup scheme" (PDF). Retrieved on 2006-12-12.