GithubHelp home page GithubHelp logo

mariusmitrofan / kmstool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dejonghe/kmstool

0.0 2.0 0.0 16 KB

Tool for using AWS Kms data keys to encrypt and decrypt large files.

License: Apache License 2.0

Python 100.00%

kmstool's Introduction

kmstool

Tool for using AWS KMS data keys to encrypt and decrypt larger files. Input and Output file can be local or s3 file paths. If you were using this tool before May 2016, this was pre tag/release. That version is still available at v1.0.0.

Requirements

Requires: boto3, pycrypto

pip install -r requirements.txt

Usage

For encrypting must have Key-Id Tool will only decrypt things that it has encrypted.

encrypt:

kmstool.py -e --file myfiles.tar --output this.tar.enc --key_id <KMS Key-ID>
kmstool.py -e --file myfiles.tar --output s3://mybucket/my/key/path/this.tar.enc --key_id <KMS Key-ID>
kmstool.py -e --file s3://bucket/myfiles.tar --output s3://encrypted_bucket/this.tar.enc --key_id <KMS Key-ID>

decrypt:

kmstool.py -d --file this.tar.enc --output myfiles.tar
kmstool.py -d --file s3://mybucket/my/key/path/this.tar.enc --output myfiles.tar
kmstool.py -d --file s3://encrypted_bucket/my/key/path/this.tar.enc --output s3://mybucket/myfiles.tar

help:

Usage: kmstool [options] 
You must specify to encrypt or decrypt.
Output will always output a tar file.

Options:
  -h, --help            show this help message and exit
  -e, --encrypt         This encrypts the file
  -d, --decrypt         This decrypts the file
  -f FILE, --file=FILE  File to encrypt or decrypt
  -o OUTPUT, --output=OUTPUT
                        Path to output file
  -k KEY_ID, --key_id=KEY_ID
                        KMS Key-id
  -s KEY_SPEC, --key_spec=KEY_SPEC
                        KMS KeySpec
  -p PROFILE, --profile=PROFILE
                        AWS Profile
  -r REGION, --region=REGION
                        Region
  -t TEMP, --temp=TEMP  Temp work dir, optional

kmstool's People

Contributors

mattkenney avatar

Watchers

James Cloos avatar Marius Mitrofan 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.