ccrypt is based on the Rijndael cipher, which provides strong security against brute force attacks and meets the Advances Encryption Standard (AES). its a symmetric key encryption (i.e same key for encryption and decrypting)
for this task, we’ll create a file and add content to it, then use ccrypt to encrypt, change its encryption key and decrypt it.
install ccrypt
apt-get install ccrypt
to see the help menu
ccrypt -h
next we’ll create a file to test the encryption
echo "this is super secret information" > testfile
cat testfile
ccrypt testfile
when prompted, enter a password. for this test purpose, i entered 123456789 as my password
ls
cat testfile.cpt
to cat the file content using ccrypt and enter the password 123456789
ccat testfile.cpt
changing the encryption key
ccrypt -x testfile.cpt
use ccat to read the file again and confirm the key change
ccat testfile.cpt
decrypting the file
ccrypt -d testfile.cpt