source: postlfs/security/cryptsetup.xml@ 0b8fb2f

12.0 12.1 kea ken/TL2024 ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 0b8fb2f was 4eadcde, checked in by Pierre Labastie <pierre.labastie@…>, 15 months ago

Update cryptsetup kernel configuration

The layout has changed. Here is the one in linux-6.2

  • Property mode set to 100644
File size: 9.3 KB
Line 
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
7 <!ENTITY cryptsetup-download-http "&kernel-dl;/linux/utils/cryptsetup/v&cryptsetup-minor;/cryptsetup-&cryptsetup-version;.tar.xz">
8 <!ENTITY cryptsetup-download-ftp " ">
9 <!ENTITY cryptsetup-md5sum "2303d57e78d4977344188a46e125095c">
10 <!ENTITY cryptsetup-size "11 MB">
11 <!ENTITY cryptsetup-buildsize "29 MB (add 5 MB for tests)">
12 <!ENTITY cryptsetup-time "0.2 SBU (add 19 SBU for tests)">
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
30 using the kernel crypto API.
31 </para>
32
33 &lfs113_checked;
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
69<!-- No longer needed with 2.3.2.
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>
79-->
80
81 <bridgehead renderas="sect3">cryptsetup Dependencies</bridgehead>
82
83 <bridgehead renderas="sect4">Required</bridgehead>
84 <para role="required">
85 <xref linkend="json-c"/>,
86 <xref linkend="lvm2"/>, and
87 <xref linkend="popt"/>
88 </para>
89
90 <bridgehead renderas="sect4">Optional</bridgehead>
91 <para role="optional">
92 <xref linkend="libpwquality"/>,
93 <ulink url="https://github.com/P-H-C/phc-winner-argon2">argon2</ulink>,
94 <ulink url="https://www.libssh.org/">libssh</ulink>, and
95 <ulink url="https://www.openwall.com/passwdqc/">passwdqc</ulink>
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>
108 Encrypted block devices require kernel support. To use it, the
109 appropriate kernel configuration parameters need to be set:
110 </para>
111
112<screen><literal>Device Drivers ---&gt;
113 [*] Multiple devices driver support (RAID and LVM) ---&gt; [CONFIG_MD]
114 &lt;*/M&gt; Device mapper support [CONFIG_BLK_DEV_DM]
115 &lt;*/M&gt; Crypt target support [CONFIG_DM_CRYPT]
116
117-*- Cryptographic API ---&gt; [CONFIG_CRYPTO]
118 Length-preserving ciphers and modes ---&gt;
119 &lt;*/M&gt; 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 &lt;*/M&gt; Symmetric key cipher algorithms [CONFIG_CRYPTO_USER_API_SKCIPHER]
126 For tests:
127 Block ciphers --->
128 &lt;*/M&gt; Twofish [CONFIG_CRYPTO_TWOFISH]</literal></screen>
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
139<!-- No longer needed with 2.3.2
140 <para>
141 First, apply a patch to fix a build problem caused by API changes in
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>
146-->
147
148 <para>
149 Install <application>cryptsetup</application> by running the following
150 commands:
151 </para>
152
153<screen><userinput>./configure --prefix=/usr --disable-ssh-token &amp;&amp;
154make</userinput></screen>
155
156 <para>
157 To test the result, issue as the <systemitem
158 class="username">root</systemitem> user: <command>make check</command>.
159 Some tests will fail if appropriate kernel configuration options are not
160 set. Some additional options that may be needed for tests are:
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
178 CONFIG_CRYPTO_TWOFISH_X86_64.
179 <!--I had 1 of 21 tests fail with the above crypto options in the
180 kernel. Eight tests were not run. Version 2.4.3.
181 Failed test was tcrypt-compat-test
182 tcrypt-images/tc_1-ripemd160-cbc-aes [FAILED]
183 bdubbs -->
184 </para>
185
186 <para>
187 Now, as the <systemitem class="username">root</systemitem> user:
188 </para>
189
190<screen role="root"><userinput>make install</userinput></screen>
191
192 </sect2>
193
194 <sect2 role="commands">
195 <title>Command Explanations</title>
196 <para>
197 <option>--disable-ssh-token</option>: This option is required if
198 the optional libssh dependency is not installed.
199 </para>
200 </sect2>
201
202 <sect2 role="configuration">
203 <title>Configuring cryptsetup</title>
204
205 <para>
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>.
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>
225 cryptsetup,
226 cryptsetup-reencrypt,
227 integritysetup, and
228 veritysetup
229 </seg>
230 <seg>
231 libcryptsetup.so
232 </seg>
233 <seg>
234 None
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>
248 is used to setup dm-crypt managed device-mapper mappings
249 </para>
250 <indexterm zone="cryptsetup cryptsetup-prog">
251 <primary sortas="b-cryptsetup">cryptsetup</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry id="cryptsetup-reencrypt">
257 <term><command>cryptsetup-reencrypt</command></term>
258 <listitem>
259 <para>
260 is a tool for offline LUKS device re-encryption
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>
272 is a tool to manage dm-integrity (block level integrity) volumes
273 </para>
274 <indexterm zone="cryptsetup integritysetup">
275 <primary sortas="b-integritysetup">integritysetup</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
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
286 checking of block devices using kernel crypto API
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>
Note: See TracBrowser for help on using the repository browser.