[ab4fdfc] | 1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
[6dcb9e77] | 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 " ">
|
---|
[92a62494] | 9 | <!ENTITY cryptsetup-md5sum "f663f37dd478484f61ace54902c17274">
|
---|
[64bdbdcc] | 10 | <!ENTITY cryptsetup-size "11 MB">
|
---|
[92a62494] | 11 | <!ENTITY cryptsetup-buildsize "33 MB (add 5 MB for tests)">
|
---|
[beb2909] | 12 | <!ENTITY cryptsetup-time "0.2 SBU (add 8.1 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 |
|
---|
[4c0efc3c] | 33 | &lfs122_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">
|
---|
[2d2793d] | 92 | <xref linkend="asciidoctor"/>,
|
---|
[6dcb9e77] | 93 | <xref linkend="libpwquality"/>,
|
---|
[7a9a7b26] | 94 | <ulink url="https://github.com/P-H-C/phc-winner-argon2">argon2</ulink>,
|
---|
[cd29bc9] | 95 | <ulink url="https://www.libssh.org/">libssh</ulink>, and
|
---|
| 96 | <ulink url="https://www.openwall.com/passwdqc/">passwdqc</ulink>
|
---|
[6dcb9e77] | 97 | </para>
|
---|
| 98 |
|
---|
| 99 |
|
---|
| 100 | </sect2>
|
---|
| 101 |
|
---|
| 102 | <sect2 role="kernel" id="cryptsetup-kernel">
|
---|
| 103 | <title>Kernel Configuration</title>
|
---|
| 104 |
|
---|
| 105 | <para>
|
---|
[416617d6] | 106 | Encrypted block devices require kernel support. To use it, the
|
---|
[6dcb9e77] | 107 | appropriate kernel configuration parameters need to be set:
|
---|
| 108 | </para>
|
---|
| 109 |
|
---|
[9cc0aba5] | 110 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 111 | href="cryptsetup-kernel.xml"/>
|
---|
[6dcb9e77] | 112 |
|
---|
| 113 | <indexterm zone="cryptsetup cryptsetup-kernel">
|
---|
| 114 | <primary sortas="d-cryptsetup">cryptsetup</primary>
|
---|
| 115 | </indexterm>
|
---|
| 116 |
|
---|
| 117 | </sect2>
|
---|
| 118 |
|
---|
| 119 | <sect2 role="installation">
|
---|
| 120 | <title>Installation of cryptsetup</title>
|
---|
| 121 |
|
---|
| 122 | <para>
|
---|
| 123 | Install <application>cryptsetup</application> by running the following
|
---|
| 124 | commands:
|
---|
| 125 | </para>
|
---|
| 126 |
|
---|
[2d2793d] | 127 | <screen><userinput>./configure --prefix=/usr \
|
---|
[30940d7] | 128 | --disable-ssh-token \
|
---|
| 129 | --disable-asciidoc &&
|
---|
[6dcb9e77] | 130 | make</userinput></screen>
|
---|
| 131 |
|
---|
| 132 | <para>
|
---|
| 133 | To test the result, issue as the <systemitem
|
---|
[9f5dcb97] | 134 | class="username">root</systemitem> user: <command>make check</command>.
|
---|
[2e18e741] | 135 | Some tests will fail if appropriate kernel configuration options are not
|
---|
[8558044] | 136 | set. Some additional options that may be needed for tests are:
|
---|
[30940d7] | 137 | <screen><literal>CONFIG_SCSI_LOWLEVEL,
|
---|
| 138 | CONFIG_SCSI_DEBUG,
|
---|
| 139 | CONFIG_BLK_DEV_DM_BUILTIN,
|
---|
| 140 | CONFIG_CRYPTO_USER,
|
---|
| 141 | CONFIG_CRYPTO_CRYPTD,
|
---|
| 142 | CONFIG_CRYPTO_LRW,
|
---|
| 143 | CONFIG_CRYPTO_XTS,
|
---|
| 144 | CONFIG_CRYPTO_ESSIV,
|
---|
| 145 | CONFIG_CRYPTO_CRCT10DIF,
|
---|
| 146 | CONFIG_CRYPTO_AES_TI,
|
---|
| 147 | CONFIG_CRYPTO_AES_NI_INTEL,
|
---|
| 148 | CONFIG_CRYPTO_BLOWFISH,
|
---|
| 149 | CONFIG_CRYPTO_CAST5,
|
---|
| 150 | CONFIG_CRYPTO_SERPENT,
|
---|
| 151 | CONFIG_CRYPTO_SERPENT_SSE2_X86_64,
|
---|
| 152 | CONFIG_CRYPTO_SERPENT_AVX_X86_64,
|
---|
| 153 | CONFIG_CRYPTO_SERPENT_AVX2_X86_64, and
|
---|
| 154 | CONFIG_CRYPTO_TWOFISH_X86_64</literal></screen>
|
---|
[62cb663] | 155 | <!--I had 1 of 21 tests fail with the above crypto options in the
|
---|
[7a9a7b26] | 156 | kernel. Eight tests were not run. Version 2.4.3.
|
---|
[62cb663] | 157 | Failed test was tcrypt-compat-test
|
---|
| 158 | tcrypt-images/tc_1-ripemd160-cbc-aes [FAILED]
|
---|
[30940d7] | 159 | bdubbs
|
---|
| 160 |
|
---|
| 161 | Version 2.6.1 12/03/2023 -bdubbs
|
---|
| 162 | 2 of 26 tests failed (6 tests were not run)
|
---|
| 163 | FAIL: keyring-compat-test
|
---|
| 164 | FAIL: tcrypt-compat-test
|
---|
[0f4d7bc] | 165 |
|
---|
| 166 | Version 2.7.0 01/25/2024 -bdubbs
|
---|
| 167 | 2 of 25 tests failed (8 tests were not run)
|
---|
| 168 | FAIL: keyring-compat-test
|
---|
| 169 | FAIL: tcrypt-compat-test
|
---|
[30940d7] | 170 | -->
|
---|
[6dcb9e77] | 171 | </para>
|
---|
| 172 |
|
---|
[47274444] | 173 | <para>
|
---|
| 174 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 175 | </para>
|
---|
[6dcb9e77] | 176 |
|
---|
| 177 | <screen role="root"><userinput>make install</userinput></screen>
|
---|
| 178 |
|
---|
| 179 | </sect2>
|
---|
| 180 |
|
---|
[62cb663] | 181 | <sect2 role="commands">
|
---|
[4509c956] | 182 | <title>Command Explanations</title>
|
---|
[30940d7] | 183 |
|
---|
[62cb663] | 184 | <para>
|
---|
[2d2793d] | 185 | <parameter>--disable-ssh-token</parameter>: This switch is required if
|
---|
[62cb663] | 186 | the optional libssh dependency is not installed.
|
---|
| 187 | </para>
|
---|
[30940d7] | 188 |
|
---|
| 189 | <para>
|
---|
[2d2793d] | 190 | <parameter>--disable-asciidoc</parameter>: This switch disables
|
---|
| 191 | regeneration of the man pages. Remove this switch if you have
|
---|
| 192 | <xref linkend="asciidoctor" role="nodep"/> installed and wish to
|
---|
[86b3ae3] | 193 | regenerate the man pages. Note that even if this switch is used,
|
---|
| 194 | the pre-generated man pages are shipped in the tarball and they'll
|
---|
| 195 | still be installed.
|
---|
[30940d7] | 196 | </para>
|
---|
[61ed6e9] | 197 | </sect2>
|
---|
[6dcb9e77] | 198 |
|
---|
| 199 | <sect2 role="configuration">
|
---|
| 200 | <title>Configuring cryptsetup</title>
|
---|
| 201 |
|
---|
| 202 | <para>
|
---|
[effdf5be] | 203 | Because of the number of possible configurations, setup of encrypted
|
---|
| 204 | volumes is beyond the scope of the BLFS book. Please see the
|
---|
| 205 | configuration guide in the cryptsetup <ulink
|
---|
| 206 | url="https://gitlab.com/cryptsetup/cryptsetup/wikis/FrequentlyAskedQuestions#2-setup">
|
---|
| 207 | FAQ</ulink>.
|
---|
[6dcb9e77] | 208 | </para>
|
---|
| 209 |
|
---|
| 210 | </sect2>
|
---|
| 211 |
|
---|
| 212 | <sect2 role="content">
|
---|
| 213 | <title>Contents</title>
|
---|
| 214 |
|
---|
| 215 | <segmentedlist>
|
---|
| 216 | <segtitle>Installed Programs</segtitle>
|
---|
| 217 | <segtitle>Installed Libraries</segtitle>
|
---|
| 218 | <segtitle>Installed Directories</segtitle>
|
---|
| 219 |
|
---|
| 220 | <seglistitem>
|
---|
| 221 | <seg>
|
---|
[9f5dcb97] | 222 | cryptsetup,
|
---|
| 223 | cryptsetup-reencrypt,
|
---|
| 224 | integritysetup, and
|
---|
[6dcb9e77] | 225 | veritysetup
|
---|
| 226 | </seg>
|
---|
| 227 | <seg>
|
---|
| 228 | libcryptsetup.so
|
---|
| 229 | </seg>
|
---|
| 230 | <seg>
|
---|
[8558044] | 231 | None
|
---|
[6dcb9e77] | 232 | </seg>
|
---|
| 233 | </seglistitem>
|
---|
| 234 | </segmentedlist>
|
---|
| 235 |
|
---|
| 236 | <variablelist>
|
---|
| 237 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 238 | <?dbfo list-presentation="list"?>
|
---|
| 239 | <?dbhtml list-presentation="table"?>
|
---|
| 240 |
|
---|
| 241 | <varlistentry id="cryptsetup-prog">
|
---|
| 242 | <term><command>cryptsetup</command></term>
|
---|
| 243 | <listitem>
|
---|
| 244 | <para>
|
---|
[2d2793d] | 245 | is used to setup dm-crypt managed device-mapper mappings
|
---|
[6dcb9e77] | 246 | </para>
|
---|
| 247 | <indexterm zone="cryptsetup cryptsetup-prog">
|
---|
| 248 | <primary sortas="b-cryptsetup">cryptsetup</primary>
|
---|
| 249 | </indexterm>
|
---|
| 250 | </listitem>
|
---|
| 251 | </varlistentry>
|
---|
| 252 |
|
---|
[9f5dcb97] | 253 | <varlistentry id="cryptsetup-reencrypt">
|
---|
| 254 | <term><command>cryptsetup-reencrypt</command></term>
|
---|
| 255 | <listitem>
|
---|
| 256 | <para>
|
---|
[2d2793d] | 257 | is a tool for offline LUKS device re-encryption
|
---|
[9f5dcb97] | 258 | </para>
|
---|
| 259 | <indexterm zone="cryptsetup cryptsetup-reencrypt">
|
---|
| 260 | <primary sortas="b-cryptsetup-reencrypt">cryptsetup-reencrypt</primary>
|
---|
| 261 | </indexterm>
|
---|
| 262 | </listitem>
|
---|
| 263 | </varlistentry>
|
---|
| 264 |
|
---|
| 265 | <varlistentry id="integritysetup">
|
---|
| 266 | <term><command>integritysetup</command></term>
|
---|
| 267 | <listitem>
|
---|
| 268 | <para>
|
---|
[2d2793d] | 269 | is a tool to manage dm-integrity (block level integrity) volumes
|
---|
[9f5dcb97] | 270 | </para>
|
---|
| 271 | <indexterm zone="cryptsetup integritysetup">
|
---|
| 272 | <primary sortas="b-integritysetup">integritysetup</primary>
|
---|
| 273 | </indexterm>
|
---|
| 274 | </listitem>
|
---|
| 275 | </varlistentry>
|
---|
| 276 |
|
---|
[6dcb9e77] | 277 | <varlistentry id="veritysetup">
|
---|
| 278 | <term><command>veritysetup</command></term>
|
---|
| 279 | <listitem>
|
---|
| 280 | <para>
|
---|
[2d2793d] | 281 | is used to configure dm-verity managed device-mapper mappings.
|
---|
| 282 | The Device-mapper verity target provides read-only transparent
|
---|
| 283 | integrity checking of block devices using the kernel crypto API
|
---|
[6dcb9e77] | 284 | </para>
|
---|
| 285 | <indexterm zone="cryptsetup veritysetup">
|
---|
| 286 | <primary sortas="b-veritysetup">veritysetup</primary>
|
---|
| 287 | </indexterm>
|
---|
| 288 | </listitem>
|
---|
| 289 | </varlistentry>
|
---|
| 290 |
|
---|
| 291 | </variablelist>
|
---|
| 292 |
|
---|
| 293 | </sect2>
|
---|
| 294 |
|
---|
| 295 | </sect1>
|
---|