Cryptsetup Single File#
Create New Volume#
# create
sudo cryptsetup --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random --verify-passphrase luksFormat $device_name
# check
sudo cryptsetup luksDump $device_name
# open
sudo cryptsetup luksOpen $device_name $mapping_name
# make file system
sudo mkfs.vfat -F32 -n black_enc /dev/mapper/$mapping_name
# close
sudo cryptsetup luksClose $mapping_name
Mounting#
# open
sudo cryptsetup luksOpen $device_name $mapping_name
# mount
sudo mount -o uid=`id -u` /dev/mapper/$mapping_name $mount_point
Unmounting#
# unmount
sudo umount $mount_point
# close
sudo cryptsetup luksClose $mapping_name