Saturday, June 13, 2015

Encrypt and decrypt your files in Ubuntu using ccrypt

ccrypt is a utility for encrypting and decrypting files and streams. It was based on Rijndael cipher, which was chosen candidate by U.S. government's for Advance Encryption Standard. This cipher is believed to provide a very strong security.

1. Install CCrypt from repo

sudo apt-get install ccrypt

2. To encrypt a file, use one of the following command,

ccrypt -e file_name or ccencrypt file_name

3. It will prompt you for Encryption Phrase aka Password, enter it. for example,

ccrypt -e sample.text 
Enter encryption key: your_key 
Enter encryption key: (repeat) your_key 

Note: Don't forget the encryption phrase, there is no way to get back the original file without it.

To decrypt file/files, use one of the following commands:

ccrypt -d file_name  or  ccdecrypt file_name 

It will prompt you for encryption phrase, enter it. Original file is brought back!

To change the encryption key, ccrypt -x file_name

I guess that is all there is to share. Good luck!

No comments:

Post a Comment