Syntax:
openssl-encrypt <input file path> [output file path]
Example:
$ openssl-encrypt example.txt
Output is a new encrypted file:
example.txt.aes
To decrypt the file:
$ openssl-decrypt example.txt.aes
-
Symmetric encryption, i.e. we use the same password for encryption and decryption. We choose this because our users can understand symmetric more easily than asymmetic.
-
Encryption using the aes-256-cbc cipher algorithm. We choose this because it's a good balance of strong, fast, and portable.
-
Message digest using SHA-256. We choose this because it's the current default of the current openssl tool, and we set it explicity because openssl versions have different defaults.
-
Salt that is randomly generated.
-
The output file path defaults to the input file path with suffix ".aes".
The command is:
openssl aes-256-cbc -salt -md sha256
-in "example.txt"
-out "example.txt.aes"
These commands are similar:
-
gpg-encrypt
: use GPG to encrypt a file using our best settings. -
gpg-decrypt
: use GPG to decrypt a file using our best settings. -
openssl-encrypt
: use OpenSLL to encrypt a file using our best settings. -
openssl-decrypt
: use OpenSSL to decrypt a file using our best settings.
- Command: openssl-encrypt
- Version: 2.0.0
- Created: 2017-09-14
- Updated: 2017-11-27
- License: GPL
- Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)