<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johanneszab</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Johanneszab"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Johanneszab"/>
	<updated>2026-05-03T09:46:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26805</id>
		<title>Talk:LVM on LUKS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26805"/>
		<updated>2024-05-31T11:45:36Z</updated>

		<summary type="html">&lt;p&gt;Johanneszab: /* Optimized for security suggestions lowers the memory cost for attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why was ,mode=1777  removed from /tmp?&lt;br /&gt;
--[[User:Ncopa|Ncopa]] ([[User talk:Ncopa|talk]]) 07:12, 15 May 2014 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Hello! While following the directions for installing grub (via grub-install) I found the package efibootmgr is longer available using apk. Help!&lt;br /&gt;
--[[User:Mnemolyst|Mnemolyst]] ([[User talk:Mnemolyst|talk]]) 22:40, 07 Nov 2019 (UTC)&lt;br /&gt;
----&lt;br /&gt;
The last two umount statements before the reboot require a newer version of umount than what comes in the standard Alpine download. I needed to add the package util-linux to get the correct version and although the page mentions the package in the early section about getting the boot device name it doesn&#039;t explicitly state to download it.&lt;br /&gt;
--[[User:Sadbadman|Sadbadman]] ([[User talk:Sadbadman|talk]]) 06:45, 2 February 2020 (UTC)&lt;br /&gt;
----&lt;br /&gt;
I had difficulty with an encrypted /boot setup sda1=&amp;gt;efi, sda2=&amp;gt;crypt=&amp;gt;lvm(/root,/boot,swap).  The instructions by default will result in using LUKS2 with Argon2.  This is not actually supported by GRUB2 for an encrypted /boot setup (see Arch wiki article &amp;quot;GRUB&amp;quot;, section &amp;quot;Encrypted_/boot&amp;quot; and  GRUB bug 55093 - i can&#039;t post links yet).  Until GRUB 2.06 is released and reaches alpine, users wanting encrypted /boot may need --type luks1 when running cryptsetup luksFormat.  And once GRUB 2.06 does arrive, it may require using PBKDF2.  Users will need to consult GRUB documentation when that time comes.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 09:09, 16 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
I was able to confirm the above about --type luks1 today.  That, plus adding &amp;quot;GRUB_ENABLE_CRYPTODISK=y&amp;quot; to /etc/default/grub, allowed this procedure to work with v3.11.  I will update accordingly.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 00:38, 17 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optional: Overwrite LUKS Partition with Random Data ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Is this section still accurate since since Kernel 5.6, or roughly Alpine Linux version 3.13?&lt;br /&gt;
Doesn&#039;t /dev/random now do what is needed here without installing extra packages?&amp;lt;/s&amp;gt;&lt;br /&gt;
[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 18:56, 17 December 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{done}}&lt;br /&gt;
:Looks like psykose, et al, removed the references to mostly obsolete haveged.&lt;br /&gt;
:[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 03:23, 14 August 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optimized for security suggestions lowers the memory cost for attacks ==&lt;br /&gt;
&lt;br /&gt;
The currently suggested optimized for security in &#039;&#039;cryptsetup&#039;&#039; recommendations lowers the memory cost for attacks from the defaults. From the article:&lt;br /&gt;
&lt;br /&gt;
 [..] you could either use the default settings (aes-xts-plain64 cipher with 256-bit key and Argon2 hashing with iter-time 2000ms), or you could use these settings which have added security with the trade-off being a non-noticeable decrease in performance on modern computers:&lt;br /&gt;
&lt;br /&gt;
 Luks2 Optimized for security:&lt;br /&gt;
 &lt;br /&gt;
 # cryptsetup -v -c aes-xts-plain64 -s 512 --hash sha512 --pbkdf pbkdf2 --iter-time 5000 --use-random luksFormat /dev/sda2&lt;br /&gt;
&lt;br /&gt;
The defaults in &#039;&#039;cryptsetup&#039;&#039; were changed from pbkdf2 to Argon2id exactly for this reason: To make it more memory costly in order to inhibit usage of gpus/asics in attacks. We recommend the exact opposite of what the maintainers of cryptsetup did. The compute power of GPUs have increased significantly more than those of CPUs as such I think to add memory cost to the attackers is valuable goal.&lt;br /&gt;
&lt;br /&gt;
See also [https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuestions#10-luks2-questions 10.4  from the cryptsetup FAQ]&lt;br /&gt;
&lt;br /&gt;
 10.4  Why use Argon2 in LUKS 2 instead of PBKDF2?&lt;br /&gt;
 &lt;br /&gt;
 LUKS tries to be secure with not-so-good passwords.  Bad passwords need to&lt;br /&gt;
 be protected in some way against an attacker that just tries all possible&lt;br /&gt;
 combinations.  (For good passwords, you can just wait for the attacker to&lt;br /&gt;
 die of old age...) The situation with LUKS is not quite the same as with a&lt;br /&gt;
 password stored in a database, but there are similarities.&lt;br /&gt;
 LUKS does not store passwords on disk.  Instead, the passwords are used to&lt;br /&gt;
 decrypt the volume-key with it and that one is stored on disk in encrypted&lt;br /&gt;
 form.  If you have a good password, with, say, more than 80 bits of&lt;br /&gt;
 entropy, you could just put the password through a single crypto-hash (to&lt;br /&gt;
 turn it into something that can be used as a key) and that would be secure.&lt;br /&gt;
 This is what plain dm-crypt does.&lt;br /&gt;
 If the password has lower entropy, you want to make this process cost some&lt;br /&gt;
 effort, so that each try takes time and resources and slows the attacker&lt;br /&gt;
 down.  LUKS1 uses PBKDF2 for that, adding an iteration count and a salt.&lt;br /&gt;
 The iteration count is per default set to that it takes 1 second per try on&lt;br /&gt;
 the CPU of the device where the respective passphrase was set.  The salt is&lt;br /&gt;
 there to prevent precomputation.&lt;br /&gt;
 The problem with that is that if you use a graphics card, you can massively&lt;br /&gt;
 speed up these computations as PBKDF2 needs very little memory to compute&lt;br /&gt;
 it.  A graphics card is (grossly simplified) a mass of small CPUs with some&lt;br /&gt;
 small very fast local memory per CPU and a large slow memory (the 4/6/8 GB&lt;br /&gt;
 a current card may have).  If you can keep a computation in the small,&lt;br /&gt;
 CPU-local memory, you can gain a speed factor of 1000 or more when trying&lt;br /&gt;
 passwords with PBKDF2.&lt;br /&gt;
 Argon2 was created to address this problem.  It adds a &amp;quot;large memory&lt;br /&gt;
 property&amp;quot; where computing the result with less memory than the memory&lt;br /&gt;
 parameter requires is massively (exponentially) slowed down.  That means,&lt;br /&gt;
 if you set, for example, 4GB of memory, computing Argon2 on a graphics card&lt;br /&gt;
 with around 100kB of memory per &amp;quot;CPU&amp;quot; makes no sense at all because it is&lt;br /&gt;
 far too slow.  An attacker has hence to use real CPUs and furthermore is&lt;br /&gt;
 limited by main memory bandwidth.&lt;br /&gt;
 Hence the large amount of memory used is a security feature and should not&lt;br /&gt;
 be turned off or reduced.  If you really (!) understand what you are doing&lt;br /&gt;
 and can assure good passwords, you can either go back to PBKDF2 or set a&lt;br /&gt;
 low amount of memory used for Argon2 when creating the header.&lt;br /&gt;
&lt;br /&gt;
--[[User:Johanneszab|Johanneszab]] ([[User talk:Johanneszab|talk]]) 11:38, 31 May 2024 (UTC)&lt;/div&gt;</summary>
		<author><name>Johanneszab</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26804</id>
		<title>Talk:LVM on LUKS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26804"/>
		<updated>2024-05-31T11:43:03Z</updated>

		<summary type="html">&lt;p&gt;Johanneszab: /* Optimized for security suggestions lowers the memory cost for attacks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why was ,mode=1777  removed from /tmp?&lt;br /&gt;
--[[User:Ncopa|Ncopa]] ([[User talk:Ncopa|talk]]) 07:12, 15 May 2014 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Hello! While following the directions for installing grub (via grub-install) I found the package efibootmgr is longer available using apk. Help!&lt;br /&gt;
--[[User:Mnemolyst|Mnemolyst]] ([[User talk:Mnemolyst|talk]]) 22:40, 07 Nov 2019 (UTC)&lt;br /&gt;
----&lt;br /&gt;
The last two umount statements before the reboot require a newer version of umount than what comes in the standard Alpine download. I needed to add the package util-linux to get the correct version and although the page mentions the package in the early section about getting the boot device name it doesn&#039;t explicitly state to download it.&lt;br /&gt;
--[[User:Sadbadman|Sadbadman]] ([[User talk:Sadbadman|talk]]) 06:45, 2 February 2020 (UTC)&lt;br /&gt;
----&lt;br /&gt;
I had difficulty with an encrypted /boot setup sda1=&amp;gt;efi, sda2=&amp;gt;crypt=&amp;gt;lvm(/root,/boot,swap).  The instructions by default will result in using LUKS2 with Argon2.  This is not actually supported by GRUB2 for an encrypted /boot setup (see Arch wiki article &amp;quot;GRUB&amp;quot;, section &amp;quot;Encrypted_/boot&amp;quot; and  GRUB bug 55093 - i can&#039;t post links yet).  Until GRUB 2.06 is released and reaches alpine, users wanting encrypted /boot may need --type luks1 when running cryptsetup luksFormat.  And once GRUB 2.06 does arrive, it may require using PBKDF2.  Users will need to consult GRUB documentation when that time comes.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 09:09, 16 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
I was able to confirm the above about --type luks1 today.  That, plus adding &amp;quot;GRUB_ENABLE_CRYPTODISK=y&amp;quot; to /etc/default/grub, allowed this procedure to work with v3.11.  I will update accordingly.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 00:38, 17 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optional: Overwrite LUKS Partition with Random Data ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Is this section still accurate since since Kernel 5.6, or roughly Alpine Linux version 3.13?&lt;br /&gt;
Doesn&#039;t /dev/random now do what is needed here without installing extra packages?&amp;lt;/s&amp;gt;&lt;br /&gt;
[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 18:56, 17 December 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{done}}&lt;br /&gt;
:Looks like psykose, et al, removed the references to mostly obsolete haveged.&lt;br /&gt;
:[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 03:23, 14 August 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optimized for security suggestions lowers the memory cost for attacks ==&lt;br /&gt;
&lt;br /&gt;
The currently suggested -+optimized for security+- in &#039;&#039;cryptsetup&#039;&#039; recommendations lowers the memory cost for attacks from the defaults. From the article:&lt;br /&gt;
&lt;br /&gt;
 you could either use the default settings (aes-xts-plain64 cipher with 256-bit key and Argon2 hashing with iter-time 2000ms), or you could use these settings which have added security with the trade-off being a non-noticeable decrease in performance on modern computers: &lt;br /&gt;
 &lt;br /&gt;
 Luks2 Optimized for security:&lt;br /&gt;
 &lt;br /&gt;
 # cryptsetup -v -c aes-xts-plain64 -s 512 --hash sha512 --pbkdf pbkdf2 --iter-time 5000 --use-random luksFormat /dev/sda2&lt;br /&gt;
&lt;br /&gt;
The defaults in &#039;&#039;cryptsetup&#039;&#039; were changed from pbkdf2 to Argon2id exactly for this reason: To make it more memory costly in order to inhibit usage of gpus/asics in attacks. We recommend the exact opposite of what the maintainers of cryptsetup did. The compute power of GPUs have increased significantly more than those of CPUs as such I think to add memory cost to the attackers is valuable goal.&lt;br /&gt;
&lt;br /&gt;
See also [https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuestions#10-luks2-questions 10.4  from the cryptsetup FAQ]&lt;br /&gt;
&lt;br /&gt;
 10.4  Why use Argon2 in LUKS 2 instead of PBKDF2?&lt;br /&gt;
 &lt;br /&gt;
 LUKS tries to be secure with not-so-good passwords.  Bad passwords need to&lt;br /&gt;
 be protected in some way against an attacker that just tries all possible&lt;br /&gt;
 combinations.  (For good passwords, you can just wait for the attacker to&lt;br /&gt;
 die of old age...) The situation with LUKS is not quite the same as with a&lt;br /&gt;
 password stored in a database, but there are similarities.&lt;br /&gt;
 LUKS does not store passwords on disk.  Instead, the passwords are used to&lt;br /&gt;
 decrypt the volume-key with it and that one is stored on disk in encrypted&lt;br /&gt;
 form.  If you have a good password, with, say, more than 80 bits of&lt;br /&gt;
 entropy, you could just put the password through a single crypto-hash (to&lt;br /&gt;
 turn it into something that can be used as a key) and that would be secure.&lt;br /&gt;
 This is what plain dm-crypt does.&lt;br /&gt;
 If the password has lower entropy, you want to make this process cost some&lt;br /&gt;
 effort, so that each try takes time and resources and slows the attacker&lt;br /&gt;
 down.  LUKS1 uses PBKDF2 for that, adding an iteration count and a salt.&lt;br /&gt;
 The iteration count is per default set to that it takes 1 second per try on&lt;br /&gt;
 the CPU of the device where the respective passphrase was set.  The salt is&lt;br /&gt;
 there to prevent precomputation.&lt;br /&gt;
 The problem with that is that if you use a graphics card, you can massively&lt;br /&gt;
 speed up these computations as PBKDF2 needs very little memory to compute&lt;br /&gt;
 it.  A graphics card is (grossly simplified) a mass of small CPUs with some&lt;br /&gt;
 small very fast local memory per CPU and a large slow memory (the 4/6/8 GB&lt;br /&gt;
 a current card may have).  If you can keep a computation in the small,&lt;br /&gt;
 CPU-local memory, you can gain a speed factor of 1000 or more when trying&lt;br /&gt;
 passwords with PBKDF2.&lt;br /&gt;
 Argon2 was created to address this problem.  It adds a &amp;quot;large memory&lt;br /&gt;
 property&amp;quot; where computing the result with less memory than the memory&lt;br /&gt;
 parameter requires is massively (exponentially) slowed down.  That means,&lt;br /&gt;
 if you set, for example, 4GB of memory, computing Argon2 on a graphics card&lt;br /&gt;
 with around 100kB of memory per &amp;quot;CPU&amp;quot; makes no sense at all because it is&lt;br /&gt;
 far too slow.  An attacker has hence to use real CPUs and furthermore is&lt;br /&gt;
 limited by main memory bandwidth.&lt;br /&gt;
 Hence the large amount of memory used is a security feature and should not&lt;br /&gt;
 be turned off or reduced.  If you really (!) understand what you are doing&lt;br /&gt;
 and can assure good passwords, you can either go back to PBKDF2 or set a&lt;br /&gt;
 low amount of memory used for Argon2 when creating the header.&lt;br /&gt;
&lt;br /&gt;
--[[User:Johanneszab|Johanneszab]] ([[User talk:Johanneszab|talk]]) 11:38, 31 May 2024 (UTC)&lt;/div&gt;</summary>
		<author><name>Johanneszab</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26803</id>
		<title>Talk:LVM on LUKS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26803"/>
		<updated>2024-05-31T11:38:09Z</updated>

		<summary type="html">&lt;p&gt;Johanneszab: /* Optimized for security suggestions lower memory cost */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why was ,mode=1777  removed from /tmp?&lt;br /&gt;
