Re: defaults for cryptsetup

Paul Wise <[email protected]> Sun, 05 May 2024 14:34:21 +0800
Newsgroups gmane.linux.debian.user.testing
Organization Debian
Message-ID <[email protected]>
On Fri, 2024-05-03 at 20:01 +0100, Bhasker C V wrote:

> From cryptsetup 2:2.6.1-4~deb12u2  to 2:2.7.2-2  (on trixie) the
> defaults for cipher and hash have changed. 
> I have used the previous version and it is difficult to type cypher
> and hash every time a dm-plain device is opened 
> Is there a way to setup defaults in a config file - the only other
> option is to fall back to cryptsetup 2.6.1 to continue using my
> encrypted devices rather than typing out 
> aes-cbc-essiv:sha256 or ripemd160 

There are a few options for this:

Create a new device using the new defaults, copy the data over and
continue with the new defaults.

Switch to a new device using LUKS, which stores the encryption type in
a header that is stored on the disk, so you don't have to specify it.

Store the settings in /etc/crypttab and rely on the default systemd
crypttab conversion scripts starting and mounting the device.
The crypttab manual page documents how to do this.

Create a script containing the desired values and run it to setup
devices instead of plain cryptsetup commands.

Create the same using manually created systemd unit files.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEYQsotVz8/kXqG1Y7MRa6Xp/6aaMFAmY3KGkACgkQMRa6Xp/6
aaPpCg/9GiikmRojsBS2/eP1ov01DP5EbCnY3LHGWP+mG1a7u6KwIOzbd70UlOkq
vEqEiHOVLGSK2OOEHNrgs5p2cnJmuiYtQKeh25dAY5w7CwK5j4cZ09eS0+G0leK6
L8wHxqBw5izAjqx+4gj+PJLJq/LsiYf6890OS1po1DCPV1s1wnO6sOA283qPsw+f
Jj0f0x0W/CIYrQq6YvfkFfdZC5alieQGWXY/Ekdg8DTRrCDocsphbfJTuh7EWAE+
TciN6kfjc62IAmwQHg9fFz94v+aVGBDxua5AnBaPkQpueFnSV8ftxXFrOczjVNrS
z0udjtk4JA5ycadGnxrhNgHIHjMmc1UqyXPG3C7oxkh7e6NvGSnAwaXsHUCuXxou
5mfEq175Z5gHAd25SuBnQwYtRrYOrqL5ITxv8oupElZ3+YNL9/b3eMdYQcKbl9MB
Av6gDrjwcriEJn2tdAx3B70ddkmzP1WknXXbK0sDdbWrUpfmL+xHV+ptfhIwQXX5
+WzS7aoIqhEXLYEw+1hJEvsrWzeESMjYbvNZUjMmZ+akPVAPKShePsLL/hqgpcvD
2hCPnCX0nKB/CUW9nr1rbLpH2zAPusWJqe7nzZifPGewRQydVNP+STPVUT3SWo+x
sUTuxtRy8IogegvpplITUgQ+nmi9Q/uw8cZHndzdwBMxBlTJduM=
=iYeh
-----END PGP SIGNATURE-----