[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 |
|
---|
[acd88fc] | 33 | &lfs113_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 | <para condition="html" role="usernotes">User Notes:
|
---|
| 100 | <ulink url="&blfs-wiki;/cryptsetup"/>
|
---|
| 101 | </para>
|
---|
| 102 | </sect2>
|
---|
| 103 |
|
---|
| 104 | <sect2 role="kernel" id="cryptsetup-kernel">
|
---|
| 105 | <title>Kernel Configuration</title>
|
---|
| 106 |
|
---|
| 107 | <para>
|
---|
[416617d6] | 108 | Encrypted block devices require kernel support. To use it, the
|
---|
[6dcb9e77] | 109 | appropriate kernel configuration parameters need to be set:
|
---|
| 110 | </para>
|
---|
| 111 |
|
---|
[8558044] | 112 | <screen><literal>Device Drivers --->
|
---|
[6dcb9e77] | 113 | [*] Multiple devices driver support (RAID and LVM) ---> [CONFIG_MD]
|
---|
| 114 | <*/M> Device mapper support [CONFIG_BLK_DEV_DM]
|
---|
| 115 | <*/M> Crypt target support [CONFIG_DM_CRYPT]
|
---|
| 116 |
|
---|
[4eadcde] | 117 | -*- Cryptographic API ---> [CONFIG_CRYPTO]
|
---|
| 118 | Length-preserving ciphers and modes --->
|
---|
| 119 | <*/M> XTS support [CONFIG_CRYPTO_XTS]
|
---|
| 120 | Hashes, digests, and MACs --->
|
---|
| 121 | -*- SHA224 and SHA256 digest algorithm [CONFIG_CRYPTO_SHA256]
|
---|
| 122 | Block ciphers --->
|
---|
| 123 | -*- AES cipher algorithms [CONFIG_CRYPTO_AES]
|
---|
| 124 | Userspace interface --->
|
---|
| 125 | <*/M> Symmetric key cipher algorithms [CONFIG_CRYPTO_USER_API_SKCIPHER]
|
---|
[6dcb9e77] | 126 | For tests:
|
---|
[4eadcde] | 127 | Block ciphers --->
|
---|
| 128 | <*/M> Twofish [CONFIG_CRYPTO_TWOFISH]</literal></screen>
|
---|
[6dcb9e77] | 129 |
|
---|
| 130 | <indexterm zone="cryptsetup cryptsetup-kernel">
|
---|
| 131 | <primary sortas="d-cryptsetup">cryptsetup</primary>
|
---|
| 132 | </indexterm>
|
---|
| 133 |
|
---|
| 134 | </sect2>
|
---|
| 135 |
|
---|
| 136 | <sect2 role="installation">
|
---|
| 137 | <title>Installation of cryptsetup</title>
|
---|
| 138 |
|
---|
[93817f4] | 139 | <!-- No longer needed with 2.3.2
|
---|
[24f32bb] | 140 | <para>
|
---|
[8558044] | 141 | First, apply a patch to fix a build problem caused by API changes in
|
---|
[24f32bb] | 142 | <xref role="nodep" linkend="json-c"/>:
|
---|
| 143 | </para>
|
---|
| 144 |
|
---|
| 145 | <screen><userinput remap="pre">patch -Np1 -i ../cryptsetup-&cryptsetup-version;-upstream_fixes-1.patch</userinput></screen>
|
---|
[93817f4] | 146 | -->
|
---|
[24f32bb] | 147 |
|
---|
[6dcb9e77] | 148 | <para>
|
---|
| 149 | Install <application>cryptsetup</application> by running the following
|
---|
| 150 | commands:
|
---|
| 151 | </para>
|
---|
| 152 |
|
---|
[62cb663] | 153 | <screen><userinput>./configure --prefix=/usr --disable-ssh-token &&
|
---|
[6dcb9e77] | 154 | make</userinput></screen>
|
---|
| 155 |
|
---|
| 156 | <para>
|
---|
| 157 | To test the result, issue as the <systemitem
|
---|
[9f5dcb97] | 158 | class="username">root</systemitem> user: <command>make check</command>.
|
---|
[2e18e741] | 159 | Some tests will fail if appropriate kernel configuration options are not
|
---|
[8558044] | 160 | set. Some additional options that may be needed for tests are:
|
---|
[2e18e741] | 161 | CONFIG_SCSI_LOWLEVEL,
|
---|
| 162 | CONFIG_SCSI_DEBUG,
|
---|
| 163 | CONFIG_BLK_DEV_DM_BUILTIN,
|
---|
| 164 | CONFIG_CRYPTO_USER,
|
---|
| 165 | CONFIG_CRYPTO_CRYPTD,
|
---|
| 166 | CONFIG_CRYPTO_LRW,
|
---|
| 167 | CONFIG_CRYPTO_XTS,
|
---|
| 168 | CONFIG_CRYPTO_ESSIV,
|
---|
| 169 | CONFIG_CRYPTO_CRCT10DIF,
|
---|
| 170 | CONFIG_CRYPTO_AES_TI,
|
---|
| 171 | CONFIG_CRYPTO_AES_NI_INTEL,
|
---|
| 172 | CONFIG_CRYPTO_BLOWFISH,
|
---|
| 173 | CONFIG_CRYPTO_CAST5,
|
---|
| 174 | CONFIG_CRYPTO_SERPENT,
|
---|
| 175 | CONFIG_CRYPTO_SERPENT_SSE2_X86_64,
|
---|
| 176 | CONFIG_CRYPTO_SERPENT_AVX_X86_64,
|
---|
| 177 | CONFIG_CRYPTO_SERPENT_AVX2_X86_64, and
|
---|
[8558044] | 178 | CONFIG_CRYPTO_TWOFISH_X86_64.
|
---|
[62cb663] | 179 | <!--I had 1 of 21 tests fail with the above crypto options in the
|
---|
[7a9a7b26] | 180 | kernel. Eight tests were not run. Version 2.4.3.
|
---|
[62cb663] | 181 | Failed test was tcrypt-compat-test
|
---|
| 182 | tcrypt-images/tc_1-ripemd160-cbc-aes [FAILED]
|
---|
| 183 | bdubbs -->
|
---|
[6dcb9e77] | 184 | </para>
|
---|
| 185 |
|
---|
[47274444] | 186 | <para>
|
---|
| 187 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 188 | </para>
|
---|
[6dcb9e77] | 189 |
|
---|
| 190 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 191 |
|
---|
| 192 | </sect2>
|
---|
| 193 |
|
---|
[62cb663] | 194 | <sect2 role="commands">
|
---|
[4509c956] | 195 | <title>Command Explanations</title>
|
---|
[62cb663] | 196 | <para>
|
---|
| 197 | <option>--disable-ssh-token</option>: This option is required if
|
---|
| 198 | the optional libssh dependency is not installed.
|
---|
| 199 | </para>
|
---|
[61ed6e9] | 200 | </sect2>
|
---|
[6dcb9e77] | 201 |
|
---|
| 202 | <sect2 role="configuration">
|
---|
| 203 | <title>Configuring cryptsetup</title>
|
---|
| 204 |
|
---|
| 205 | <para>
|
---|
[effdf5be] | 206 | Because of the number of possible configurations, setup of encrypted
|
---|
| 207 | volumes is beyond the scope of the BLFS book. Please see the
|
---|
| 208 | configuration guide in the cryptsetup <ulink
|
---|
| 209 | url="https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions#2-setup">
|
---|
| 210 | FAQ</ulink>.
|
---|
[6dcb9e77] | 211 | </para>
|
---|
| 212 |
|
---|
| 213 | </sect2>
|
---|
| 214 |
|
---|
| 215 | <sect2 role="content">
|
---|
| 216 | <title>Contents</title>
|
---|
| 217 |
|
---|
| 218 | <segmentedlist>
|
---|
| 219 | <segtitle>Installed Programs</segtitle>
|
---|
| 220 | <segtitle>Installed Libraries</segtitle>
|
---|
| 221 | <segtitle>Installed Directories</segtitle>
|
---|
| 222 |
|
---|
| 223 | <seglistitem>
|
---|
| 224 | <seg>
|
---|
[9f5dcb97] | 225 | cryptsetup,
|
---|
| 226 | cryptsetup-reencrypt,
|
---|
| 227 | integritysetup, and
|
---|
[6dcb9e77] | 228 | veritysetup
|
---|
| 229 | </seg>
|
---|
| 230 | <seg>
|
---|
| 231 | libcryptsetup.so
|
---|
| 232 | </seg>
|
---|
| 233 | <seg>
|
---|
[8558044] | 234 | None
|
---|
[6dcb9e77] | 235 | </seg>
|
---|
| 236 | </seglistitem>
|
---|
| 237 | </segmentedlist>
|
---|
| 238 |
|
---|
| 239 | <variablelist>
|
---|
| 240 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 241 | <?dbfo list-presentation="list"?>
|
---|
| 242 | <?dbhtml list-presentation="table"?>
|
---|
| 243 |
|
---|
| 244 | <varlistentry id="cryptsetup-prog">
|
---|
| 245 | <term><command>cryptsetup</command></term>
|
---|
| 246 | <listitem>
|
---|
| 247 | <para>
|
---|
[4c24eb0a] | 248 | is used to setup dm-crypt managed device-mapper mappings
|
---|
[6dcb9e77] | 249 | </para>
|
---|
| 250 | <indexterm zone="cryptsetup cryptsetup-prog">
|
---|
| 251 | <primary sortas="b-cryptsetup">cryptsetup</primary>
|
---|
| 252 | </indexterm>
|
---|
| 253 | </listitem>
|
---|
| 254 | </varlistentry>
|
---|
| 255 |
|
---|
[9f5dcb97] | 256 | <varlistentry id="cryptsetup-reencrypt">
|
---|
| 257 | <term><command>cryptsetup-reencrypt</command></term>
|
---|
| 258 | <listitem>
|
---|
| 259 | <para>
|
---|
[de5db85] | 260 | is a tool for offline LUKS device re-encryption
|
---|
[9f5dcb97] | 261 | </para>
|
---|
| 262 | <indexterm zone="cryptsetup cryptsetup-reencrypt">
|
---|
| 263 | <primary sortas="b-cryptsetup-reencrypt">cryptsetup-reencrypt</primary>
|
---|
| 264 | </indexterm>
|
---|
| 265 | </listitem>
|
---|
| 266 | </varlistentry>
|
---|
| 267 |
|
---|
| 268 | <varlistentry id="integritysetup">
|
---|
| 269 | <term><command>integritysetup</command></term>
|
---|
| 270 | <listitem>
|
---|
| 271 | <para>
|
---|
[4c24eb0a] | 272 | is a tool to manage dm-integrity (block level integrity) volumes
|
---|
[9f5dcb97] | 273 | </para>
|
---|
| 274 | <indexterm zone="cryptsetup integritysetup">
|
---|
| 275 | <primary sortas="b-integritysetup">integritysetup</primary>
|
---|
| 276 | </indexterm>
|
---|
| 277 | </listitem>
|
---|
| 278 | </varlistentry>
|
---|
| 279 |
|
---|
[6dcb9e77] | 280 | <varlistentry id="veritysetup">
|
---|
| 281 | <term><command>veritysetup</command></term>
|
---|
| 282 | <listitem>
|
---|
| 283 | <para>
|
---|
| 284 | is used to configure dm-verity managed device-mapper mappings.
|
---|
| 285 | Device-mapper verity target provides read-only transparent integrity
|
---|
[4c24eb0a] | 286 | checking of block devices using kernel crypto API
|
---|
[6dcb9e77] | 287 | </para>
|
---|
| 288 | <indexterm zone="cryptsetup veritysetup">
|
---|
| 289 | <primary sortas="b-veritysetup">veritysetup</primary>
|
---|
| 290 | </indexterm>
|
---|
| 291 | </listitem>
|
---|
| 292 | </varlistentry>
|
---|
| 293 |
|
---|
| 294 | </variablelist>
|
---|
| 295 |
|
---|
| 296 | </sect2>
|
---|
| 297 |
|
---|
| 298 | </sect1>
|
---|