LUKS: Difference between revisions
remove draft tempalte |
move Disk Setup to intermediate |
||
| Line 21: | Line 21: | ||
== [[Iteration]] Time == | == [[Iteration]] Time == | ||
Since some computers are faster than others, your computer will test to see how many times it can hash your password in this amount of time. The default is 2 seconds, and that's usually good enough. If your computer is very slow, and you're OK with waiting a bit longer for a more secure hash, you may wanna set it for a bit longer! | Since some computers are faster than others, your computer will test to see how many times it can hash your password in this amount of time. The default is 2 seconds, and that's usually good enough. If your computer is very slow, and you're OK with waiting a bit longer for a more secure hash, you may wanna set it for a bit longer! | ||
== Disk Setup == | |||
Assuming you know what partition you want to use, setting up the disk is as simple as: | |||
<code>cryptsetup luksFormat --type luks2 --cipher aes-xts-plain64 --hash sha256 --iter-time 2000 --key-size 256 --pbkdf argon2id --use-random --verify-passphrase /dev/YOURPARTITIONHERE</code> | |||
As mentioned previously, these settings are the default on the latest cryptsetup (with the exception of <code>--use-random</code>). Setting them manually ensures that they are correct on older versions. You can check what the defaults are for your system by running <code>cryptsetup --help</code>. You can then verify that it was setup correctly with: | |||
<code>cryptsetup luksDump /dev/YOURPARTITIONHERE</code> | |||
Once it has been setup, it can be opened with: | |||
<code>cryptsetup open /dev/YOURPARTITIONHERE dm_name</code> | |||
Note that "dm_name" can be set to whatever you like, and the disk will be available at: | |||
<code>/dev/mapper/dm_name</code> | |||
Then you will need to format it, via something like: | |||
<code>mkfs.ext4 /dev/mapper/dm_name</code> | |||