Linuxでloop-aes暗号化デバイスを使用するには?

Linuxでloop-aes暗号化デバイスを使用するには?

Fedora / Ubuntuを使用するにはどうすればよいですか?

ベストアンサー1

カーネル、losstup、およびマウントをパッチする必要があります。このパッケージは通常util-linuxと呼ばれ、以下からパッチを取得できます。ここ。ループaesデバイスから起動しないようにするには、次のように非常に簡単です。

# Write 65 lines of random data to keyfile.txt This will be used as a key for
# the data on the disk and your password will be as a key for this file.
# You will need this file and the password to access your data.
# Keep them safe.
gpg -c --cipher-algo aes256 --digest-algo sha512 < keyfile.txt > keyfile.gpg
rm keyfile.txt # Better if you never write this to disk in the first place.
losetup -e aes256 -H sha512 -K keyfile.gpg /dev/loopX /dev/sdXX
mke2fs -t ext4 /dev/loopX
mount /dev/loopX /mnt

# To mount it later
mount -o loop=/dev/loopX,encryption=aes256,hash=sha512,gpgkey=keyfile.gpg /dev/sdXX /mnt

ルートパーティションを暗号化するには、その内容をよく読んでください。文書。デフォルトでは、initramfsを作成して暗号化されていないブートパーティションに保存する必要があります。

リムーバブルUSBデバイスにkeyfile.gpg(およびルートを暗号化することにした場合は起動パーティション)を保存できます。

おすすめ記事