Giter Club home page Giter Club logo

openssl-encrypt's Introduction

openssl-encrypt

Convenience scripts to encrypt/decrypt files with RSA public/private key pairs. Encryption only requires the public key, decryption requires the private key.

Usage:

rsa-encrypt -i inputfile [-k publickey] [-o outputfile] [--rm]

Generates two files, a key file, encrypted with the public key provided (or the user's default one) using RSA, and a file encrypted with the key file using AES-256. If the output file is not specified, the name of the inputfile is used, appended with .key and .enc for the key and encrypted file. If the output file is specified, the name is used as given, and the key is that name appended with .key.

rsa-decrypt -k keyfile -i inputfile [--rm]

Generates one file, a decrypted file. This is always decrypted with the private key at ~/.ssh/id_rsa. The outputted files are given the same names as the

The --rm option in each script allows the scripts to delete the input files, and the keyfile in the case of the decrypt script.

WARNING: Files are encapsulated in a .tar archive before encryption, and extracted upon decryption. As such, files are outputted with the same filenames when decrypted that they had when encrypted. THIS INCLUDES FILES THAT WERE SPECIFIED WITH ABSOLUTE PATHS. Use the same level of caution with this as you would with tar archives.

These scripts use the public/private key pairs found in ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub, unless specified. If another public key is specified, it should be in .pem format. Creation of a public key in .pem format requires access to the private key. An .pem public key can be generated like this:

openssl rsa -in ~/.ssh/id_rsa -pubout > ~/.ssh/id_rsa.pub.pem

openssl-encrypt's People

Contributors

vectorcell avatar

Stargazers

Marszhujin avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.