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