Как зашифровать диск
Материал из Gentoo Linux Wiki
- Вернуться в раздел безопасность
Итак, как же шифруют диски?
Содержание |
[править] Параметры ядра
Для начала надо включить в ядре поддержку криптования и cryptoloop.
| Linux Kernel Configuration: cryptoloop |
Device Drivers --->
Block devices --->
<M> Loopback device support
<M> Cryptoloop Support
Cryptographic options --->
[*] HMAC support
<M> Null algorithms
<M> MD4 digest algorithm
<M> MD5 digest algorithm
<M> SHA1 digest algorithm
<M> SHA256 digest algorithm
<M> SHA384 and SHA512 digest algorithms
<M> Whirlpool digest algorithms
<M> DES and Triple DES EDE cipher algorithms
<M> Blowfish cipher algorithm
<M> Twofish cipher algorithm
<M> Serpent cipher algorithm
<M> AES cipher algorithms (i586)
<M> CAST5 (CAST-128) cipher algorithm
<M> CAST6 (CAST-256) cipher algorithm
<M> TEA and XTEA cipher algorithms
<M> ARC4 cipher algorithm
<M> Khazad cipher algorithm
<M> Anubis cipher algorithm
<*> Deflate compression algorithm
<M> Michael MIC keyed digest algorithm
<M> CRC32c CRC algorithm
|
Итак, собрали ядро, собрали модули, перегрузились.
Теперь под рутом подключаем модули:
modprobe cryptoloop
modprobe blowfish
[править] Создание зашифрованного диска
Создаем пустой файл (пусть будет на 10МБайт): dd if=/dev/zero of=my_crypted_disk bs=1M count=10
И подключаем, как шифрованный:
| Code: Шифрование диска |
|
losetup -e blowfish-128 /dev/loop0 my_crypted_disk Password:<введите пароль для шифрования> |
[править] Работа с диском
Подготавливаем диск к работе: mke2fs /dev/loop0 И монтируем: mkdir /mnt/efs mount /dev/loop0 /mnt/efs Поработали, уберем все нафиг: umount /mnt/efs losetup -d /dev/loop0
[править] Запись в /etc/fstab
/путь_к_файлу/my_crypted_disk /mnt/efs ext2 noauto,users,loop,encryption=blowfish-128 0 0
|
Посоветовать или спросить, |
