cryptr: simple shell utility for encrypting and decrypting files
cryptr
A simple shell utility for encrypting and decrypting files.
2.1.0 – 10/4/2017
You may now define the password to use when encrypting and decrypting using the CRYPTR_PASSWORD environment variable. This change enables non-interactive/batch operations.
Added a test script tests/test.bash.
Installation
git clone https://github.com/nodesocket/cryptr.git
ln -s “$PWD”/cryptr/cryptr.bash /usr/local/bin/cryptr
API/Commands
encrypt
encrypt <file> – Encryptes file with OpenSSL AES-256 cipher block chaining. Writes an encrypted file out (ciphertext)appending .aes extension.
➜ cryptr encrypt ./secrets-file
enter aes-256-cbc encryption password:
Verifying – enter aes-256-cbc encryption password:
➜ ls -alh
-rw-r–r– 1 user group 1.0G Oct 1 13:33 secrets-file
-rw-r–r– 1 user group 1.0G Oct 1 13:34 secrets-file.aes
You may optionally define the password to use when encrypting using the CRYPTR_PASSWORD environment variable. This enables non-interactive/batch operations.
➜ CRYPTR_PASSWORD=A1EO7S9SsQYcPChOr47n cryptr encrypt ./secrets-file
decrypt
decrypt <file.aes> – Decrypt encrypted file using OpenSSL AES-256 cipher block chaining. Writes a decrypted file out (plaintext) removing .aes extension.
➜ ls -alh
-rw-r–r– 1 user group 1.0G Oct 1 13:34 secrets-file.aes
➜ cryptr decrypt ./secrets-file.aes
enter aes-256-cbc decryption password:
➜ ls -alh
-rw-r–r– 1 user group 1.0G Oct 1 13:35 secrets-file
-rw-r–r– 1 user group 1.0G Oct 1 13:34 secrets-file.aes
You may optionally define the password to use when decrypting using the CRYPTR_PASSWORD environment variable. This enables non-interactive/batch operations.
➜ CRYPTR_PASSWORD=A1EO7S9SsQYcPChOr47n cryptr decrypt ./secrets-file.aes
help
help – Displays help
Usage: cryptr command <command-specific-options>encrypt <file> Encrypt file
decrypt <file.aes> Decrypt encrypted file
help Displays help
version Displays the current version
Versioning
For transparency and insight into the release cycle, and for striving to maintain backward compatibility, cryptr will be maintained under the semantic versioning guidelines.
Releases will be numbered in the following format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
Breaking backward compatibility bumps the major (and resets the minor and patch)
New additions without breaking backward compatibility bumps the minor (and resets the patch)
Bug fixes and misc changes bumps the patch
Source: https://github.com/nodesocket/