Preserving privacy by encrypting block devices
Rules of Thumb
The risk of forgetting a passphrase can lead to really bad habits, such as using very simple passphrases or writing them down. With this in mind, I have a couple of rules of thumb.
- If you need to encrypt a file or a just a few files, use something like 7-Zip, which compresses the files and encrypts the archive as well. The simplicity of this method not only empowers the user to make the decision about what to encrypt but also puts the responsibility of encryption and decryption and remembering the passphrase on the user.
- If you need to encrypt directory trees (e.g., if someone is working on a project or data storage is structured), then you have a couple of options. The first, EncFS [9], allows the user to control what they want to encrypt and where it should be mounted. Again, this puts the management of passphrases and encryption in the hands of the user, with all the benefits and disadvantages. The second option, eCryptfs [10], can encrypt a directory structure, but that is under the control of the administrator. Creating an encrypted directory for each user to use to encrypt their data is fairly easy. Although the user has the responsibility of copying the data to this folder to encrypt it, remembering the passphrase again falls to the administrator.
If the situation is such that all, or virtually all, data needs to be encrypted, then using a block device encryption tool such as DMCrypt or TrueCrypt works very well. Alternatively, you could use an SED, but the effects on users and administrators is almost the same for either approach. In the case of software encryption such as DMCrypt or TrueCrypt, it might require an extra command or a different command to mount and unmount the block device. In the case of SEDs, the administrator just has to remember the passphrase when the disk is accessed (usually before the system boots). After that, all the admin commands are the same.
I wish you good luck in your encryption mission; if you choose to accept it, I have one last word of advice: hAS(*ja[p18a8@asj.
Info
- DMCrypt: http://en.wikipedia.org/wiki/Dm-crypt
- Crypto API: http://en.wikipedia.org/wiki/Crypto_API_%28Linux%29
- LUKS and cryptsetup: http://code.google.com/p/cryptsetup/
- Passphrase, Wikipedia (CC BY-SA 3..0): http://en.wikipedia.org/wiki/Passphrase
- TrueCrypt: http://www.truecrypt.org/
- TrueCrypt licensing: http://en.wikipedia.org/wiki/TrueCrypt#Licensing_and_Open_Source_status
- Open Source Initiative: http://opensource.org/
- Keyfiles: http://www.truecrypt.org/docs/keyfiles
- EncFS: http://www.arg0.net/encfs
- eCryptfs: http://ecryptfs.org/
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
The Gnome Foundation Struggling to Stay Afloat
The foundation behind the Gnome desktop environment is having to go through some serious belt-tightening due to continued financial problems.
-
Thousands of Linux Servers Infected with Stealth Malware Since 2021
Perfctl is capable of remaining undetected, which makes it dangerous and hard to mitigate.
-
Halcyon Creates Anti-Ransomware Protection for Linux
As more Linux systems are targeted by ransomware, Halcyon is stepping up its protection.
-
Valve and Arch Linux Announce Collaboration
Valve and Arch have come together for two projects that will have a serious impact on the Linux distribution.
-
Hacker Successfully Runs Linux on a CPU from the Early ‘70s
From the office of "Look what I can do," Dmitry Grinberg was able to get Linux running on a processor that was created in 1971.
-
OSI and LPI Form Strategic Alliance
With a goal of strengthening Linux and open source communities, this new alliance aims to nurture the growth of more highly skilled professionals.
-
Fedora 41 Beta Available with Some Interesting Additions
If you're a Fedora fan, you'll be excited to hear the beta version of the latest release is now available for testing and includes plenty of updates.
-
AlmaLinux Unveils New Hardware Certification Process
The AlmaLinux Hardware Certification Program run by the Certification Special Interest Group (SIG) aims to ensure seamless compatibility between AlmaLinux and a wide range of hardware configurations.
-
Wind River Introduces eLxr Pro Linux Solution
eLxr Pro offers an end-to-end Linux solution backed by expert commercial support.
-
Juno Tab 3 Launches with Ubuntu 24.04
Anyone looking for a full-blown Linux tablet need look no further. Juno has released the Tab 3.