Disk Encryption
Manjikaze implements full disk encryption to protect your data at rest. This document explains the disk encryption implementation, its security implications, and how to use it effectively.
Overview
Manjikaze uses LUKS (Linux Unified Key Setup) for disk encryption, enhanced with Yubikey authentication for added security. This means your data is protected by both:
- A strong password you know (something you know)
- Your Yubikey hardware token (something you have)
This two-factor approach significantly improves security compared to password-only encryption.
How It Works
LUKS Encryption
LUKS (Linux Unified Key Setup) is the standard disk encryption method for Linux systems. It:
- Encrypts your entire disk, including the operating system
- Protects data from unauthorized access if your device is lost or stolen
- Uses strong AES-XTS encryption with 512-bit keys
Yubikey Integration
Manjikaze extends standard LUKS by integrating Yubikey hardware tokens using the yubikey-full-disk-encryption package. This integration:
- Uses the Yubikey's HMAC-SHA1 Challenge-Response mode
- Generates a unique, strong passphrase based on a challenge sent to the Yubikey
- Requires the physical Yubikey to be present during the boot process
Security Implications
Advantages
- True Two-Factor Authentication: Requires both your password and your physical Yubikey
- Protection Against Offline Attacks: Even if someone has physical access to your computer, they cannot decrypt your data without both factors
- Strong Key Derivation: The Yubikey generates cryptographically strong keys that are resistant to brute force attacks
- Limited Attack Surface: The encryption key never leaves your Yubikey, reducing the risk of key extraction
Limitations
- Requires Yubikey Presence for Boot: You must have your Yubikey available to boot your system
- Does Not Protect Against Evil Maid Attacks: Physical tampering with the bootloader is still possible (though advanced measures like Secure Boot help mitigate this)
- No Protection for Running System: Once the system is decrypted and running, the data is accessible to anyone with access to the system
Setting Up Disk Encryption
Disk encryption should be set up during the initial Manjaro installation process, before installing Manjikaze. The Manjikaze installer provides options to configure Yubikey integration with an existing LUKS setup.
To add Yubikey authentication to your existing disk encryption:
First, configure your Yubikey for challenge-response mode:
bashmanjikazeNavigate to: Security → Generate Yubikey Secret for Disk Encryption
Then, configure disk encryption to use your Yubikey. Navigate to: Security → Configure Yubikey as MFA for Disk Encryption
Recovery Options
It's critical to understand that if you lose both your password and your Yubikey, your data will be permanently inaccessible. There is no backdoor or recovery method.
For this reason we recommend:
- Storing your password securely in your Bitwarden account
- Backing up essential data to secure external storage
- Consider storing a backup Yubikey in a secure location
Technical Details
Challenge-Response Mode
The Yubikey integration uses HMAC-SHA1 Challenge-Response mode, where:
- A challenge (stored in /etc/ykfde.conf) is sent to the Yubikey during boot
- The Yubikey computes an HMAC-SHA1 response using its internal secret key
- This response becomes part of the encryption key material for unlocking the LUKS volume
Boot Process
During boot, the following happens:
- The initramfs loads the LUKS and Yubikey modules
- The system prompts you to insert your Yubikey
- A challenge is sent to the Yubikey
- The Yubikey generates a response which is used to unlock the LUKS volume
- The boot process continues with the decrypted system
Security Recommendations
For maximum security with disk encryption:
- Use a strong, unique password in addition to your Yubikey
- Keep your Yubikey with you at all times, but separate from your computer when not in use
- Enable the touch requirement on your Yubikey to prevent remote exploitation
- Consider enabling auto-lock on Yubikey removal for additional protection
Common Issues and Troubleshooting
Cannot Boot Without Yubikey
This is by design.
Replacing a Yubikey
If you need to replace your Yubikey:
manjikazeNavigate to: Security → Replace Faulty Yubikey