<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Migrating_from_whirlpool_hash_for_LUKS_partitions</id>
	<title>Migrating from whirlpool hash for LUKS partitions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/index.php?action=history&amp;feed=atom&amp;title=Migrating_from_whirlpool_hash_for_LUKS_partitions"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Migrating_from_whirlpool_hash_for_LUKS_partitions&amp;action=history"/>
	<updated>2026-04-10T14:35:00Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Migrating_from_whirlpool_hash_for_LUKS_partitions&amp;diff=31853&amp;oldid=prev</id>
		<title>John3-16: 1. Added &#039;See also&#039;: Setting up encrypted volumes with LUKS, LVM on LUKS, Full disk encryption secure boot;  2. Added Categories:  Security, Storage</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Migrating_from_whirlpool_hash_for_LUKS_partitions&amp;diff=31853&amp;oldid=prev"/>
		<updated>2025-12-22T04:23:13Z</updated>

		<summary type="html">&lt;p&gt;1. Added &amp;#039;See also&amp;#039;: Setting up encrypted volumes with LUKS, LVM on LUKS, Full disk encryption secure boot;  2. Added Categories:  Security, Storage&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:23, 22 December 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l42&quot;&gt;Line 42:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 42:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then run &amp;lt;code&amp;gt;grub-install&amp;lt;/code&amp;gt;. The command line will differ depending on your setup (EFI vs. MBR). On MBR run&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Then run &amp;lt;code&amp;gt;grub-install&amp;lt;/code&amp;gt;. The command line will differ depending on your setup (EFI vs. MBR). On MBR run&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt; grub-install /dev/sdX &amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt; grub-install /dev/sdX &amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== See also ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[Setting_up_encrypted_volumes_with_LUKS|Setting up encrypted volumes with LUKS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[LVM_on_LUKS|LVM on LUKS]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* [[Full_disk_encryption_secure_boot|Full disk encryption secure boot]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Security]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Storage]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>John3-16</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Migrating_from_whirlpool_hash_for_LUKS_partitions&amp;diff=22713&amp;oldid=prev</id>
		<title>Mmhiro: Created page with &quot;{{Draft}}  See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13004  OpenSSL 3.0 has desginated the whirlpool hash as [https://wiki.openssl.org/index.php/OpenSSL_3.0#Provider_implemented_digests legacy]. This means it may not be loaded by default by OpenSSL so you cannot decrypt partitions using whirlpool. This is an issue for Alpine users because since v3.17 OpenSSL 3.0 is default, and multiple articles on this wiki recommended the use of whirlpool. In some case...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Migrating_from_whirlpool_hash_for_LUKS_partitions&amp;diff=22713&amp;oldid=prev"/>
		<updated>2022-12-02T08:10:40Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Draft}}  See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13004  OpenSSL 3.0 has desginated the whirlpool hash as [https://wiki.openssl.org/index.php/OpenSSL_3.0#Provider_implemented_digests legacy]. This means it may not be loaded by default by OpenSSL so you cannot decrypt partitions using whirlpool. This is an issue for Alpine users because since v3.17 OpenSSL 3.0 is default, and multiple articles on this wiki recommended the use of whirlpool. In some case...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Draft}}&lt;br /&gt;
&lt;br /&gt;
See: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13004&lt;br /&gt;
&lt;br /&gt;
OpenSSL 3.0 has desginated the whirlpool hash as [https://wiki.openssl.org/index.php/OpenSSL_3.0#Provider_implemented_digests legacy]. This means it may not be loaded by default by OpenSSL so you cannot decrypt partitions using whirlpool. This is an issue for Alpine users because since v3.17 OpenSSL 3.0 is default, and multiple articles on this wiki recommended the use of whirlpool. In some cases (i.e. with an encrypted boot partition) a user may not be able to boot their system at all.&lt;br /&gt;
&lt;br /&gt;
== Migrate Away from Whirlpool ==&lt;br /&gt;
&lt;br /&gt;
This has been tested on a LUKS1 partition. I am not responsible if you lose all your data.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If you suffer a power failure, kernel panic, or any interruption during the reencryption step, your data may be permanently lost.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
First, get a LiveCD with cryptsetup (I used Fedora 37). Older versions of cryptsetup require &amp;lt;code&amp;gt;cryptsetup-reencrypt&amp;lt;/code&amp;gt; to modify LUKS1 partitions, while newer versions (2.5.0 or 2.6.0 or later) use &amp;lt;code&amp;gt;cryptsetup reencrypt&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then backup your drive. At the minimum, dump the headers using&lt;br /&gt;
&amp;lt;pre&amp;gt;cryptsetup --header-backup-file=backup_file_location.bin luksHeaderBackup /dev/partition&amp;lt;/pre&amp;gt;&lt;br /&gt;
You should store the header on a USB stick or some other form of persistent media.&lt;br /&gt;
&lt;br /&gt;
If you have keys that cannot be typed in (i.e. keyfiles) then you will have to either&lt;br /&gt;
# find &amp;#039;&amp;#039;&amp;#039;one&amp;#039;&amp;#039;&amp;#039; key that you want to preserve (you must know the keyslot, in this document it will be called N)&lt;br /&gt;
# or remove all keyfiles using &amp;lt;code&amp;gt;luksRemoveKey&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I removed my keyfile slot using &amp;lt;code&amp;gt;luksRemoveKey&amp;lt;/code&amp;gt; and then confirmed that my password still worked using &amp;lt;code&amp;gt;cryptsetup luksOpen --test-passphrase /dev/partition&amp;lt;/code&amp;gt;. If you mess up, you can try recovering your keys using &amp;lt;code&amp;gt;luksHeaderRestore&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Make sure that the device is not opened (if you had to get files off of it, run &amp;lt;code&amp;gt;cryptsetup luksClose device_name&amp;lt;/code&amp;gt;). If you are preserving keyslot N, run&lt;br /&gt;
&amp;lt;pre&amp;gt;cryptsetup reencrypt --keep-key --key-slot N --key-file keyfile.bin --hash sha512 /dev/partition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you are not specifying a keyfile, run&lt;br /&gt;
&amp;lt;pre&amp;gt;cryptsetup reencrypt --keep-key --key-slot N --hash sha512 /dev/partition&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and enter all passwords into the prompts. You can specify another hash if you want to, but sha512 is probably your best choice right now.&lt;br /&gt;
&lt;br /&gt;
Once the command is done (should take a few seconds), verify that you can successfully open and mount your partition.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;If you use an encrypted boot&amp;#039;&amp;#039;&amp;#039;, then you must also reinstall grub. Open your partition with cryptsetup and mount it. Enter the directory and run&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mount -t proc /proc proc/&lt;br /&gt;
mount -t sysfs /sys sys/&lt;br /&gt;
mount --rbind /dev dev/&lt;br /&gt;
chroot . /bin/ash&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then run &amp;lt;code&amp;gt;grub-install&amp;lt;/code&amp;gt;. The command line will differ depending on your setup (EFI vs. MBR). On MBR run&lt;br /&gt;
&amp;lt;pre&amp;gt; grub-install /dev/sdX &amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mmhiro</name></author>
	</entry>
</feed>