Tales from the crypt commands

Basic File Encryption

© Lead Image © mppriv, 123RF.com

© Lead Image © mppriv, 123RF.com

Article from Issue 203/2017

If you just need to encrypt a file or two, a descendant of crypt can do the job. Which one you choose depends on your objective.

These days, when users think of encryption, they usually turn to PGP, OpenSSL, or LUKS. Sometimes, though, you may not want encrypted transmissions or filesystems. When all you want is to encrypt a file or two, all you need is one of the crypt commands – bcrypt [1], ccrypt [2], or mcrypt [3]. All three are specialized for encrypting files and can even have a feature or two that are missing from the better known encryption applications.

All three take their name from crypt [4], an obsolete Unix command. crypt was broken long ago, but bcrypt, ccrypt, and mcrypt are all up-to-date encryption tools. In some distributions, mcrypt may use crypt as an alias.

All three, however, are simple tools that are easy to learn. With each, you enter the command to encrypt or decrypt with the desired options and then enter a passphrase to complete the operation.


Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Cloud Backup

    Encrypted backup is easier than ever with MCrypt and the Amazon Web Service's S3cmd utility.

  • Encrypting Block Devices

    The recent revelations about NSA spying have sparked renewed interest in data encryption. Encrypting at the file level is quick and easy, but if you're looking for an extra dose of protection, try encrypting the whole block device.

  • Command Line: Encrypting Partitions

    Modern installers offer the option of encryption with just a few clicks, but you might want to take control of the process. We show how to encrypt your partitions safely without sacrificing convenience.

  • zuluCrypt

    The security of personal data is a major topic in the Linux world. zuluCrypt gives users a tool for uncomplicated encryption of any data.

  • DM-Crypt

    If you’re serious about keeping secrets, try hard disk encryption with DM-Crypt and LUKS.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95