If you want to encrypt a text file (with passwords, for example), you can use openssl:

To encrypt your file:
openssl aes-256-cbc -in <your text file name> -out <name of the new file>

To decrypt your file:
openssl aes-256-cbc -d -in <name of your encrypted file> -out <name of the new text file> continue.

If you want to encrypt a photo or a folder with photos and videos or other files, then first create an archive from files you want to encrypt, next use gpg:

To encrypt:
gpg -c --s2k-cipher-algo AES256 --s2k-digest-algo SHA512 --s2k-count 65536 <name of your archive with files you want to encrypt>

In output you will see the file with .gpg extension.

To decrypt it use:
gpg --output <name of the decrypted archive> --decrypt <name of your decrypted file>.gpg

Show thread

@obergodmar That last line should read ... --decrypt <name of your ENCRYPTED file>.gpg should it not?

@obergodmar right. That's what I understood. Thanks for the post(toot I should say)

Sign in to participate in the conversation

A instance dedicated - but not limited - to people with an interest in the GNU+Linux ecosystem and/or general tech. Sysadmins to enthusiasts, creators to movielovers - Welcome! Just give a reason why we should approve your application into this instance,our team will review it.