dm-crypt is the Linux kernel'sdevice mapper crypto target. FromWikipedia:dm-crypt, it is:
- a transparent disk encryption subsystem in [the] Linux kernel... [It is] implemented as a device mapper target and may be stacked on top of other device mapper transformations. It can thus encrypt whole disks (including removable media), partitions, software RAID volumes, logical volumes, as well as files. It appears as a block device, which can be used to back file systems, swap or as an LVM physical volume.
Usage
- /Drive preparation
- Deals with operations likesecurely erasing the drive anddm-crypt specific points forpartitioning it.
- /Device encryption
- Covers how to manually utilize dm-crypt to encrypt a system through thecryptsetup command. It covers examples of theencryption options, deals with the creation ofkeyfiles, LUKS specific commands forkey management as well as forBackup and restore.
- /System configuration
- Illustrates how to configuremkinitcpio,kernel parameters and thecrypttab file when encrypting a system.
- /Swap encryption
- Covers how to add swap to an encrypted system, as swap must be encrypted as well to protect any data swapped out by the system. This part details methodswithout andwith suspend-to-disk support.
- /Specialties
- Deals with special operations likesecuring the unencrypted boot partition,using GPG or OpenSSL encrypted keyfiles, a method toboot and unlock via the network, another forsetting up discard/TRIM for a SSD, and sections dealing withthe encrypt hook and multiple disks.
- /Mounting at login
Example scenarios
- /Encrypting a non-root file system
- If you need to encrypt a device that is not used for booting a system, like apartition or afile container.
- /Encrypting an entire system
- If you want to encrypt an entire system, in particular a root partition. Several scenarios are covered, including the use ofdm-crypt with theLUKS extension,plain mode encryption and encryption andLVM.
See also
- dm-crypt - The project homepage
- cryptsetup - The LUKS homepage andFAQ - the main and foremost help resource.