Encode your files with OpenSSL on Linux

OpenSSL is an open-source tool implementing between SSL / TLS and many encryption algorithms like DES, AES, RSA, … which allows to encrypt files very simply.

MenuUn

It can happen that OpenSSL may not be present in your system, we can install it via this command :

The number of algorithms is important, the list is searchable to make your choice :

Thereafter, we will continue with the algorithm -aes-256-cbc which is the current most efficient algorithm in terms of security and quickness.


Encoding

To encrypt a file, we only have to adapt the following command :

Parameter to specify to OpenSSL we are encrypting

Parameter indicating the file’s encrypting.

Algorithm of the chosen encryption.

Input file for encryption.

Output file encrypted.

Let’s observe the result :

The password can also be directly seized by the following command but it will be available to anyone accessing your commands, so we recommend you to avoid it :


Decryption

To decrypt a file, we reverse both files and action parameter -e to -d :

Parameter to specify to OpenSSL we are encrypting.

Parameter indicating the file’s decrypting.

Algorithm for the chosen encryption.

Input file for encryption.

Output file encrypted.

Let’s observe the result :


Encode your files with OpenSSL on Linux
Vote