Browse Source

Start

master
Joel Parker Henderson 7 years ago
commit
e0a6d6bf06
  1. 62
      README.md
  2. 58
      openssl-encrypt

62
README.md

@ -0,0 +1,62 @@
# openssl-encrypt:<br>encrypt a file using our best settings
Syntax:
openssl-encrypt <file>
Example:
$ openssl-encrypt example.txt
Output is a new encrypted file:
example.txt.aes
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.
## Settings
* 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.
* Salt
## Command
The command is:
openssl \
aes-256-cbc \
-salt
-in "$1" \
-out "$1.aes"
## Tracking
* Command: openssl-encrypt
* Version: 1.0.0
* Created: 2017-09-14
* Updated: 2017-09-14
* License: GPL
* Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)

58
openssl-encrypt

@ -0,0 +1,58 @@
#!/bin/sh
#
# OpenSSL script to encrypt a file with our best settings.
#
# Example:
#
# $ openssl-encrypt foo.txt
# (prompt for password)
# #=> foo.txt.aes
#
#
## 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.
#
#
# ## Settings
#
# * 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.
#
# * Salt
#
#
# ## Command
#
# The command is:
#
# openssl \
# aes-256-cbc \
# -salt
# -in "$1" \
# -out "$1.aes"
#
#
# ## Tracking
#
# * Command: openssl-encrypt
# * Version: 1.0.0
# * Created: 2017-09-14
# * Updated: 2017-09-14
# * License: GPL
# * Contact: Joel Parker Henderson (joel@joelparkerhenderson.com)
##
set -eu
openssl aes-256-cbc -salt -in "$1" -out "$1.aes"
Loading…
Cancel
Save