Difference between revisions of "Dm-crypt"

From ArchWiki
Jump to: navigation, search
(USB key unlocking)
(two links are to an old untranslated copy of the article, that content is now in dm-crypt/Device Encryption linked above; the third link was to the old talk page, now in Talk:dm-crypt: if that discussion is useful it must be merged to a subpage)
Line 33: Line 33:
See [[Dm-crypt/System Configuration]].
See [[Dm-crypt/System Configuration]].
==USB key unlocking==
* [https://wiki.archlinux.org/index.php/Dm-crypt_with_LUKS_(Italiano)#Storing_the_Key_File How to store the unlock key on a USB drive]
* [https://wiki.archlinux.org/index.php/Dm-crypt_with_LUKS_(Italiano)#Storing_the_key_between_MBR_and_1st_partition Storing the keyfile between MBR and 1st partition] to make it invisible - added level of security through obscurity
* Necessary [https://wiki.archlinux.org/index.php/Talk:System_Encryption_with_LUKS_for_dm-crypt#Decryption_of_root_during_boot_with_the_assistance_of_UDEV_when_key_is_stored_on_USB_drive_between_MBR_and_1st_Partition UDEV rule and initramfs modification] to make it work.
==Swap device encryption==
==Swap device encryption==

Revision as of 12:57, 15 January 2014


This article focuses on how to set up encryption on Arch Linux using dm-crypt, which is the standard device-mapper encryption functionality provided by the Linux kernel.

Common scenarios

This section introduces common scenarios to employ dm-crypt to encrypt a system or individual filesystem mount points. The scenarios cross-link to the other subpages where needed. It is meant as starting point to familiarize with different practical encryption procedures.

See Dm-crypt/Encrypting a Non-Root File System if you need to encrypt a device that is not used for booting a system, like a partition or a loop device.

See Dm-crypt/Encrypting an Entire System if you want to encrypt an entire system, in particular a root partition. Several scenarios are covered, including the use of dm-crypt with the LUKS extension, plain mode encryption and encryption and LVM.

Drive preparation

This step will deal with operations like securely erasing the drive and partitioning it.

See Dm-crypt/Drive Preparation.

Device encryption

This section covers how to manually utilize dm-crypt to encrypt a system through the cryptsetup command, also dealing with the usage of LUKS and keyfiles.

See Dm-crypt/Device Encryption.

System configuration

This page illustrates how to configure mkinitcpio, the boot loader and the crypttab file when encrypting a system.

See Dm-crypt/System Configuration.

Swap device encryption

A swap partition may be added to an encrypted system, if required. The swap partition must be encrypted as well to protect any data swapped out by the system. This part details methods without and with suspend-to-disk support.

See Dm-crypt/Swap Encryption.


This part deals with special operations like securing the unencrypted boot partition, using GPG or OpenSSL encrypted keyfiles, a method to boot and unlock via the network, or setting up discard/TRIM for a SSD.

See Dm-crypt/Specialties.

See also

  • cryptsetup FAQ - The main and foremost help resource, directly from the developers.
  • FreeOTFE - Supports unlocking LUKS encrypted volumes in Microsoft Windows.