|
|
@ -2,7 +2,7 @@ |
|
|
|
|
|
|
|
Syntax: |
|
|
|
|
|
|
|
openssl-encrypt <file> |
|
|
|
openssl-encrypt <input file path> [output file path] |
|
|
|
|
|
|
|
Example: |
|
|
|
|
|
|
@ -14,20 +14,7 @@ Output is a new encrypted file: |
|
|
|
|
|
|
|
To decrypt the file: |
|
|
|
|
|
|
|
$ openssl-decrypt example.txt.openssl |
|
|
|
|
|
|
|
|
|
|
|
## Related |
|
|
|
|
|
|
|
These commands are related: |
|
|
|
|
|
|
|
* `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. |
|
|
|
$ openssl-decrypt example.txt.aes |
|
|
|
|
|
|
|
|
|
|
|
## Settings |
|
|
@ -38,25 +25,46 @@ These commands are related: |
|
|
|
* Encryption using the aes-256-cbc cipher algorithm. |
|
|
|
We choose this because it's a good balance of strong, fast, and portable. |
|
|
|
|
|
|
|
* Salt |
|
|
|
* 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. |
|
|
|
|
|
|
|
* 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". |
|
|
|
|
|
|
|
|
|
|
|
## Command |
|
|
|
|
|
|
|
The command is: |
|
|
|
|
|
|
|
openssl \ |
|
|
|
aes-256-cbc \ |
|
|
|
-salt |
|
|
|
-in "$1" \ |
|
|
|
-out "$1.aes" |
|
|
|
openssl aes-256-cbc -salt -md sha256 |
|
|
|
-in "example.txt" |
|
|
|
-out "example.txt.aes" |
|
|
|
|
|
|
|
|
|
|
|
## See also |
|
|
|
|
|
|
|
These commands are related: |
|
|
|
|
|
|
|
* `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. |
|
|
|
|
|
|
|
|
|
|
|
## Tracking |
|
|
|
|
|
|
|
* Command: openssl-encrypt |
|
|
|
* Version: 1.0.0 |
|
|
|
* Version: 2.0.0 |
|
|
|
* Created: 2017-09-14 |
|
|
|
* Updated: 2017-09-14 |
|
|
|
* Updated: 2017-11-27 |
|
|
|
* License: GPL |
|
|
|
* Contact: Joel Parker Henderson (joel@joelparkerhenderson.com) |
|
|
|