--[[User:Ncopa|Ncopa]] ([[User talk:Ncopa|talk]]) 07:12, 15 May 2014 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Hello! While following the directions for installing grub (via grub-install) I found the package efibootmgr is longer available using apk. Help!&lt;br /&gt;
--[[User:Mnemolyst|Mnemolyst]] ([[User talk:Mnemolyst|talk]]) 22:40, 07 Nov 2019 (UTC)&lt;br /&gt;
----&lt;br /&gt;
The last two umount statements before the reboot require a newer version of umount than what comes in the standard Alpine download. I needed to add the package util-linux to get the correct version and although the page mentions the package in the early section about getting the boot device name it doesn&#039;t explicitly state to download it.&lt;br /&gt;
--[[User:Sadbadman|Sadbadman]] ([[User talk:Sadbadman|talk]]) 06:45, 2 February 2020 (UTC)&lt;br /&gt;
----&lt;br /&gt;
I had difficulty with an encrypted /boot setup sda1=&amp;gt;efi, sda2=&amp;gt;crypt=&amp;gt;lvm(/root,/boot,swap).  The instructions by default will result in using LUKS2 with Argon2.  This is not actually supported by GRUB2 for an encrypted /boot setup (see Arch wiki article &amp;quot;GRUB&amp;quot;, section &amp;quot;Encrypted_/boot&amp;quot; and  GRUB bug 55093 - i can&#039;t post links yet).  Until GRUB 2.06 is released and reaches alpine, users wanting encrypted /boot may need --type luks1 when running cryptsetup luksFormat.  And once GRUB 2.06 does arrive, it may require using PBKDF2.  Users will need to consult GRUB documentation when that time comes.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 09:09, 16 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
I was able to confirm the above about --type luks1 today.  That, plus adding &amp;quot;GRUB_ENABLE_CRYPTODISK=y&amp;quot; to /etc/default/grub, allowed this procedure to work with v3.11.  I will update accordingly.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 00:38, 17 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optional: Overwrite LUKS Partition with Random Data ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Is this section still accurate since since Kernel 5.6, or roughly Alpine Linux version 3.13?&lt;br /&gt;
Doesn&#039;t /dev/random now do what is needed here without installing extra packages?&amp;lt;/s&amp;gt;&lt;br /&gt;
[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 18:56, 17 December 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{done}}&lt;br /&gt;
:Looks like psykose, et al, removed the references to mostly obsolete haveged.&lt;br /&gt;
:[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 03:23, 14 August 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optimized for security suggestions lowers the memory cost for attacks ==&lt;br /&gt;
&lt;br /&gt;
The currently suggested &amp;quot;optimized for security&amp;quot; luksFormat recommendations lowers the memory cost for attacks. From the article:&lt;br /&gt;
&lt;br /&gt;
 you could either use the default settings (aes-xts-plain64 cipher with 256-bit key and Argon2 hashing with iter-time 2000ms), or you could use these settings which have &#039;&#039;&#039;added security&#039;&#039;&#039; with the trade-off being a non-noticeable decrease in performance on modern computers: &lt;br /&gt;
 &lt;br /&gt;
 Luks2 Optimized for security:&lt;br /&gt;
 &lt;br /&gt;
 # cryptsetup -v -c aes-xts-plain64 -s 512 --hash sha512 --pbkdf pbkdf2 --iter-time 5000 --use-random luksFormat /dev/sda2&lt;br /&gt;
&lt;br /&gt;
The defaults in luksFormat were changed from pbkdf2 to Argon2id exactly for this reason, to make it more memory costly in order to inhibit usage of gpus/asics. The compute power of GPUs have increased significantly more than those of CPUs as such I think added memory cost to the attacker is valuable goal.&lt;br /&gt;
&lt;br /&gt;
See also [https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuestions#10-luks2-questions 10.4  from the cryptsetup FAQ]&lt;br /&gt;
&lt;br /&gt;
 10.4  Why use Argon2 in LUKS 2 instead of PBKDF2?&lt;br /&gt;
 &lt;br /&gt;
 LUKS tries to be secure with not-so-good passwords.  Bad passwords need to&lt;br /&gt;
 be protected in some way against an attacker that just tries all possible&lt;br /&gt;
 combinations.  (For good passwords, you can just wait for the attacker to&lt;br /&gt;
 die of old age...) The situation with LUKS is not quite the same as with a&lt;br /&gt;
 password stored in a database, but there are similarities.&lt;br /&gt;
 LUKS does not store passwords on disk.  Instead, the passwords are used to&lt;br /&gt;
 decrypt the volume-key with it and that one is stored on disk in encrypted&lt;br /&gt;
 form.  If you have a good password, with, say, more than 80 bits of&lt;br /&gt;
 entropy, you could just put the password through a single crypto-hash (to&lt;br /&gt;
 turn it into something that can be used as a key) and that would be secure.&lt;br /&gt;
 This is what plain dm-crypt does.&lt;br /&gt;
 If the password has lower entropy, you want to make this process cost some&lt;br /&gt;
 effort, so that each try takes time and resources and slows the attacker&lt;br /&gt;
 down.  LUKS1 uses PBKDF2 for that, adding an iteration count and a salt.&lt;br /&gt;
 The iteration count is per default set to that it takes 1 second per try on&lt;br /&gt;
 the CPU of the device where the respective passphrase was set.  The salt is&lt;br /&gt;
 there to prevent precomputation.&lt;br /&gt;
 The problem with that is that if you use a graphics card, you can massively&lt;br /&gt;
 speed up these computations as PBKDF2 needs very little memory to compute&lt;br /&gt;
 it.  A graphics card is (grossly simplified) a mass of small CPUs with some&lt;br /&gt;
 small very fast local memory per CPU and a large slow memory (the 4/6/8 GB&lt;br /&gt;
 a current card may have).  If you can keep a computation in the small,&lt;br /&gt;
 CPU-local memory, you can gain a speed factor of 1000 or more when trying&lt;br /&gt;
 passwords with PBKDF2.&lt;br /&gt;
 Argon2 was created to address this problem.  It adds a &amp;quot;large memory&lt;br /&gt;
 property&amp;quot; where computing the result with less memory than the memory&lt;br /&gt;
 parameter requires is massively (exponentially) slowed down.  That means,&lt;br /&gt;
 if you set, for example, 4GB of memory, computing Argon2 on a graphics card&lt;br /&gt;
 with around 100kB of memory per &amp;quot;CPU&amp;quot; makes no sense at all because it is&lt;br /&gt;
 far too slow.  An attacker has hence to use real CPUs and furthermore is&lt;br /&gt;
 limited by main memory bandwidth.&lt;br /&gt;
 Hence the large amount of memory used is a security feature and should not&lt;br /&gt;
 be turned off or reduced.  If you really (!) understand what you are doing&lt;br /&gt;
 and can assure good passwords, you can either go back to PBKDF2 or set a&lt;br /&gt;
 low amount of memory used for Argon2 when creating the header.&lt;br /&gt;
&lt;br /&gt;
--[[User:Johanneszab|Johanneszab]] ([[User talk:Johanneszab|talk]]) 11:38, 31 May 2024 (UTC)&lt;/div&gt;</summary>
		<author><name>Johanneszab</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26802</id>
		<title>Talk:LVM on LUKS</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Talk:LVM_on_LUKS&amp;diff=26802"/>
		<updated>2024-05-31T11:35:17Z</updated>

		<summary type="html">&lt;p&gt;Johanneszab: /* Optimized for security suggestions lower memory cost */ new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Why was ,mode=1777  removed from /tmp?&lt;br /&gt;
--[[User:Ncopa|Ncopa]] ([[User talk:Ncopa|talk]]) 07:12, 15 May 2014 (UTC)&lt;br /&gt;
----&lt;br /&gt;
Hello! While following the directions for installing grub (via grub-install) I found the package efibootmgr is longer available using apk. Help!&lt;br /&gt;
--[[User:Mnemolyst|Mnemolyst]] ([[User talk:Mnemolyst|talk]]) 22:40, 07 Nov 2019 (UTC)&lt;br /&gt;
----&lt;br /&gt;
The last two umount statements before the reboot require a newer version of umount than what comes in the standard Alpine download. I needed to add the package util-linux to get the correct version and although the page mentions the package in the early section about getting the boot device name it doesn&#039;t explicitly state to download it.&lt;br /&gt;
--[[User:Sadbadman|Sadbadman]] ([[User talk:Sadbadman|talk]]) 06:45, 2 February 2020 (UTC)&lt;br /&gt;
----&lt;br /&gt;
I had difficulty with an encrypted /boot setup sda1=&amp;gt;efi, sda2=&amp;gt;crypt=&amp;gt;lvm(/root,/boot,swap).  The instructions by default will result in using LUKS2 with Argon2.  This is not actually supported by GRUB2 for an encrypted /boot setup (see Arch wiki article &amp;quot;GRUB&amp;quot;, section &amp;quot;Encrypted_/boot&amp;quot; and  GRUB bug 55093 - i can&#039;t post links yet).  Until GRUB 2.06 is released and reaches alpine, users wanting encrypted /boot may need --type luks1 when running cryptsetup luksFormat.  And once GRUB 2.06 does arrive, it may require using PBKDF2.  Users will need to consult GRUB documentation when that time comes.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 09:09, 16 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
I was able to confirm the above about --type luks1 today.  That, plus adding &amp;quot;GRUB_ENABLE_CRYPTODISK=y&amp;quot; to /etc/default/grub, allowed this procedure to work with v3.11.  I will update accordingly.  --[[User:Stapleemptier|Stapleemptier]] ([[User talk:Stapleemptier|talk]]) 00:38, 17 February 2020 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optional: Overwrite LUKS Partition with Random Data ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;s&amp;gt;Is this section still accurate since since Kernel 5.6, or roughly Alpine Linux version 3.13?&lt;br /&gt;
Doesn&#039;t /dev/random now do what is needed here without installing extra packages?&amp;lt;/s&amp;gt;&lt;br /&gt;
[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 18:56, 17 December 2021 (UTC)&lt;br /&gt;
&lt;br /&gt;
:{{done}}&lt;br /&gt;
:Looks like psykose, et al, removed the references to mostly obsolete haveged.&lt;br /&gt;
:[[User:Zcrayfish|zcrayfish]] ([[User talk:Zcrayfish|talk]]) 03:23, 14 August 2023 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Optimized for security suggestions lower memory cost ==&lt;br /&gt;
&lt;br /&gt;
The currently suggested &amp;quot;optimized for security&amp;quot; luksFormat recommendations lowers the memory cost for attacks. From the article:&lt;br /&gt;
&lt;br /&gt;
 you could either use the default settings (aes-xts-plain64 cipher with 256-bit key and Argon2 hashing with iter-time 2000ms), or you could use these settings which have added security with the trade-off being a non-noticeable decrease in performance on modern computers: &lt;br /&gt;
 &lt;br /&gt;
 Luks2 Optimized for security:&lt;br /&gt;
 &lt;br /&gt;
 # cryptsetup -v -c aes-xts-plain64 -s 512 --hash sha512 --pbkdf pbkdf2 --iter-time 5000 --use-random luksFormat /dev/sda2&lt;br /&gt;
&lt;br /&gt;
The defaults in luksFormat were changed from pbkdf2 to Argon2id exactly for this reason, to make it more memory costly in order to inhibit usage for gpus/asics. &lt;br /&gt;
&lt;br /&gt;
See also [https://gitlab.com/cryptsetup/cryptsetup/-/wikis/FrequentlyAskedQuestions#10-luks2-questions 10.4  from the cryptsetup FAQ]&lt;br /&gt;
&lt;br /&gt;
 10.4  Why use Argon2 in LUKS 2 instead of PBKDF2?&lt;br /&gt;
 &lt;br /&gt;
 LUKS tries to be secure with not-so-good passwords.  Bad passwords need to&lt;br /&gt;
 be protected in some way against an attacker that just tries all possible&lt;br /&gt;
 combinations.  (For good passwords, you can just wait for the attacker to&lt;br /&gt;
 die of old age...) The situation with LUKS is not quite the same as with a&lt;br /&gt;
 password stored in a database, but there are similarities.&lt;br /&gt;
 LUKS does not store passwords on disk.  Instead, the passwords are used to&lt;br /&gt;
 decrypt the volume-key with it and that one is stored on disk in encrypted&lt;br /&gt;
 form.  If you have a good password, with, say, more than 80 bits of&lt;br /&gt;
 entropy, you could just put the password through a single crypto-hash (to&lt;br /&gt;
 turn it into something that can be used as a key) and that would be secure.&lt;br /&gt;
 This is what plain dm-crypt does.&lt;br /&gt;
 If the password has lower entropy, you want to make this process cost some&lt;br /&gt;
 effort, so that each try takes time and resources and slows the attacker&lt;br /&gt;
 down.  LUKS1 uses PBKDF2 for that, adding an iteration count and a salt.&lt;br /&gt;
 The iteration count is per default set to that it takes 1 second per try on&lt;br /&gt;
 the CPU of the device where the respective passphrase was set.  The salt is&lt;br /&gt;
 there to prevent precomputation.&lt;br /&gt;
 The problem with that is that if you use a graphics card, you can massively&lt;br /&gt;
 speed up these computations as PBKDF2 needs very little memory to compute&lt;br /&gt;
 it.  A graphics card is (grossly simplified) a mass of small CPUs with some&lt;br /&gt;
 small very fast local memory per CPU and a large slow memory (the 4/6/8 GB&lt;br /&gt;
 a current card may have).  If you can keep a computation in the small,&lt;br /&gt;
 CPU-local memory, you can gain a speed factor of 1000 or more when trying&lt;br /&gt;
 passwords with PBKDF2.&lt;br /&gt;
 Argon2 was created to address this problem.  It adds a &amp;quot;large memory&lt;br /&gt;
 property&amp;quot; where computing the result with less memory than the memory&lt;br /&gt;
 parameter requires is massively (exponentially) slowed down.  That means,&lt;br /&gt;
 if you set, for example, 4GB of memory, computing Argon2 on a graphics card&lt;br /&gt;
 with around 100kB of memory per &amp;quot;CPU&amp;quot; makes no sense at all because it is&lt;br /&gt;
 far too slow.  An attacker has hence to use real CPUs and furthermore is&lt;br /&gt;
 limited by main memory bandwidth.&lt;br /&gt;
 Hence the large amount of memory used is a security feature and should not&lt;br /&gt;
 be turned off or reduced.  If you really (!) understand what you are doing&lt;br /&gt;
 and can assure good passwords, you can either go back to PBKDF2 or set a&lt;br /&gt;
 low amount of memory used for Argon2 when creating the header.&lt;/div&gt;</summary>
		<author><name>Johanneszab</name></author>
	</entry>
</feed>