Cryptr - A Simple Shell Utility For Encrypting And Decrypting Files Using OpenSSL

2019-06-26T21:44:02
ID KITPLOIT:7622255790759924271
Type kitploit
Reporter KitPloit
Modified 2019-06-26T21:44:02

Description

A simple shell utility for encrypting and decrypting files using OpenSSL.

Installation

git clone https://github.com/nodesocket/cryptr.git
ln -s "$PWD"/cryptr/cryptr.bash /usr/local/bin/cryptr

Bash tab completion
Add tools/cryptr-bash-completion.bash to your tab completion file directory.

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 ./secret-file
enter aes-256-cbc [encryption](&lt;https://www.kitploit.com/search/label/Encryption&gt; "encryption" ) password:
Verifying - enter aes-256-cbc encryption password:


➜ ls -alh
-rw-r--r--  1 user  group   1.0G Oct  1 13:33 secret-file
-rw-r--r--  1 user  group   1.0G Oct  1 13:34 secret-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 ./secret-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 secret-file.aes


➜ cryptr decrypt ./secret-file.aes
enter aes-256-cbc [decryption](&lt;https://www.kitploit.com/search/label/Decryption&gt; "decryption" ) password:


➜ ls -alh
-rw-r--r--  1 user  group   1.0G Oct  1 13:35 secret-file
-rw-r--r--  1 user  group   1.0G Oct  1 13:34 secret-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 ./secret-file.aes

help

> help - Displays help

➜ cryptr help
Usage: cryptr command &lt;command-specific-options&gt;

  encrypt &lt;file&gt;       Encrypt file
  decrypt &lt;file.aes&gt;   Decrypt encrypted file
  help                 Displays help
  version              Displays the current version

version

> version - Displays the current version

➜ cryptr version
cryptr 2.1.1

default

> default - Displays the current version and help

➜ cryptr
cryptr 2.1.1

Usage: cryptr command &lt;command-specific-options&gt;

  encrypt &lt;file&gt;       Encrypt file
  decrypt &lt;file.aes&gt;   Decrypt encrypted file
  help                 Displays help
  version              Displays the current version

Changelog
https://github.com/nodesocket/cryptr/blob/master/CHANGELOG.md

Support, Bugs, And Feature Requests
Create issues here in GitHub ( https://github.com/nodesocket/cryptr/issues ).

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 with the follow format:
&lt;major&gt;.&lt;minor&gt;.&lt;patch&gt;
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 For more information on semantic versioning, visit http://semver.org/ .

Download Cryptr