[6dcb9e77] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[8dfc5c3] | 7 | <!ENTITY cryptsetup-download-http "&kernel-dl;/linux/utils/cryptsetup/v&cryptsetup-minor;/cryptsetup-&cryptsetup-version;.tar.xz">
|
---|
[6dcb9e77] | 8 | <!ENTITY cryptsetup-download-ftp " ">
|
---|
[62cb663] | 9 | <!ENTITY cryptsetup-md5sum "2303d57e78d4977344188a46e125095c">
|
---|
[b5dc1cf] | 10 | <!ENTITY cryptsetup-size "11 MB">
|
---|
[62cb663] | 11 | <!ENTITY cryptsetup-buildsize "29 MB (add 5 MB for tests)">
|
---|
| 12 | <!ENTITY cryptsetup-time "0.2 SBU (add 19 SBU for tests)">
|
---|
[6dcb9e77] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="cryptsetup" xreflabel="cryptsetup-&cryptsetup-version;">
|
---|
| 16 | <?dbhtml filename="cryptsetup.html"?>
|
---|
| 17 |
|
---|
| 18 |
|
---|
| 19 | <title>cryptsetup-&cryptsetup-version;</title>
|
---|
| 20 |
|
---|
| 21 | <indexterm zone="cryptsetup">
|
---|
| 22 | <primary sortas="a-cryptsetup">cryptsetup</primary>
|
---|
| 23 | </indexterm>
|
---|
| 24 |
|
---|
| 25 | <sect2 role="package">
|
---|
| 26 | <title>Introduction to cryptsetup</title>
|
---|
| 27 |
|
---|
| 28 | <para>
|
---|
| 29 | cryptsetup is used to set up transparent encryption of block devices
|
---|
[8558044] | 30 | using the kernel crypto API.
|
---|
[6dcb9e77] | 31 | </para>
|
---|
| 32 |
|
---|
[fbd04125] | 33 | &lfs120_checked;
|
---|
[6dcb9e77] | 34 |
|
---|
| 35 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 36 | <itemizedlist spacing="compact">
|
---|
| 37 | <listitem>
|
---|
| 38 | <para>
|
---|
| 39 | Download (HTTP): <ulink url="&cryptsetup-download-http;"/>
|
---|
| 40 | </para>
|
---|
| 41 | </listitem>
|
---|
| 42 | <listitem>
|
---|
| 43 | <para>
|
---|
| 44 | Download (FTP): <ulink url="&cryptsetup-download-ftp;"/>
|
---|
| 45 | </para>
|
---|
| 46 | </listitem>
|
---|
| 47 | <listitem>
|
---|
| 48 | <para>
|
---|
| 49 | Download MD5 sum: &cryptsetup-md5sum;
|
---|
| 50 | </para>
|
---|
| 51 | </listitem>
|
---|
| 52 | <listitem>
|
---|
| 53 | <para>
|
---|
| 54 | Download size: &cryptsetup-size;
|
---|
| 55 | </para>
|
---|
| 56 | </listitem>
|
---|
| 57 | <listitem>
|
---|
| 58 | <para>
|
---|
| 59 | Estimated disk space required: &cryptsetup-buildsize;
|
---|
| 60 | </para>
|
---|
| 61 | </listitem>
|
---|
| 62 | <listitem>
|
---|
| 63 | <para>
|
---|
| 64 | Estimated build time: &cryptsetup-time;
|
---|
| 65 | </para>
|
---|
| 66 | </listitem>
|
---|
| 67 | </itemizedlist>
|
---|
| 68 |
|
---|
[93817f4] | 69 | <!-- No longer needed with 2.3.2.
|
---|
[24f32bb] | 70 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 71 | <itemizedlist spacing="compact">
|
---|
| 72 | <listitem>
|
---|
| 73 | <para>
|
---|
| 74 | Required patch:
|
---|
| 75 | <ulink url="&patch-root;/cryptsetup-&cryptsetup-version;-upstream_fixes-1.patch"/>
|
---|
| 76 | </para>
|
---|
| 77 | </listitem>
|
---|
| 78 | </itemizedlist>
|
---|
[93817f4] | 79 | -->
|
---|
[24f32bb] | 80 |
|
---|
[6dcb9e77] | 81 | <bridgehead renderas="sect3">cryptsetup Dependencies</bridgehead>
|
---|
| 82 |
|
---|
| 83 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 84 | <para role="required">
|
---|
[6cc2f9a8] | 85 | <xref linkend="json-c"/>,
|
---|
| 86 | <xref linkend="lvm2"/>, and
|
---|
[4509c956] | 87 | <xref linkend="popt"/>
|
---|
[6dcb9e77] | 88 | </para>
|
---|
| 89 |
|
---|
| 90 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 91 | <para role="optional">
|
---|
| 92 | <xref linkend="libpwquality"/>,
|
---|
[7a9a7b26] | 93 | <ulink url="https://github.com/P-H-C/phc-winner-argon2">argon2</ulink>,
|
---|
[cd29bc9] | 94 | <ulink url="https://www.libssh.org/">libssh</ulink>, and
|
---|
| 95 | <ulink url="https://www.openwall.com/passwdqc/">passwdqc</ulink>
|
---|
[6dcb9e77] | 96 | </para>
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | </sect2>
|
---|
| 100 |
|
---|
| 101 | <sect2 role="kernel" id="cryptsetup-kernel">
|
---|
| 102 | <title>Kernel Configuration</title>
|
---|
| 103 |
|
---|
| 104 | <para>
|
---|
[416617d6] | 105 | Encrypted block devices require kernel support. To use it, the
|
---|
[6dcb9e77] | 106 | appropriate kernel configuration parameters need to be set:
|
---|
| 107 | </para>
|
---|
| 108 |
|
---|
[9cc0aba5] | 109 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 110 | href="cryptsetup-kernel.xml"/>
|
---|
[6dcb9e77] | 111 |
|
---|
| 112 | <indexterm zone="cryptsetup cryptsetup-kernel">
|
---|
| 113 | <primary sortas="d-cryptsetup">cryptsetup</primary>
|
---|
| 114 | </indexterm>
|
---|
| 115 |
|
---|
| 116 | </sect2>
|
---|
| 117 |
|
---|
| 118 | <sect2 role="installation">
|
---|
| 119 | <title>Installation of cryptsetup</title>
|
---|
| 120 |
|
---|
[93817f4] | 121 | <!-- No longer needed with 2.3.2
|
---|
[24f32bb] | 122 | <para>
|
---|
[8558044] | 123 | First, apply a patch to fix a build problem caused by API changes in
|
---|
[24f32bb] | 124 | <xref role="nodep" linkend="json-c"/>:
|
---|
| 125 | </para>
|
---|
| 126 |
|
---|
| 127 | <screen><userinput remap="pre">patch -Np1 -i ../cryptsetup-&cryptsetup-version;-upstream_fixes-1.patch</userinput></screen>
|
---|
[93817f4] | 128 | -->
|
---|
[24f32bb] | 129 |
|
---|
[6dcb9e77] | 130 | <para>
|
---|
| 131 | Install <application>cryptsetup</application> by running the following
|
---|
| 132 | commands:
|
---|
| 133 | </para>
|
---|
| 134 |
|
---|
[62cb663] | 135 | <screen><userinput>./configure --prefix=/usr --disable-ssh-token &&
|
---|
[6dcb9e77] | 136 | make</userinput></screen>
|
---|
| 137 |
|
---|
| 138 | <para>
|
---|
| 139 | To test the result, issue as the <systemitem
|
---|
[9f5dcb97] | 140 | class="username">root</systemitem> user: <command>make check</command>.
|
---|
[2e18e741] | 141 | Some tests will fail if appropriate kernel configuration options are not
|
---|
[8558044] | 142 | set. Some additional options that may be needed for tests are:
|
---|
[2e18e741] | 143 | CONFIG_SCSI_LOWLEVEL,
|
---|
| 144 | CONFIG_SCSI_DEBUG,
|
---|
| 145 | CONFIG_BLK_DEV_DM_BUILTIN,
|
---|
| 146 | CONFIG_CRYPTO_USER,
|
---|
| 147 | CONFIG_CRYPTO_CRYPTD,
|
---|
| 148 | CONFIG_CRYPTO_LRW,
|
---|
| 149 | CONFIG_CRYPTO_XTS,
|
---|
| 150 | CONFIG_CRYPTO_ESSIV,
|
---|
| 151 | CONFIG_CRYPTO_CRCT10DIF,
|
---|
| 152 | CONFIG_CRYPTO_AES_TI,
|
---|
| 153 | CONFIG_CRYPTO_AES_NI_INTEL,
|
---|
| 154 | CONFIG_CRYPTO_BLOWFISH,
|
---|
| 155 | CONFIG_CRYPTO_CAST5,
|
---|
| 156 | CONFIG_CRYPTO_SERPENT,
|
---|
| 157 | CONFIG_CRYPTO_SERPENT_SSE2_X86_64,
|
---|
| 158 | CONFIG_CRYPTO_SERPENT_AVX_X86_64,
|
---|
| 159 | CONFIG_CRYPTO_SERPENT_AVX2_X86_64, and
|
---|
[8558044] | 160 | CONFIG_CRYPTO_TWOFISH_X86_64.
|
---|
[62cb663] | 161 | <!--I had 1 of 21 tests fail with the above crypto options in the
|
---|
[7a9a7b26] | 162 | kernel. Eight tests were not run. Version 2.4.3.
|
---|
[62cb663] | 163 | Failed test was tcrypt-compat-test
|
---|
| 164 | tcrypt-images/tc_1-ripemd160-cbc-aes [FAILED]
|
---|
| 165 | bdubbs -->
|
---|
[6dcb9e77] | 166 | </para>
|
---|
| 167 |
|
---|
[47274444] | 168 | <para>
|
---|
| 169 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 170 | </para>
|
---|
[6dcb9e77] | 171 |
|
---|
| 172 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 173 |
|
---|
| 174 | </sect2>
|
---|
| 175 |
|
---|
[62cb663] | 176 | <sect2 role="commands">
|
---|
[4509c956] | 177 | <title>Command Explanations</title>
|
---|
[62cb663] | 178 | <para>
|
---|
| 179 | <option>--disable-ssh-token</option>: This option is required if
|
---|
| 180 | the optional libssh dependency is not installed.
|
---|
| 181 | </para>
|
---|
[61ed6e9] | 182 | </sect2>
|
---|
[6dcb9e77] | 183 |
|
---|
| 184 | <sect2 role="configuration">
|
---|
| 185 | <title>Configuring cryptsetup</title>
|
---|
| 186 |
|
---|
| 187 | <para>
|
---|
[effdf5be] | 188 | Because of the number of possible configurations, setup of encrypted
|
---|
| 189 | volumes is beyond the scope of the BLFS book. Please see the
|
---|
| 190 | configuration guide in the cryptsetup <ulink
|
---|
| 191 | url="https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions#2-setup">
|
---|
| 192 | FAQ</ulink>.
|
---|
[6dcb9e77] | 193 | </para>
|
---|
| 194 |
|
---|
| 195 | </sect2>
|
---|
| 196 |
|
---|
| 197 | <sect2 role="content">
|
---|
| 198 | <title>Contents</title>
|
---|
| 199 |
|
---|
| 200 | <segmentedlist>
|
---|
| 201 | <segtitle>Installed Programs</segtitle>
|
---|
| 202 | <segtitle>Installed Libraries</segtitle>
|
---|
| 203 | <segtitle>Installed Directories</segtitle>
|
---|
| 204 |
|
---|
| 205 | <seglistitem>
|
---|
| 206 | <seg>
|
---|
[9f5dcb97] | 207 | cryptsetup,
|
---|
| 208 | cryptsetup-reencrypt,
|
---|
| 209 | integritysetup, and
|
---|
[6dcb9e77] | 210 | veritysetup
|
---|
| 211 | </seg>
|
---|
| 212 | <seg>
|
---|
| 213 | libcryptsetup.so
|
---|
| 214 | </seg>
|
---|
| 215 | <seg>
|
---|
[8558044] | 216 | None
|
---|
[6dcb9e77] | 217 | </seg>
|
---|
| 218 | </seglistitem>
|
---|
| 219 | </segmentedlist>
|
---|
| 220 |
|
---|
| 221 | <variablelist>
|
---|
| 222 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 223 | <?dbfo list-presentation="list"?>
|
---|
| 224 | <?dbhtml list-presentation="table"?>
|
---|
| 225 |
|
---|
| 226 | <varlistentry id="cryptsetup-prog">
|
---|
| 227 | <term><command>cryptsetup</command></term>
|
---|
| 228 | <listitem>
|
---|
| 229 | <para>
|
---|
[4c24eb0a] | 230 | is used to setup dm-crypt managed device-mapper mappings
|
---|
[6dcb9e77] | 231 | </para>
|
---|
| 232 | <indexterm zone="cryptsetup cryptsetup-prog">
|
---|
| 233 | <primary sortas="b-cryptsetup">cryptsetup</primary>
|
---|
| 234 | </indexterm>
|
---|
| 235 | </listitem>
|
---|
| 236 | </varlistentry>
|
---|
| 237 |
|
---|
[9f5dcb97] | 238 | <varlistentry id="cryptsetup-reencrypt">
|
---|
| 239 | <term><command>cryptsetup-reencrypt</command></term>
|
---|
| 240 | <listitem>
|
---|
| 241 | <para>
|
---|
[de5db85] | 242 | is a tool for offline LUKS device re-encryption
|
---|
[9f5dcb97] | 243 | </para>
|
---|
| 244 | <indexterm zone="cryptsetup cryptsetup-reencrypt">
|
---|
| 245 | <primary sortas="b-cryptsetup-reencrypt">cryptsetup-reencrypt</primary>
|
---|
| 246 | </indexterm>
|
---|
| 247 | </listitem>
|
---|
| 248 | </varlistentry>
|
---|
| 249 |
|
---|
| 250 | <varlistentry id="integritysetup">
|
---|
| 251 | <term><command>integritysetup</command></term>
|
---|
| 252 | <listitem>
|
---|
| 253 | <para>
|
---|
[4c24eb0a] | 254 | is a tool to manage dm-integrity (block level integrity) volumes
|
---|
[9f5dcb97] | 255 | </para>
|
---|
| 256 | <indexterm zone="cryptsetup integritysetup">
|
---|
| 257 | <primary sortas="b-integritysetup">integritysetup</primary>
|
---|
| 258 | </indexterm>
|
---|
| 259 | </listitem>
|
---|
| 260 | </varlistentry>
|
---|
| 261 |
|
---|
[6dcb9e77] | 262 | <varlistentry id="veritysetup">
|
---|
| 263 | <term><command>veritysetup</command></term>
|
---|
| 264 | <listitem>
|
---|
| 265 | <para>
|
---|
| 266 | is used to configure dm-verity managed device-mapper mappings.
|
---|
| 267 | Device-mapper verity target provides read-only transparent integrity
|
---|
[4c24eb0a] | 268 | checking of block devices using kernel crypto API
|
---|
[6dcb9e77] | 269 | </para>
|
---|
| 270 | <indexterm zone="cryptsetup veritysetup">
|
---|
| 271 | <primary sortas="b-veritysetup">veritysetup</primary>
|
---|
| 272 | </indexterm>
|
---|
| 273 | </listitem>
|
---|
| 274 | </varlistentry>
|
---|
| 275 |
|
---|
| 276 | </variablelist>
|
---|
| 277 |
|
---|
| 278 | </sect2>
|
---|
| 279 |
|
---|
| 280 | </sect1>
|
---|