commit e1fbfaf06227e0363a421579dd0831a489ffc8e0
Author: Eric H Christensen <sparks(a)redhat.com>
Date: Wed Jun 11 07:17:46 2014 -0400
Added LUKS instructions from the Install Guide.
en-US/DiskEncryptionUserGuide.xml | 789 +++++++++++++++++++++++++------------
en-US/Encryption.xml | 2 +-
2 files changed, 533 insertions(+), 258 deletions(-)
---
diff --git a/en-US/DiskEncryptionUserGuide.xml b/en-US/DiskEncryptionUserGuide.xml
index 19bbf3a..50d28f4 100644
--- a/en-US/DiskEncryptionUserGuide.xml
+++ b/en-US/DiskEncryptionUserGuide.xml
@@ -1,280 +1,555 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
-
-<chapter id="Disk_Encryption_Guide">
- <title>Disk Encryption Guide</title>
- <section>
- <title>What is block device encryption? </title>
- <para> Block device encryption protects the data on a block device by
encrypting it. To access the device's decrypted contents, a user must provide a
passphrase or key as authentication. This provides additional security beyond existing OS
security mechanisms in that it protects the device's contents even if it has been
physically removed from the system.</para>
- </section>
- <section>
- <title>Encrypting block devices using dm-crypt/LUKS </title>
- <para>
- <ulink url="http://luks.endorphin.org"> LUKS</ulink> (Linux
Unified Key Setup) is a specification for block device encryption. It establishes an
on-disk format for the data, as well as a passphrase/key management policy.</para>
- <para>LUKS uses the kernel device mapper subsystem via the
<command>dm-crypt</command> module. This arrangement provides a low-level
mapping that handles encryption and decryption of the device's data. User-level
operations, such as creating and accessing encrypted devices, are accomplished through the
use of the <command>cryptsetup</command> utility.
- </para>
- <section>
- <title>Overview of LUKS </title>
- <itemizedlist>
- <listitem>
- <para>What LUKS does:
- <itemizedlist>
- <listitem>
- <para>LUKS encrypts entire block devices
- <itemizedlist>
- <listitem>
- <para>LUKS is thereby well-suited for protecting the contents of mobile devices
such as:
- <itemizedlist>
- <listitem>
- <para>Removable storage media</para>
- </listitem>
- <listitem>
- <para>Laptop disk drives</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>The underlying contents of the encrypted block device are arbitrary.
- <itemizedlist>
- <listitem>
- <para>This makes it useful for encrypting <command>swap</command>
devices.</para>
- </listitem>
- <listitem>
- <para>This can also be useful with certain databases that use specially
formatted block devices for data storage.</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>LUKS uses the existing device mapper kernel subsystem.
- <itemizedlist>
- <listitem>
- <para>This is the same subsystem used by LVM, so it is well
tested.</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>LUKS provides passphrase strengthening.
- <itemizedlist>
- <listitem>
- <para>This protects against dictionary attacks.</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>LUKS devices contain multiple key slots.
- <itemizedlist>
- <listitem>
- <para>This allows users to add backup keys/passphrases.</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- <listitem>
- <para>What LUKS does <emphasis>not</emphasis> do:
- <itemizedlist>
- <listitem>
- <para>LUKS is not well-suited for applications requiring many
(more than eight) users to have distinct access keys to the same device.</para>
- </listitem>
- <listitem>
- <para>LUKS is not well-suited for applications requiring
file-level encryption.</para>
- </listitem>
- </itemizedlist>
- </para>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>How will I access the encrypted devices after installation? (System
Startup) </title>
- <para> During system startup you will be presented with a passphrase prompt. After
the correct passphrase has been provided the system will continue to boot normally. If you
used different passphrases for multiple encrypted devices you may need to enter more than
one passphrase during the startup.</para>
- <para>
- <note><title>Tip</title>
- <para>Consider using the same passphrase for all encrypted block
devices in a given system. This will simplify system startup and you will have fewer
passphrases to remember. Just make sure you choose a good passphrase!</para>
- </note>
- </para>
- </section>
- <section>
- <title>Choosing a Good Passphrase </title>
- <para> While dm-crypt/LUKS supports both keys and passphrases, the anaconda
installer only supports the use of passphrases for creating and accessing encrypted block
devices during installation.</para>
- <para>LUKS does provide passphrase strengthening but it is still a good idea to
choose a good (meaning "difficult to guess") passphrase. Note the use of the
term "passphrase", as opposed to the term "password". This is
intentional. Providing a phrase containing multiple words to increase the security of your
data is important.</para>
- </section>
- </section>
-
- <section>
- <title>Creating Encrypted Block Devices in Anaconda </title>
- <para> You can create encrypted devices during system installation. This
allows you to easily configure a system with encrypted partitions.</para>
- <para>To enable block device encryption, check the "Encrypt System"
checkbox when selecting automatic partitioning or the "Encrypt" checkbox when
creating an individual partition, software RAID array, or logical volume. After you finish
partitioning, you will be prompted for an encryption passphrase. This passphrase will be
required to access the encrypted devices. If you have pre-existing LUKS devices and
provided correct passphrases for them earlier in the install process the passphrase entry
dialog will also contain a checkbox. Checking this checkbox indicates that you would like
the new passphrase to be added to an available slot in each of the pre-existing encrypted
block devices.</para>
- <para>
- <note><title>Tip</title>
- <para>Checking the "Encrypt System" checkbox on the
"Automatic Partitioning" screen and then choosing "Create custom
layout" does not cause any block devices to be encrypted automatically.</para>
- </note>
- </para>
- <para>
- <note><title>Tip</title>
- <para>You can use <command>kickstart</command> to set a
separate passphrase for each new encrypted block device.</para>
- </note>
- </para>
- <section>
- <title>What Kinds of Block Devices Can Be Encrypted? </title>
- <para> Most types of block devices can be encrypted using LUKS. From anaconda you
can encrypt partitions, LVM physical volumes, LVM logical volumes, and software RAID
arrays.</para>
- </section>
- <section>
+<?xml version='1.0' encoding='utf-8' ?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % BOOK_ENTITIES SYSTEM "Security_Guide.ent">
+%BOOK_ENTITIES;
+]>
+<section id="sect-Security_Guide-Disk_Encryption_Guide">
+ <title>Disk Encryption</title>
+ <section>
+ <title>What is block device encryption? </title>
+ <para>
+ Block device encryption protects the data on a block device by encrypting it. To
access the device's decrypted contents, a user must provide a passphrase or key as
authentication. This provides additional security beyond existing OS security mechanisms
in that it protects the device's contents even if it has been physically removed from
the system.
+ </para>
+
+ </section>
+
+ <section>
+ <title>Encrypting block devices using dm-crypt/LUKS </title>
+ <para>
+ <firstterm>Linux Unified Key Setup</firstterm> (LUKS) is a specification
for block device encryption. It establishes an on-disk format for the data, as well as a
passphrase/key management policy.
+ </para>
+ <para>
+ LUKS uses the kernel device mapper subsystem via the
<command>dm-crypt</command> module. This arrangement provides a low-level
mapping that handles encryption and decryption of the device's data. User-level
operations, such as creating and accessing encrypted devices, are accomplished through the
use of the <command>cryptsetup</command> utility.
+ </para>
+ <section>
+ <title>Overview of LUKS </title>
+ <itemizedlist>
+ <listitem>
+ <para>
+ What LUKS does:
+ <itemizedlist>
+ <listitem>
+ <para>
+ LUKS encrypts entire block devices
+ <itemizedlist>
+ <listitem>
+ <para>
+ LUKS is thereby well-suited for protecting the contents of mobile devices
such as:
+ <itemizedlist>
+ <listitem>
+ <para>
+ Removable storage media
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ Laptop disk drives
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ The underlying contents of the encrypted block device are arbitrary.
+ <itemizedlist>
+ <listitem>
+ <para>
+ This makes it useful for encrypting <command>swap</command>
devices.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ This can also be useful with certain databases that use specially formatted
block devices for data storage.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ LUKS uses the existing device mapper kernel subsystem.
+ <itemizedlist>
+ <listitem>
+ <para>
+ This is the same subsystem used by LVM, so it is well tested.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ LUKS provides passphrase strengthening.
+ <itemizedlist>
+ <listitem>
+ <para>
+ This protects against dictionary attacks.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ LUKS devices contain multiple key slots.
+ <itemizedlist>
+ <listitem>
+ <para>
+ This allows users to add backup keys/passphrases.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ What LUKS does <emphasis>not</emphasis> do:
+ <itemizedlist>
+ <listitem>
+ <para>
+ LUKS is not well-suited for applications requiring many (more than eight) users
to have distinct access keys to the same device.
+ </para>
+
+ </listitem>
+ <listitem>
+ <para>
+ LUKS is not well-suited for applications requiring file-level encryption.
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </para>
+
+ </listitem>
+
+ </itemizedlist>
+ <para>
+ More detailed information about LUKS is available from the project website at
<ulink
url="http://code.google.com/p/cryptsetup/">http://code.googl...;.
+ </para>
+
+ </section>
+
+ <section>
+ <title>How will I access the encrypted devices after installation? (System
Startup) </title>
+ <para>
+ During system startup you will be presented with a passphrase prompt. After the
correct passphrase has been provided the system will continue to boot normally. If you
used different passphrases for multiple encrypted devices you may need to enter more than
one passphrase during the startup.
+ </para>
+ <para>
+ <note>
+ <title>Tip</title>
+ <para>
+ Consider using the same passphrase for all encrypted block devices in a given
system. This will simplify system startup and you will have fewer passphrases to remember.
Just make sure you choose a good passphrase!
+ </para>
+
+ </note>
+
+ </para>
+
+ </section>
+
+ <section>
+ <title>Choosing a Good Passphrase </title>
+ <para>
+ While dm-crypt/LUKS supports both keys and passphrases, the anaconda installer only
supports the use of passphrases for creating and accessing encrypted block devices during
installation.
+ </para>
+ <para>
+ LUKS does provide passphrase strengthening but it is still a good idea to choose a
good (meaning "difficult to guess") passphrase. Note the use of the term
"passphrase", as opposed to the term "password". This is intentional.
Providing a phrase containing multiple words to increase the security of your data is
important.
+ </para>
+
+ </section>
+
+
+ </section>
+
+ <section>
+ <title>Creating Encrypted Block Devices in Anaconda </title>
+ <para>
+ You can create encrypted devices during system installation. This allows you to easily
configure a system with encrypted partitions.
+ </para>
+ <para>
+ To enable block device encryption, check the "Encrypt System" checkbox when
selecting automatic partitioning or the "Encrypt" checkbox when creating an
individual partition, software RAID array, or logical volume. After you finish
partitioning, you will be prompted for an encryption passphrase. This passphrase will be
required to access the encrypted devices. If you have pre-existing LUKS devices and
provided correct passphrases for them earlier in the install process the passphrase entry
dialog will also contain a checkbox. Checking this checkbox indicates that you would like
the new passphrase to be added to an available slot in each of the pre-existing encrypted
block devices.
+ </para>
+ <para>
+ <note>
+ <title>Tip</title>
+ <para>
+ Checking the "Encrypt System" checkbox on the "Automatic
Partitioning" screen and then choosing "Create custom layout" does not
cause any block devices to be encrypted automatically.
+ </para>
+
+ </note>
+
+ </para>
+ <para>
+ <note>
+ <title>Tip</title>
+ <para>
+ You can use <command>kickstart</command> to set a separate passphrase
for each new encrypted block device.
+ </para>
+
+ </note>
+
+ </para>
+ <section>
+ <title>What Kinds of Block Devices Can Be Encrypted? </title>
+ <para>
+ Most types of block devices can be encrypted using LUKS. From anaconda you can
encrypt partitions, LVM physical volumes, LVM logical volumes, and software RAID arrays.
+ </para>
+
+ </section>
+
+ <!-- <section>
<title>Limitations of Anaconda's Block Device Encryption Support
</title>
<para>This section is about Anaconda's Block Device Encryption
Support</para>
- <!--section>
+ section>
<title>Filling the Device with Random Data Before Encrypting </title>
<para> Filling a device with random data prior to encrypting improves the
strength of the encryption. However, it can take a very long time to fill the device with
random data. It is because of those time requirements that anaconda does not offer this
option. This step can be performed manually, using a <command>kickstart
%pre</command> script. Instructions can be found <xref
linkend="randomize_device"/>.</para>
- </section-->
- <!--section>
+ </section>
+ section>
<title>Using a Key Comprised of Randomly Generated Data to Access Encrypted
Devices </title>
<para> In addition to passphrases, LUKS devices can be accessed with a key
comprised of randomly generated data. Setting up one or more keys to access the encrypted
devices can be done on the installed system or through the use of a
<command>kickstart %post</command> script. Instructions can be found <xref
linkend="new_key"/>.</para>
- </section-->
- </section>
- </section>
-
- <section>
- <title>Creating Encrypted Block Devices on the Installed System After
Installation </title>
- <para> Encrypted block devices can be created and configured after
installation. </para>
- <section>
- <title>Create the block devices </title>
- <para> Create the block devices you want to encrypt by using
<command>parted</command>, <command>pvcreate</command>,
<command>lvcreate</command> and
<command>mdadm</command>.</para>
- </section>
- <section id="randomize_device">
- <title>Optional: Fill the device with random data</title>
- <para> Filling <device> (eg:
<filename>/dev/sda3</filename>) with random data before encrypting it greatly
increases the strength of the encryption. The downside is that it can take a very long
time.</para>
- <para>
- <warning><title>Warning</title>
- <para>The commands below will destroy any existing data on the
device.</para>
- </warning>
- </para>
- <itemizedlist>
- <listitem>
- <para> The best way, which provides high quality random data but takes a long
time (several minutes per gigabyte on most systems):</para><programlisting>dd
if=/dev/urandom of=<device></programlisting>
- </listitem>
- <listitem>
- <para> Fastest way, which provides lower quality random
data:</para><programlisting>badblocks -c 10240 -s -w -t random -v
<device></programlisting>
- </listitem>
- </itemizedlist>
- </section>
- <section>
- <title>Format the device as a dm-crypt/LUKS encrypted device </title>
- <para>
- <warning><title>Warning</title>
- <para>The command below will destroy any existing data on the
device.</para>
- </warning>
-
- </para><programlisting>cryptsetup luksFormat
<device></programlisting>
-
- <para>
- <note><title>Tip</title>
- <para>For more information, read the <command>cryptsetup(8)</command>
man page.</para>
- </note>
- </para><para>After supplying the passphrase twice the device will be
formatted for use. To verify, use the following command:</para>
- <programlisting>cryptsetup isLuks <device> && echo
Success</programlisting>
- <para>To see a summary of the encryption information for the device, use the
following command:</para>
- <programlisting>cryptsetup luksDump
<device></programlisting>
</section>
- <section>
- <title>Create a mapping to allow access to the device's decrypted contents
</title>
- <para> To access the device's decrypted contents, a mapping must be
established using the kernel
<command>device-mapper</command>.</para><para>It is useful to
choose a meaningful name for this mapping. LUKS provides a UUID (Universally Unique
Identifier) for each device. This, unlike the device name (eg:
<filename>/dev/sda3</filename>), is guaranteed to remain constant as long as
the LUKS header remains intact. To find a LUKS device's UUID, run the following
command:</para>
- <programlisting>cryptsetup luksUUID
<device></programlisting>
+ </section> --> <section
id="sect-Security_Guide-Disk_Encryption_Guide-Saving_Passphrases">
+ <title>Saving Passphrases</title>
+ <indexterm significance="normal">
+ <primary>Encryption</primary>
+ <secondary>Passphrases</secondary>
+ <tertiary>Saving passphrases</tertiary>
+
+ </indexterm>
+ <indexterm significance="normal">
+ <primary>Passphrases</primary>
+ <secondary>Block device encryption passphrases</secondary>
+ <tertiary>Saving block device encryption passphrases</tertiary>
+
+ </indexterm>
+ <para>
+ If you use a kickstart file during installation, you can automatically save the
passphrases used during installation to an encrypted file (an <firstterm>escrow
packet</firstterm>) on the local file system. To use this feature, you must have an
X.509 certificate available at a location that
<application>anaconda</application> can access. To specify the URL of this
certificate, add the <parameter>--escrowcert</parameter> parameter to any of
the <command>autopart</command>, <command>logvol</command>,
<command>part</command> or <command>raid</command> commands.
During installation, the encryption keys for the specified devices are saved in files in
<filename>/root</filename>, encrypted with the certificate.
+ </para>
+ <para>
+ You can save escrow packets during installation only with the use of a kickstart
file. You cannot save an escrow packet during an interactive installation, although you
can create one on an installed system with the
<application>volume_key</application> tool. The
<application>volume_key</application> tool also allows you to use the
information stored in an escrow packet to restore access to an encrypted volume. Refer to
the <application>volume_key</application> manpage for more information.
+ </para>
+
+ </section>
- <para>An example of a reliable, informative and unique mapping name would be
<command>luks-<uuid></command>, where <uuid> is
replaced with the device's LUKS UUID (eg:
<command>luks-50ec957a-5b5a-47ee-85e6-f8085bbc97a8</command>). This naming
convention might seem unwieldy but is it not necessary to type it often.</para>
- <programlisting>cryptsetup luksOpen <device>
<name></programlisting>
+ <section
id="sect-Security_Guide-Disk_Encryption_Guide-Creating_and_Saving_Backup_Passphrases">
+ <title>Creating and Saving Backup Passphrases</title>
+ <indexterm significance="normal">
+ <primary>Encryption</primary>
+ <secondary>Backup passphrases</secondary>
+ <tertiary>Creating backup passphrases</tertiary>
+
+ </indexterm>
+ <indexterm significance="normal">
+ <primary>Encryption</primary>
+ <secondary>Backup passphrases</secondary>
+ <tertiary>Saving backup passphrases</tertiary>
+
+ </indexterm>
+ <indexterm significance="normal">
+ <primary>Passphrases</primary>
+ <secondary>Block device encryption passphrases</secondary>
+ <tertiary>Creating backup block device encryption
passphrases</tertiary>
+
+ </indexterm>
+ <indexterm significance="normal">
+ <primary>Passphrases</primary>
+ <secondary>Block device encryption passphrases</secondary>
+ <tertiary>Saving backup block device encryption passphrases</tertiary>
+
+ </indexterm>
+ <para>
+ If you use a kickstart file during installation,
<application>anaconda</application> can add a randomly generated backup
passphrase to each block device on the system and save each passphrase to an encrypted
file on the local file system. Specify the URL of this certificate with the
<parameter>--escrowcert</parameter> parameter as described in <xref
linkend="sect-Security_Guide-Disk_Encryption_Guide-Saving_Passphrases" />,
followed by the <parameter>--backuppassphrase</parameter> parameter for each
of the kickstart commands that relate to the devices for which you want to create backup
passphrases.
+ </para>
+ <para>
+ Note that this feature is available only while performing a kickstart installation.
+ </para>
+
+ </section>
- <para>There should now be a device node,
<filename>/dev/mapper/<name></filename>, which represents the
decrypted device. This block device can be read from and written to like any other
unencrypted block device.</para>
- <para>To see some information about the mapped device, use the following
command:</para>
+
+ </section>
+
+ <section>
+ <title>Creating Encrypted Block Devices on the Installed System After
Installation </title>
+ <para>
+ Encrypted block devices can be created and configured after installation, using
either the following method or <application>Disk Utility</application>.
+ </para>
+ <section>
+ <title>Create the block devices </title>
+ <para>
+ Create the block devices you want to encrypt by using
<command>parted</command>, <command>pvcreate</command>,
<command>lvcreate</command> and <command>mdadm</command>.
+ </para>
+
+ </section>
- <programlisting>dmsetup info <name></programlisting>
+ <section id="randomize_device">
+ <title>Optional: Fill the device with random data</title>
+ <para>
+ Filling <device> (eg: <filename>/dev/sda3</filename>) with
random data before encrypting it greatly increases the strength of the encryption. The
downside is that it can take a very long time.
+ </para>
+ <para>
+ <warning>
+ <title>Warning</title>
+ <para>
+ The commands below will destroy any existing data on the device.
+ </para>
+
+ </warning>
+
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The best way, which provides high quality random data but takes a long time
(several minutes per gigabyte on most systems):
+ </para>
+
+<programlisting>dd if=/dev/urandom
of=<device></programlisting>
+
+ </listitem>
+ <listitem>
+ <para>
+ Fastest way, which provides lower quality random data:
+ </para>
+
+<programlisting>badblocks -c 10240 -s -w -t random -v
<device></programlisting>
+
+ </listitem>
+
+ </itemizedlist>
+
+ </section>
- <para>
- <note><title>Tip</title>
- <para>For more information, read the <command>dmsetup(8)</command>
man page.</para>
- </note>
- </para>
- </section>
- <section>
- <title>Create filesystems on the mapped device, or continue to build complex
storage structures using the mapped device </title>
- <para> Use the mapped device node
(<filename>/dev/mapper/<name></filename>) as any other block
device. To create an <command>ext2</command> filesystem on the mapped device,
use the following command:</para>
+ <section>
+ <title>Format the device as a dm-crypt/LUKS encrypted device </title>
+ <warning>
+ <title>Warning</title>
+ <para>
+ The command below will destroy any existing data on the device.
+ </para>
+
+ </warning>
+
+<programlisting>cryptsetup luksFormat
<device></programlisting>
+ <para>
+ <note>
+ <para>
+ For more information, read the <command>cryptsetup(8)</command> man
page.
+ </para>
+
+ </note>
+
+ </para>
+ <para>
+ After supplying the passphrase twice the device will be formatted for use. To verify,
use the following command:
+ </para>
+
+<programlisting>cryptsetup isLuks <device> && echo
Success</programlisting>
+ <para>
+ To see a summary of the encryption information for the device, use the following
command:
+ </para>
+
+<programlisting>cryptsetup luksDump <device></programlisting>
+
+ </section>
- <programlisting>mke2fs /dev/mapper/<name></programlisting>
+ <section>
+ <title>Create a mapping to allow access to the device's decrypted contents
</title>
+ <para>
+ To access the device's decrypted contents, a mapping must be established using
the kernel <command>device-mapper</command>.
+ </para>
+ <para>
+ It is useful to choose a meaningful name for this mapping. LUKS provides a UUID
(Universally Unique Identifier) for each device. This, unlike the device name (eg:
<filename>/dev/sda3</filename>), is guaranteed to remain constant as long as
the LUKS header remains intact. To find a LUKS device's UUID, run the following
command:
+ </para>
+
+<programlisting>cryptsetup luksUUID <device></programlisting>
+ <para>
+ An example of a reliable, informative and unique mapping name would be
<command>luks-<uuid></command>, where <uuid> is
replaced with the device's LUKS UUID (eg:
<command>luks-50ec957a-5b5a-47ee-85e6-f8085bbc97a8</command>). This naming
convention might seem unwieldy but is it not necessary to type it often.
+ </para>
+
+<programlisting>cryptsetup luksOpen <device>
<name></programlisting>
+ <para>
+ There should now be a device node,
<filename>/dev/mapper/<name></filename>, which represents the
decrypted device. This block device can be read from and written to like any other
unencrypted block device.
+ </para>
+ <para>
+ To see some information about the mapped device, use the following command:
+ </para>
+
+<programlisting>dmsetup info <name></programlisting>
+ <para>
+ <note>
+ <title>Tip</title>
+ <para>
+ For more information, read the <command>dmsetup(8)</command> man page.
+ </para>
+
+ </note>
+
+ </para>
+
+ </section>
- <para>To mount this filesystem on <filename>/mnt/test</filename>, use
the following command:</para>
- <para>
- <important>
- <para>The directory <filename>/mnt/test</filename> must exist before
executing this command.</para>
- </important>
- </para>
- <programlisting>mount /dev/mapper/<name>
/mnt/test</programlisting>
+ <section>
+ <title>Create filesystems on the mapped device, or continue to build complex
storage structures using the mapped device </title>
+ <para>
+ Use the mapped device node
(<filename>/dev/mapper/<name></filename>) as any other block
device. To create an <command>ext2</command> filesystem on the mapped device,
use the following command:
+ </para>
+
+<programlisting>mke2fs /dev/mapper/<name></programlisting>
+ <para>
+ To mount this filesystem on <filename>/mnt/test</filename>, use the
following command:
+ </para>
+ <para>
+ <important>
+ <para>
+ The directory <filename>/mnt/test</filename> must exist before
executing this command.
+ </para>
+
+ </important>
+
+ </para>
+
+<programlisting>mount /dev/mapper/<name>
/mnt/test</programlisting>
+
+ </section>
- </section>
- <section>
- <title>Add the mapping information to
<filename>/etc/crypttab</filename></title>
- <para> In order for the system to set up a mapping for the device, an entry must
be present in the <filename>/etc/crypttab</filename> file. If the file
doesn't exist, create it and change the owner and group to root
(<command>root:root</command>) and change the mode to
<command>0744</command>. Add a line to the file with the following
format:</para>
+ <section>
+ <title>Add the mapping information to
<filename>/etc/crypttab</filename></title>
+ <para>
+ In order for the system to set up a mapping for the device, an entry must be present
in the <filename>/etc/crypttab</filename> file. If the file doesn't exist,
create it and change the owner and group to root
(<command>root:root</command>) and change the mode to
<command>0744</command>. Add a line to the file with the following format:
+ </para>
+
+<programlisting><name> <device>
none</programlisting>
+ <para>
+ The <device> field should be given in the form
"UUID=<luks_uuid>", where <luks_uuid> is the LUKS
uuid as given by the command <command>cryptsetup luksUUID
<device></command>. This ensures the correct device will be identified
and used even if the device node (eg: <filename>/dev/sda5</filename>)
changes.
+ </para>
+ <para>
+ <note>
+ <title>Tip</title>
+ <para>
+ For details on the format of the <filename>/etc/crypttab</filename>
file, read the <command>crypttab(5)</command> man page.
+ </para>
+
+ </note>
+
+ </para>
+
+ </section>
- <programlisting><name> <device>
none</programlisting>
+ <section>
+ <title>Add an entry to
<filename>/etc/fstab</filename></title>
+ <para>
+ Add an entry to /etc/fstab. This is only necessary if you want to establish a
persistent association between the device and a mountpoint. Use the decrypted device,
<filename>/dev/mapper/<name></filename> in the
<filename>/etc/fstab</filename> file.
+ </para>
+ <para>
+ In many cases it is desirable to list devices in
<filename>/etc/fstab</filename> by UUID or by a filesystem label. The main
purpose of this is to provide a constant identifier in the event that the device name (eg:
<filename>/dev/sda4</filename>) changes. LUKS device names in the form of
<filename>/dev/mapper/luks-<luks_uuid></filename> are based only
on the device's LUKS UUID, and are therefore guaranteed to remain constant. This fact
makes them suitable for use in <filename>/etc/fstab</filename>.
+ </para>
+ <para>
+ <note>
+ <title>Title</title>
+ <para>
+ For details on the format of the <filename>/etc/fstab</filename> file,
read the <command>fstab(5)</command> man page.
+ </para>
+
+ </note>
+
+ </para>
+
+ </section>
- <para>The <device> field should be given in the form
"UUID=<luks_uuid>", where <luks_uuid> is the LUKS
uuid as given by the command <command>cryptsetup luksUUID
<device></command>. This ensures the correct device will be identified
and used even if the device node (eg: <filename>/dev/sda5</filename>)
changes.</para>
- <para>
- <note><title>Tip</title>
- <para>For details on the format of the
<filename>/etc/crypttab</filename> file, read the
<command>crypttab(5)</command> man page.</para>
- </note>
- </para>
+
</section>
- <section>
- <title>Add an entry to <filename>/etc/fstab</filename></title>
- <para> Add an entry to /etc/fstab. This is only necessary if you want to
establish a persistent association between the device and a mountpoint. Use the decrypted
device, <filename>/dev/mapper/<name></filename> in the
<filename>/etc/fstab</filename> file.</para>
- <para>In many cases it is desirable to list devices in
<filename>/etc/fstab</filename> by UUID or by a filesystem label. The main
purpose of this is to provide a constant identifier in the event that the device name (eg:
<filename>/dev/sda4</filename>) changes. LUKS device names in the form of
<filename>/dev/mapper/luks-<luks_uuid></filename> are based only
on the device's LUKS UUID, and are therefore guaranteed to remain constant. This fact
makes them suitable for use in <filename>/etc/fstab</filename>.</para>
- <para>
- <note><title>Title</title>
- <para>For details on the format of the
<filename>/etc/fstab</filename> file, read the
<command>fstab(5)</command> man page.</para>
- </note>
+
+ <section>
+ <title>Common Post-Installation Tasks </title>
+ <para>
+ The following sections are about common post-installation tasks.
</para>
- </section>
- </section>
- <section>
- <title>Common Post-Installation Tasks </title>
- <para>The following sections are about common post-installation
tasks.</para>
- <section id="new_key">
- <title>Set a randomly generated key as an additional way to access an encrypted
block device</title>
- <para>These sections are about generating keys and adding keys.</para>
- <section>
- <title>Generate a key </title>
- <para> This will generate a 256-bit key in the file
<filename>$HOME/keyfile</filename>.</para>
-
- <programlisting>
+ <section id="new_key">
+ <title>Set a randomly generated key as an additional way to access an encrypted
block device</title>
+ <para>
+ These sections are about generating keys and adding keys.
+ </para>
+ <section>
+ <title>Generate a key </title>
+ <para>
+ This will generate a 256-bit key in the file
<filename>$HOME/keyfile</filename>.
+ </para>
+
+<programlisting>
dd if=/dev/urandom of=$HOME/keyfile bs=32 count=1
chmod 600 $HOME/keyfile
- </programlisting>
+</programlisting>
+
</section>
- <section>
- <title>Add the key to an available keyslot on the encrypted device
</title>
- <programlisting>cryptsetup luksAddKey <device>
~/keyfile</programlisting>
+
+ <section>
+ <title>Add the key to an available keyslot on the encrypted device
</title>
+
+<programlisting>cryptsetup luksAddKey <device>
~/keyfile</programlisting>
+
</section>
-
- </section>
- <section>
- <title>Add a new passphrase to an existing device </title>
-
- <programlisting>cryptsetup luksAddKey
<device></programlisting>
-
- <para>After being prompted for any one of the existing passphrases for
authentication, you will be prompted to enter the new passphrase.</para>
- </section>
- <section>
- <title>Remove a passphrase or key from a device </title>
-
- <programlisting>cryptsetup luksRemoveKey
<device></programlisting>
-
- <para>You will be prompted for the passphrase you wish to remove and then for any
one of the remaining passphrases for authentication.</para>
- </section>
+
+
+ </section>
+
+ <section>
+ <title>Add a new passphrase to an existing device </title>
+
+<programlisting>cryptsetup luksAddKey
<device></programlisting>
+ <para>
+ After being prompted for any one of the existing passphrases for authentication, you
will be prompted to enter the new passphrase.
+ </para>
+
+ </section>
+
+ <section>
+ <title>Remove a passphrase or key from a device </title>
+
+<programlisting>cryptsetup luksRemoveKey
<device></programlisting>
+ <para>
+ You will be prompted for the passphrase you wish to remove and then for any one of
the remaining passphrases for authentication.
+ </para>
+
+ </section>
+
+ </section>
+
</section>
-</chapter>
+
diff --git a/en-US/Encryption.xml b/en-US/Encryption.xml
index cb8fa28..5df7691 100644
--- a/en-US/Encryption.xml
+++ b/en-US/Encryption.xml
@@ -64,7 +64,7 @@ AuthorizedKeysFile .ssh/authorized_keys</screen>The first line
tells the SSH pro
<para>Similarly to passwords and any other authentication mechanism, you should
change your <application>SSH</application> keys regularly. When you do make
sure you clean out any unused key from the authorized_key file.</para>
</section>
</section>
- <xi:include href="LUKSDiskEncryption.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+ <xi:include href="DiskEncryptionUserGuide.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="7_Zip.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="Using_GPG.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
</section>