LUKS/Advanced: Difference between revisions
reworked this page |
clarify the entropy and remove the "online debate" aspect |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 49: | Line 49: | ||
<code>argon2i 4 iterations, 735656 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)</code> | <code>argon2i 4 iterations, 735656 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)</code> | ||
<code>argon2id 4 iterations, 842046 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)</code> | <code>argon2id 4 iterations, 842046 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)</code> | ||
<code> Algorithm | Key | Encryption | Decryption</code> | <code> Algorithm | Key | Encryption | Decryption</code> | ||
<code> aes-cbc 128b 594.1 MiB/s 1434.3 MiB/s</code> | <code> aes-cbc 128b 594.1 MiB/s 1434.3 MiB/s</code> | ||
<code> serpent-cbc 128b 59.8 MiB/s 371.1 MiB/s</code> | <code> serpent-cbc 128b 59.8 MiB/s 371.1 MiB/s</code> | ||
| Line 65: | Line 65: | ||
== [[Entropy]] == | == [[Entropy]] == | ||
Though unlikely, to | Though unlikely, to mitigate an [[Entropy Starvation|entropy starved]] situation, you can use <code>--use-random</code> when setting up the disk. This tells cryptsetup to draw randomness from <code>/dev/random</code> instead of <code>/dev/urandom</code>. Simply put, the only difference between <code>/dev/random</code> and <code>/dev/urandom</code> is that <code>/dev/random</code> will wait until the kernel detects enough entropy has been gathered. If you are seriously worried about entropy starvation though, this may not be enough. | ||
An easy way to ensure you have enough entropy, is to gather it from an external source. For example, you can run: <code>curl -Ss <nowiki>https://www.random.org/cgi-bin/randbyte?nbytes=16384&format=f</nowiki> > /dev/random</code>. This command gathers random bytes from [https://random.org random.org]. Using an external source like this is ok, since Linux has ways to gather entropy besides this that an attacker would not be able to replicate. | An easy way to ensure you have enough entropy, is to gather it from an external source. For example, you can run: <code>curl -Ss <nowiki>https://www.random.org/cgi-bin/randbyte?nbytes=16384&format=f</nowiki> > /dev/random</code>. This command gathers random bytes from [https://random.org random.org]. Using an external source like this is ok, since Linux has ways to gather entropy besides this that an attacker would not be able to replicate. | ||