项目作者: Spaxe

项目描述 :
Command line tools to compress and encrypt your keys
高级语言: Python
项目地址: git://github.com/Spaxe/keystore.git
创建时间: 2017-03-15T14:32:30Z
项目社区:https://github.com/Spaxe/keystore

开源协议:MIT License

下载


Keystore - keeps your keys in one place.

THIS IS AN EXPERIMENT [DO NOT USE IN PRODUCTION]

Encrypt your keys before syncing them to a local backup, or “the cloud”.

Download it later and decrypt it yourself.

  1. $ keystore-save
  2. $ mkdir keys
  3. $ keystore-load --copy-to keys

Prerequisites

Python 3.4+.

Install

You can install straight from pip.

  1. pip install keystore

Before using it for the first time, you will need to setup a ~/.keystorerc in
your home directory.

  1. {
  2. "keystore": "~/Dropbox/keystore",
  3. "files": [
  4. "~/.ssh",
  5. "~/.gnupg/gpg-agent.conf",
  6. "~/.gnupg/gpg.conf",
  7. "~/.gnupg/private-keys-v1.d",
  8. "~/.gnupg/pubring.gpg",
  9. "~/.gnupg/secring.gpg",
  10. "~/.gnupg/trustdb.gpg",
  11. ],
  12. "verbose": true
  13. }

Example usage

Saving keys:

  1. $ keystore-save
  2. Inspecting ~/.ssh:
  3. Adding /Users/spaxe/.ssh/id_rsa ...
  4. Adding /Users/spaxe/.ssh/id_rsa.pub ...
  5. Adding /Users/spaxe/.ssh/known_hosts ...
  6. Added 3 key(s) to keystore.
  7. This passphrase is used to decrypt your keystore. Please remember it.
  8. Please enter a passphrase:
  9. Please verify your passphrase:
  10. Passphrase accepted. Encrypting ...
  11. Keyring successfully created:
  12. AwGd2MtDWRkOFdyJoRZTdFApvKnoBQ2PXsqqE
  13. [...]

Loading keys:

  1. $ keystore-load
  2. Located encrypted keystore at ~/Dropbox/keystore:
  3. Please enter the passphrase:
  4. Keyring decrypted successfully.
  5. File /Users/spaxe/.ssh/id_rsa exists. Are you sure you want to overwrite? (y)/n:
  6. Writing key to /Users/spaxe/.ssh/id_rsa ...
  7. File /Users/spaxe/.ssh/id_rsa.pub exists. Are you sure you want to overwrite? (y)/n:
  8. Writing key to /Users/spaxe/.ssh/id_rsa.pub ...
  9. File /Users/spaxe/.ssh/known_hosts exists. Are you sure you want to overwrite? (y)/n:
  10. Writing key to /Users/spaxe/.ssh/known_hosts ...
  11. Keyring loaded. Restored 3 keys.

Loading keys to the same directory (useful for a new machine):

  1. $ mkdir keys
  2. $ keystore-load --copy-to keys
  3. Located encrypted keystore at ~/Dropbox/keystore:
  4. Please enter the passphrase:
  5. Keyring decrypted successfully.
  6. Writing key to /Users/spaxe/keys/id_rsa ...
  7. Writing key to /Users/spaxe/keys/id_rsa.pub ...
  8. Writing key to /Users/spaxe/keys/known_hosts ...
  9. Keyring loaded. Restored 3 keys.

Running tests:

  1. python3 test.py

Known Security Issues

This library uses simple-crypt, which was last updated in 2015.
You can read up about warnings for security concerns here.

License

© Xavier Ho contact@xavierho.com

License under MIT License.