私は動作し、最新のハードドライブ暗号化方法を探しています。ちょっとした調査の終わりに、私は偶然発見しました。ルクスそして一度試してみることにしました。それで、これを使ってハードドライブを正しく暗号化する方法のいくつかの例を見つけました。
cryptsetup --verbose --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat /dev/sda3
これ--パスワードそして--ハッシュ値その一部が私にとって最も興味深かったので、LUKSで特別に使用されているさまざまなパスワードとハッシュについて自分で教育しようとしました。現在使用されているLinuxで利用可能な暗号化形式をマシンフレンドリーな形式で表示するファイルを開く以外に、役に立つ情報が見つかりません。しかし、私が知っているのは、このファイルでさえ、すべての暗号化方法の完全な範囲を欠いている可能性があり、毎日このファイルを扱っていない人にとっては読みにくいかもしれません。
私の質問:そこにいますか?いっぱいLUKS暗号化されたパスワード/ハッシュリスト?
ちょうど私が選ぶことができるオプションが何であるかを見てください。
ベストアンサー1
これは基本的にカーネルによって異なりますので、/proc/cryptoをご覧ください。「と答える必要があります。」cryptsetupのマニュアルページには次のように記載されています。
NOTES ON SUPPORTED CIPHERS, MODES, HASHES AND KEY SIZES
The available combinations of ciphers, modes, hashes and key sizes depend
on kernel support. See /proc/crypto for a list of available options. You
might need to load additional kernel crypto modules in order to get more
options.
For the --hash option, if the crypto backend is libgcrypt, then all algo‐
rithms supported by the gcrypt library are available. For other crypto
backends some algorithms may be missing.
しかし、私は/proc/crypto
snakeまたはxts(aes)について何も言及していないので、そのレポートをチェックすることをお勧めしますcryptsetup benchmark
((ram)速度も表示されます)。たとえば、
$ cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1 292752 iterations per second
PBKDF2-sha256 221362 iterations per second
PBKDF2-sha512 142010 iterations per second
PBKDF2-ripemd160 277124 iterations per second
PBKDF2-whirlpool 155727 iterations per second
# Algorithm | Key | Encryption | Decryption
aes-cbc 128b 164.7 MiB/s 164.5 MiB/s
serpent-cbc 128b 119.5 MiB/s 205.0 MiB/s
twofish-cbc 128b 163.5 MiB/s 208.6 MiB/s
aes-cbc 256b 148.4 MiB/s 147.9 MiB/s
serpent-cbc 256b 128.1 MiB/s 205.3 MiB/s
twofish-cbc 256b 202.3 MiB/s 213.1 MiB/s
aes-xts 256b 165.4 MiB/s 145.3 MiB/s
serpent-xts 256b 150.0 MiB/s 194.5 MiB/s
twofish-xts 256b 206.4 MiB/s 206.9 MiB/s
aes-xts 512b 149.4 MiB/s 147.5 MiB/s
serpent-xts 512b 181.7 MiB/s 195.0 MiB/s
twofish-xts 512b 207.1 MiB/s 208.6 MiB/s
ハッシュは最初の数行(sha1、sha256、sha512、ripemd160、whirlpool)です。パスワードはアルゴリズムのタイトルの下にあります。
デフォルト値を見ると、何が「非常に良い」と見なされるかについての良いアイデアを得ることができます。
$ cryptsetup --help|tail -n 8
Default compiled-in key and passphrase parameters:
Maximum keyfile size: 8192kB, Maximum interactive passphrase length 512 (characters)
Default PBKDF2 iteration time for LUKS: 1000 (ms)
Default compiled-in device cipher parameters:
loop-AES: aes, Key 256 bits
plain: aes-cbc-essiv:sha256, Key: 256 bits, Password hashing: ripemd160
LUKS1: aes-xts-plain64, Key: 256 bits, LUKS header hashing: sha1, RNG: /dev/urandom
より大きいキーサイズを使用すると(使用--key-size
)、わずかに遅くなる場合にのみ強くなります。
--key-size, -s <bits>
Sets key size in bits. The argument has to be a multiple of 8.
The possible key-sizes are limited by the cipher and mode used.
See /proc/crypto for more information. Note that key-size in
/proc/crypto is stated in bytes.