Список доступных методов шифрования для LUKS

По умолчанию aptitude ищет и удаляет зависимости, что в большинстве случаев именно то, что вы хотите сделать. Полный пакет gnome-games, очевидно, содержит различные игры, которые включают эти разнообразные зависимости.

НО, команда dpkg -r НЕ ищет зависимости; она просто удаляет именно то, что вы ей скажете. Во многих случаях это было бы плохо (так как это может сделать вашу систему нестабильной), но в данном случае нестабильность маловероятна, и это может быть лучшим решением.

9
29.03.2017, 22:17
1 ответ

В основном это зависит от вашего ядра, поэтому "See /proc/crypto" должен быть "ответом". Man-страница 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 не упоминает ни serpent, ни xts(aes), поэтому вместо этого я бы рекомендовал посмотреть, что бенчмарк cryptsetup (и он также будет показывать скорость (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, водоворот). Шифры находятся под заголовком алгоритма.

Взгляд на значения по умолчанию также дает хорошее представление о том, что считается «довольно хорошим»:

$ 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.
10
27.01.2020, 20:07

Теги

Похожие вопросы