Encrypted Storage
Your files are vulnerable.
If your laptop is stolen, lost, or seized, anyone with physical access can read everything: your documents, photos, financial records, passwords database, browser history. Disk encryption is the solution.
You enabled disk encryption when installing Linux Mint (Week 2). But encryption isn’t just for your system drive—it’s for USB drives, backup drives, cloud storage, and sensitive file containers.
This week, you’ll learn to create encrypted containers with VeraCrypt, understand LUKS (your existing Linux encryption), and establish secure backup practices.
Understanding Disk Encryption
Why Encrypt?
Without encryption:
- Stolen laptop = all files exposed
- Lost USB drive = sensitive data in stranger’s hands
- Repair shop = technician can browse your files
- Border crossing = customs can image your drive
- Warrant = law enforcement gets everything
With encryption:
- Stolen laptop = worthless encrypted blob
- Lost USB drive = random garbage without password
- Repair shop = can’t access your data
- Border crossing = protected (but see legal notes)
- Warrant = depends on jurisdiction and your cooperation
Full Disk Encryption (FDE)
Your Linux Mint installation uses LUKS (Linux Unified Key Setup) for full disk encryption:
- Everything encrypted: OS, applications, files, swap
- Decrypted at boot with your passphrase
- Transparent once unlocked (no extra steps)
Limitation: Once unlocked, all data is accessible. If laptop is powered on, encryption doesn’t help.
Container-Based Encryption
VeraCrypt and similar tools create encrypted containers:
- Single encrypted file that acts like a virtual drive
- Mount when needed, unmount when done
- Can keep sensitive data encrypted even when system is on
- Portable (container file can live on USB, cloud, etc.)
Use case: Keep financial documents encrypted even while logged in.
File-Level Encryption
Individual files encrypted with specific keys:
- GPG encrypts specific files
- Age (modern alternative) encrypts files
- Password-protected archives (7z, etc.)
Use case: Encrypt specific files for sharing or cloud storage.
Part 1: Understanding Your LUKS Encryption
Check Your Encryption Status
Your Linux Mint system is already encrypted (from Week 2). Verify:
# List block devices and their encryption
lsblk
# Look for "crypt" type entries
You should see something like:
sda disk
├─sda1 part /boot/efi
├─sda2 part /boot
└─sda3 part
└─sda3_crypt crypt
└─mint--vg-root lvm /
The sda3_crypt indicates your encrypted partition.
How LUKS Works
At boot:
- GRUB loads from unencrypted
/boot - You enter passphrase
- Kernel decrypts root partition using LUKS
- System boots with decrypted access
Key concepts:
- Passphrase: What you type to decrypt
- Master key: Actual encryption key (derived from passphrase)
- Key slots: LUKS supports 8 passphrases for same volume
Add Backup Passphrase to LUKS
Add a backup passphrase in case you forget your primary:
# Add new key slot (you'll need current passphrase)
sudo cryptsetup luksAddKey /dev/sda3
Enter current passphrase, then new backup passphrase.
Important: Store backup passphrase securely (password manager, safe, trusted person).
LUKS Header Backup
The LUKS header contains key material. If corrupted, your data is lost forever.
# Backup LUKS header
sudo cryptsetup luksHeaderBackup /dev/sda3 --header-backup-file luks-header-backup.img
Store this file:
- NOT on the encrypted drive (defeats the purpose)
- On separate USB drive, in safe location
- This backup allows recovery if header corrupts
Security note: Anyone with header backup + passphrase can decrypt your drive. Protect it accordingly.
Part 2: VeraCrypt Encrypted Containers
VeraCrypt creates encrypted containers—perfect for sensitive files you want encrypted even when logged in.
Install VeraCrypt
# Add VeraCrypt repository
sudo add-apt-repository ppa:unit193/encryption
sudo apt update
sudo apt install veracrypt
Or download from: https://www.veracrypt.fr/en/Downloads.html
Create Encrypted Container
- Open VeraCrypt (Menu → Accessories → VeraCrypt)
- Click Create Volume
- Select Create an encrypted file container
- Click Next
Select Standard VeraCrypt volume
- (Hidden volumes covered later)
Click Next
Click Select File
Navigate to where you want the container
Enter filename (e.g.,
secure-files.vc)Click Save, then Next
Choose encryption algorithm:
- AES is fine for most users (fast, secure)
- AES-Twofish-Serpent for paranoid (slower, multiple algorithms)
Choose hash algorithm:
- SHA-512 recommended
Click Next
Enter container size:
- Start small (1 GB) to test
- Can create larger ones later
Click Next
Enter a strong password:
- Use your password manager to generate
- Different from your login password
- Must be memorable or stored securely
Click Next
- Move mouse randomly to generate entropy
- Choose filesystem:
- Ext4 for Linux-only use
- FAT32 for cross-platform (max 4GB files)
- exFAT for cross-platform with large files
- Click Format
- Click Exit when complete
Mount Encrypted Container
- In VeraCrypt, select a slot (e.g., Slot 1)
- Click Select File
- Navigate to your
.vccontainer - Click Mount
- Enter password
- Container mounts as
/media/veracrypt1
You can now access it like any folder. Files saved here are encrypted.
Unmount When Done
Critical: Unmount when you’re done to re-encrypt:
- Select mounted slot in VeraCrypt
- Click Dismount
Or right-click the mounted drive and unmount.
Files are only protected when unmounted.
Auto-Mount at Login (Optional)
For containers you use frequently:
- In VeraCrypt, mount the container
- Go to Favorites → Add Mounted Volume to Favorites
- Enable Mount selected volume upon logon
- You’ll enter password at each login
Part 3: Hidden Volumes (Plausible Deniability)
VeraCrypt supports hidden volumes—a second encrypted volume hidden inside the first.
Why Hidden Volumes?
Scenario: You’re forced to reveal your encryption password (coercion, border crossing, etc.).
Standard volume: You give password, attacker sees everything.
Hidden volume: You give outer password, attacker sees decoy files. The inner hidden volume remains undetectable.
How It Works
[ Outer Volume (decoy files) ][ Hidden Volume (real files) ][ Free Space ]
└── Hidden within apparent free space ──┘
- Outer volume has normal files (nothing too innocent, that’s suspicious)
- Hidden volume is encrypted within the “free space” of outer volume
- Without hidden password, hidden volume is indistinguishable from random data
Creating Hidden Volume
- In VeraCrypt, click Create Volume
- Select Create an encrypted file container
- Select Hidden VeraCrypt volume
- Select Normal mode (creates outer + hidden)
- Follow prompts to create outer volume first
- Add some decoy files to outer volume
- Then create hidden volume within it
- Different password for hidden volume
Important: When mounting outer volume, VeraCrypt protects hidden volume from being overwritten. If mounting to modify outer volume, enable “Protect hidden volume” option.
Plausible Deniability Limitations
Works against:
- Casual adversaries
- Some legal situations
- People who don’t know VeraCrypt well
Doesn’t work against:
- Sophisticated forensics (file timestamps, access patterns)
- Repeated demands (“give us the OTHER password”)
- Jurisdictions that criminalize refusing to decrypt
- People who know you use hidden volumes
Use with realistic expectations.
Part 4: Encrypted USB Drives
USB drives are easily lost. Always encrypt them.
Option 1: LUKS-Encrypted USB (Linux Only)
Format USB with LUKS:
- Insert USB drive
- Open Disks application (Menu → Accessories → Disks)
- Select your USB drive (careful—don’t select your system drive!)
- Click the gear icon → Format Partition
- Choose LUKS + Ext4
- Enter encryption passphrase
- Click Format
Using LUKS USB:
- Insert drive
- System prompts for passphrase
- Drive mounts after unlocking
- Unmount when done (automatically locks)
Limitation: Only works on Linux systems.
Option 2: VeraCrypt USB (Cross-Platform)
Create VeraCrypt container on USB:
- Format USB as exFAT (for cross-platform compatibility)
- Create VeraCrypt container on the USB
- Container file works on Linux, Windows, macOS (with VeraCrypt installed)
For whole-drive encryption:
- In VeraCrypt, select Create Volume
- Select Encrypt a non-system partition/drive
- Select your USB drive
- Choose encryption options
- Format (destroys all data on USB)
Note: Whole-drive VeraCrypt USB requires VeraCrypt to be installed on any computer that accesses it.
Portable VeraCrypt
For USB drives you’ll use on computers without VeraCrypt:
- Download VeraCrypt portable from official site
- Copy to unencrypted portion of USB
- Run portable VeraCrypt to mount container
- No installation required on target computer
Part 5: Secure Backups
Backups are critical. Encrypted backups are essential.
The 3-2-1 Rule
- 3 copies of important data
- 2 different storage types (e.g., SSD + external HDD)
- 1 offsite (in case of fire, theft, disaster)
Local Encrypted Backup
Use Déjà Dup (built into Linux Mint):
- Open Backup (Menu → Administration → Backup)
- Folders to save: Select important folders
- Storage location: Choose external drive
- Encryption: Enable and set password
Déjà Dup creates incremental encrypted backups.
Schedule: Weekly automatic backups recommended.
Encrypted External Drive Backup
For full system backup:
# Create encrypted backup of home directory
tar -cvf - /home/yourusername | gpg -c > /media/backup-drive/home-backup.tar.gpg
To restore:
gpg -d home-backup.tar.gpg | tar -xvf -
Offsite Backup Options
Option 1: Encrypted cloud backup
- Create VeraCrypt container locally
- Put sensitive files in container
- Sync container file to cloud (Dropbox, etc.)
- Cloud provider sees encrypted blob
Option 2: Encrypted backup service
- Backblaze — Cheap, you manage encryption key
- Tarsnap — Expensive but paranoid-friendly, client encrypts
- Borg Backup + rsync.net — Deduplicating encrypted backup
Option 3: Physical offsite
- Create encrypted backup on USB drive
- Store at trusted location (family, safe deposit box)
- Rotate monthly
Backup Verification
Test your backups regularly:
- Pick a random file from backup
- Restore it to temporary location
- Verify it’s intact
- Delete test restore
Untested backups are not backups.
Part 6: Cloud Storage Encryption
Cloud storage is convenient but not private. Encrypt before uploading.
Option 1: VeraCrypt Container
- Create VeraCrypt container
- Put files in container
- Unmount container
- Sync container file to cloud
- Cloud sees only encrypted file
Limitation: Large containers = large syncs for small changes.
Option 2: Cryptomator (Recommended)
Cryptomator encrypts files individually before cloud sync:
- Each file encrypted separately
- Changes only sync changed files
- Open source, cross-platform
- Works with any cloud provider
Install:
sudo add-apt-repository ppa:sebastian-stenzel/cryptomator
sudo apt update
sudo apt install cryptomator
Setup:
- Open Cryptomator
- Click Add Vault → Create New Vault
- Choose location in your cloud sync folder
- Set vault password
- Vault appears as virtual drive
Use:
- Unlock vault with password
- Save files to vault drive
- Files encrypted individually in cloud folder
- Lock vault when done
Option 3: rclone crypt
For command-line users, rclone with crypt backend:
# Configure rclone with encryption
rclone config
# Create remote with crypt wrapper
# Sync encrypted
rclone sync /local/folder encrypted-remote:
Rclone encrypts file names and contents before uploading.
Part 7: File-Level Encryption with Age
Age is a modern, simple file encryption tool (easier than GPG for file encryption).
Install Age
sudo apt install age
Generate Key Pair
# Generate key pair
age-keygen -o ~/.age/key.txt
Output shows your public key (starts with age1...).
Protect your key file:
chmod 600 ~/.age/key.txt
Encrypt a File
# Encrypt to your key
age -r age1yourpublickeyhere -o document.txt.age document.txt
# Or encrypt to key file
age -R ~/.age/key.txt -o document.txt.age document.txt
Decrypt a File
age -d -i ~/.age/key.txt -o document.txt document.txt.age
Password-Based Encryption
For sharing without key exchange:
# Encrypt with password
age -p -o document.txt.age document.txt
# Enter password when prompted
# Decrypt
age -d -o document.txt document.txt.age
# Enter password when prompted
Share the password securely (Signal, in person, etc.).
Privacy Checkpoint
Your data is now encrypted at multiple levels:
What changed:
- System drive encrypted (LUKS from Week 2)
- Sensitive files in VeraCrypt containers
- USB drives encrypted
- Backups encrypted
- Cloud storage encrypted
What you gained:
- Physical theft doesn’t expose data
- Lost devices don’t compromise privacy
- Cloud providers can’t read your files
- Backups are safe even if stolen
What you traded:
- Passwords to remember/manage
- Slight performance overhead
- Risk of data loss if passwords forgotten
Troubleshooting
Forgot VeraCrypt password
No recovery possible. VeraCrypt has no backdoor by design.
Prevention:
- Store password in password manager
- Keep backup of password in safe location
- Use passwords you can remember
LUKS won’t decrypt at boot
Try:
- Double-check passphrase (caps lock?)
- Try backup passphrase
- Boot from live USB and mount manually:
sudo cryptsetup luksOpen /dev/sda3 crypt-recovery
VeraCrypt container won’t mount
Check:
- File not corrupted (hash matches original?)
- Password correct
- Container not already mounted
- Sufficient permissions
Lost LUKS header
If you have header backup:
sudo cryptsetup luksHeaderRestore /dev/sda3 --header-backup-file luks-header-backup.img
No backup = data lost forever.
Backup restore fails
- Check encryption password is correct
- Verify backup file integrity
- Try different backup copy
- This is why 3-2-1 rule matters
Going Further (Optional)
Deniable Encryption with VeraCrypt
Advanced hidden OS setup:
- Hidden operating system inside hidden volume
- Boot from decoy or hidden OS based on password
- Extreme plausible deniability
- Very complex setup
Documentation: https://www.veracrypt.fr/en/Hidden%20Operating%20System.html
Full Disk Encryption with VeraCrypt
VeraCrypt can encrypt entire Windows systems:
- Pre-boot authentication
- Rescue disk required
- Alternative to BitLocker with more transparency
Linux users should stick with LUKS.
Hardware Encrypted Drives
Self-encrypting drives (SEDs):
- Encryption handled by drive hardware
- Very fast (no CPU overhead)
- Trust the manufacturer’s implementation
Examples: Samsung T7 Touch, iStorage datAshur
Tomb (Linux Encrypted Folders)
Tomb creates encrypted folders with neat features:
- Keys stored separately from data
- Can bind to specific hardware
- Scriptable for automation
sudo apt install tomb
tomb dig -s 100 secret.tomb
tomb forge secret.tomb.key
tomb lock secret.tomb -k secret.tomb.key
tomb open secret.tomb -k secret.tomb.key
What’s Next
Your data is now encrypted at rest and in transit. The final week brings everything together—operational security practices, ongoing maintenance, and the privacy mindset that makes all these tools effective.
Week 10 covers operational security and tying it all together.
Summary
This week you:
- Understood your existing LUKS full disk encryption
- Created VeraCrypt encrypted containers for sensitive files
- Learned about hidden volumes for plausible deniability
- Encrypted USB drives for portable secure storage
- Established encrypted backup practices
- Learned to encrypt cloud storage with Cryptomator
- Used Age for simple file-level encryption
Your data is now encrypted at rest. Combined with encrypted communications (Weeks 6), VPN (Week 7), and Tor (Week 8), you have comprehensive protection. Next we’ll add two-factor authentication for account security.
💻 Ready for the command line? Cypherpunk 101 covers the same ground with
cryptsetup/LUKS, gocryptfs, and encrypted backups over SSH: Cypherpunk 101 Week 4: Encrypted Filesystems & Containers →