Storage Encryption

This area is currently being created, please come back later.

hdparm --user-master u --security-set-pass PasSWorD /dev/sdX
hdparm --user-master u --security-erase PasSWorD /dev/sdX

Test with:

dd if=/dev/zero of=/dev/sdX bs=1M conv=fsync status=progress

Or:

mkdir -p /mnt/tmp
mkfs.ext4 /dev/sdX
mount /dev/sdX /mnt/tmp
dd if=/dev/zero of=test.img bs=1M conv=fsync status=progress

Quickly fill a disk with encrypted data after creating a LUKS volume:

cryptsetup luksFormat /dev/sdX # no need to use a password, just hit enter twice.
cryptsetup luksOpen /dev/sdX temp
dd if=/dev/zero of=/dev/mapper/temp bs=1M conv=fsync status=progress
cryptsetup luksClose temp
dd if=/dev/urandom of=/dev/sdX bs=512 count=`cryptsetup luksDump /dev/sdX | grep '^Payload offset:' | awk '{ print $3}'`

-- DO NOT USE -- PERSONAL TESTING ONLY --

cryptsetup -v --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 10000 --use-random --verify-passphrase luksFormat /dev/sdX
cryptsetup luksAddKey /dev/sdX /crypto_keyfile.bin