Software:dm-crypt
dm-crypt is a transparent block device encryption subsystem in Linux kernel versions 2.6 and later and in DragonFly BSD. It is part of the device mapper (dm) 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 for further information), in order to avoid watermarking attacks.[1] In addition to that, dm-crypt addresses some reliability problems of cryptoloop.[2]
dm-crypt 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.
Some Linux distributions support the use of dm-crypt on the root file system. These distributions use initrd to prompt the user to enter a passphrase at the console, or insert a smart card prior to the normal boot process.[3]
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. At least two frontends are currently available: cryptsetup
and cryptmount
.
cryptsetup
Original author(s) | Jana Saout, Clemens Fruhwirth, Milan Broz[4] |
---|---|
Stable release | |
Preview release | |
Written in | C |
Operating system | Unix-like |
Platform | x86, x86-64, ARMv8, ARMv7, ppc64le, MIPS |
Size | 7 MB |
Available in | 16 languages[6] |
List of languages English, Portuguese, Chinese (Simplified), Czech, Danish, Dutch, Finnish, French, German, Italian, Japanese, Polish, Russian, Spanish, Swedish, Ukrainian | |
Type | Disk encryption software |
License | GPLv2[7] Sub-Libraries: LGPLv2.1+[8] |
Website | gitlab |
The cryptsetup
command-line interface, by default, 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 is directly derived from the supplied passphrase.
Because it lacks a "salt", using cryptsetup is less secure in this mode than is the case with Linux Unified Key Setup (LUKS).[9] However, the simplicity of cryptsetup makes it useful when combined with third-party software, for example, with smart card authentication.
cryptsetup
also provides commands to deal with the LUKS on-disk format. This format provides additional features such as key management and key stretching (using PBKDF2), and remembers encrypted volume configuration across reboots.[3][10]
cryptmount
The cryptmount
interface is an alternative to the "cryptsetup" tool that allows any user to mount and unmount a dm-crypt file system when needed, without needing superuser privileges after the device has been configured by a superuser.
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; write barriers implemented by file systems are preserved.[11][12] 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). dm-crypt can also be configured to encrypt RAID volumes and LVM physical volumes.
dm-crypt can also be configured to provide pre-boot authentication through an initrd, thus encrypting all the data on a computer – except the bootloader, the kernel and the initrd image 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.
The Linux Crypto API includes support for most popular block ciphers and hash functions, which are all usable with dm-crypt.
Crypted FS support include LUKS volumes, loop-AES and since Linux kernel 3.13, the TrueCrypt target called "tcw".[13][14][15]
Compatibility
dm-crypt and LUKS encrypted disks can be accessed and used under MS Windows using the now defunct FreeOTFE (formerly DoxBox, LibreCrypt), provided that the filesystem used is supported by Windows (e.g. FAT/FAT32/NTFS). Encrypted ext2 and ext3 filesystems are supported by using Ext2Fsd or so-called "Ext2 Installable File System for Windows";[16] FreeOTFE also supports them.
Cryptsetup/LUKS and the required infrastructure have also been implemented on the DragonFly BSD operating system.[17]
See also
References
- ↑ 1.0 1.1 Clemens Fruhwirth (2005-07-18). New Methods in Hard Disk Encryption. Vienna University of Technology. http://clemens.endorphin.org/nmihde/nmihde-A4-ds.pdf. Retrieved 2007-04-20.
- ↑ Mike Peters (2004-06-08). Encrypting partitions using dm-crypt and the 2.6 series kernel. http://archive09.linux.com/feature/36596. Retrieved 2012-02-20.
- ↑ 3.0 3.1 3.2 W. Michael Petullo (2007-01-18). "Disk encryption in Fedora: Past, present and future". Red Hat Magazine. http://www.redhatmagazine.com/2007/01/18/disk-encryption-in-fedora-past-present-and-future/.
- ↑ "AUTHORS". https://gitlab.com/cryptsetup/cryptsetup/blob/master/AUTHORS.
- ↑ 5.0 5.1 5.2 5.3 "docs · master · cryptsetup / cryptsetup". https://gitlab.com/cryptsetup/cryptsetup/-/tree/master/docs.
- ↑ "The cryptsetup textual domain". http://translationproject.org/domain/cryptsetup.html.
- ↑ "COPYING". https://gitlab.com/cryptsetup/cryptsetup/blob/master/COPYING.
- ↑ "COPYING.LGPL". https://gitlab.com/cryptsetup/cryptsetup/blob/master/COPYING.LGPL.
- ↑ "cryptsetup FAQ". https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions.
- ↑ Clemens Fruhwirth (2004-07-15). "TKS1 – An anti-forensic, two level, and iterated key setup scheme". Draft. http://clemens.endorphin.org/TKS1-draft.pdf. Retrieved 2006-12-12.
- ↑ Milan Broz (2012-04-24). "[dm-crypt] Does dm-crypt support journaling filesystem transactional guarantees?". saout.de. http://www.saout.de/pipermail/dm-crypt/2012-April/002441.html.
- ↑ Mikulas Patocka (2009-06-22). "kernel/git/torvalds/linux.git". Linux kernel source tree. kernel.org. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=647c7db14ef9cacc4ccb3683e206b61f0de6dc2b.
- ↑ "dm-crypt: Linux kernel device-mapper crypto target – IV generators". cryptsetup. 2014-01-11. https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt#iv-generators.
- ↑ "dm-crypt: Linux kernel device-mapper crypto target". https://gitlab.com/cryptsetup/cryptsetup/wikis/DMCrypt.
- ↑ "[dm-devel [PATCH 2/2] dm-crypt: Add TCW IV mode for old CBC TCRYPT containers."]. redhat.com. http://www.redhat.com/archives/dm-devel/2013-October/msg00081.html.
- ↑ "Ext2 IFS For Windows". fs-driver.org. http://www.fs-driver.org/.
- ↑ Alex Hornung (2010-07-23). "HEADS UP: dm, lvm, cryptsetup and initrd on master". http://leaf.dragonflybsd.org/mailarchive/users/2010-07/msg00036.html.
External links
- Official , cryptsetup-luks and * All about dm-crypt and LUKS on one page (on archive.org) – a page covering dm-crypt/LUKS, starting with theory and ending with many practical examples about its usage.
Original source: https://en.wikipedia.org/wiki/Dm-crypt.
Read more |