Description
We’ll be using an external Western Digital 250GB Passport drive in the example below. Keep in mind, whatever drive you choose is irrelevant, what is most important is that any existing data will be destroyed by this process. Please make a backup first if there is any data currently on it.
Purpose & Scope
The purpose of encryption is to secure your data from people who are not authorised to view, copy or tamper with it. The process described below will create a “wrapper” or “blanket” around the data on your drive. For our purposes we’re going to just encrypt the entire drive, however, it is possible to selectively encrypt partitions of any size. Once the drive is encrypted and disconnected from a computer, your data is safe. While the drive can be reformatted or physically destroyed, the data will not be accessible without your password.
sudo fdisk -l
sudo cryptsetup luksFormat /dev/sdb1
sudo cryptsetup luksOpen /dev/sdb1 WD250
sudo mkfs.ntfs -L WD250 /dev/mapper/WD250
sudo cryptsetup luksClose WD250
Output:
1 2 | Device Boot Start End Sectors Size Id Type /dev/sdb1 2 488397167 488397166 232.9G b W95 FAT32 |
Output:
1 2 3 4 5 6 7 8 9 | [sudo] password for warren: WARNING! ======== This will overwrite data on /dev/sdb1 irrevocably. Are you sure? (Type uppercase yes): YES Enter passphrase: Verify passphrase: |
Output:
1 | Enter passphrase for /dev/sdb1: |
Output:
1 2 3 4 | Cluster size has been automatically set to 4096 bytes. Initializing device with zeroes: 100% - Done. Creating NTFS volume structures. mkntfs completed successfully. Have a nice day. |
Output:
1 2 | [sudo] password for warren: [warren@example.com Desktop]$ |
Testing
Linux:
You can now disconnect the device from your computer, wait a few seconds and reconnect it. You should be prompted to enter the password to unlock and mount the device.
Windows:
Free LibreCrypt Explorer from: https://github.com/t-d-k/LibreCrypt. Make sure to read their introduction and installation instructions.
Free Veracrypt from http://veracrypt.codeplex.com/
MAC OSX:
Free Veracrypt from http://veracrypt.codeplex.com/