{ "info": { "author": "Paul Sherratt", "author_email": "paul@paul.sh", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 2 :: Only", "Topic :: Security :: Cryptography", "Topic :: System :: Systems Administration" ], "description": "sagecipher\n==========\n\n| |PyPI|\n| |Codecov|\n| |Build Status|\n\n**sagecipher** (**s**\\ sh **age**\\ nt **crypt**) is a very small module\nwhich provides a cipher keyed through ``ssh-agent``. The key is obtained\nby generating random challenge data, passing this to ``ssh-agent`` to\nobtain a signature via the users private ssh-key for use as key\nmaterial, and finally passing this through PBKDF2.\n\nContents\n--------\n\n- `Installation <#installation>`__\n- `Usage <#usage>`__\n- `Using sagecipher in a Python program <#using-in-python>`__\n- `Using the cli tool to provide on-demand decryption <#cli>`__\n\nInstallation\n------------\n\n::\n\n pip install sagecipher\n\nUsage \n------\n\nBefore using, ``ssh-agent`` must be running with at least one ssh-key\navailable for producing cipher key material:\n\n.. code:: sh\n\n $ source <(ssh-agent)\n Agent pid 3710\n\n $ ssh-add\n Enter passphrase for /home/somebody/.ssh/id_rsa:\n Identity added: /home/somebody/.ssh/id_rsa (/home/somebody/.ssh/id_rsa)\n\n| If ``ssh-agent`` is not available or does not have any keys available,\n expect to see a\n| ``sagecipher.cipher.SignError`` Exception:\n\n.. code:: python\n\n >>> from sagecipher import *\n >>> cfail = Cipher()\n Traceback (most recent call last):\n File \"\", line 1, in \n File \"sagecipher/cipher.py\", line 101, in __init__\n signature = sign_via_agent(self.challenge, self.fingerprint)\n File \"sagecipher/cipher.py\", line 230, in sign_via_agent\n raise SignError(SignError.E_NO_KEYS)\n sagecipher.cipher.SignError: SSH agent is not running or no keys are available\n\nUsing the cli tool to provide on-demand decryption to other tools \n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCheck ``sagecipher --help`` for usage...\n\n::\n\n $ sagecipher encrypt - encfile\n secret sauce\n (CTRL-D)\n $ sagecipher decrypt encfile -\n secret sauce\n $ mkfifo decfile\n $ sagecipher decrypt encfile decfile &\n [1] 16753\n $ cat decfile\n secret sauce\n $\n\nUsing sagecipher in a Python program \n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: python\n\n >>> from sagecipher import *\n >>>\n >>> # Create a new cipher using first key available from ssh-agent\n >>> c1 = Cipher()\n >>> \n >>> # Use the cipher header to create a second/future instance\n >>> c2 = Cipher(c1.header())\n >>> \n >>> # Display fingerprint of the SSH key used for derivation of cipher key\n >>> to_hex(c2.fingerprint)\n '11:66:89:44:a3:ec:9b:1c:55:cd:f7:54:20:3b:09:c3'\n >>>\n >>> # Encrypt with the first instance, decrypt back with the second...\n >>> unpad(c2.decrypt_string(c1.encrypt(pad(\"Hello, cryptic world!\"))))\n 'Hello, cryptic world!'\n >>>\n >>> # Encrypt and decrypt using helper methods. The cipher header is\n >>> # stored in the encrypted ciphertext.\n >>> ciphertext = encrypt_string(\"Alice, I think someone is listening!\")\n >>> plaintext = decrypt_string(ciphertext)\n >>> plaintext\n 'Alice, I think someone is listening!'\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/sagecipher.svg\n :target: https://pypi.python.org/pypi/sagecipher\n.. |Codecov| image:: https://img.shields.io/codecov/c/github/p-sherratt/sagecipher/master.svg\n :target: https://codecov.io/gh/p-sherratt/sagecipher\n.. |Build Status| image:: https://travis-ci.org/p-sherratt/sagecipher.svg?branch=master\n :target: https://travis-ci.org/p-sherratt/sagecipher", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/p-sherratt/sagecipher", "keywords": "ssh-agent paramiko cipher cloginrc encryption", "license": "Apache", "maintainer": null, "maintainer_email": null, "name": "sagecipher", "package_url": "https://pypi.org/project/sagecipher/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sagecipher/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/p-sherratt/sagecipher" }, "release_url": "https://pypi.org/project/sagecipher/0.6.5/", "requires_dist": null, "requires_python": null, "summary": "Cipher for remote containers derived from ssh-agent signed challenge data", "version": "0.6.5" }, "last_serial": 2097600, "releases": { "0.6.0": [], "0.6.1": [ { "comment_text": "", "digests": { "md5": "ffbda90aab5aaa9ef37fb6f646279911", "sha256": "2467677f0ad35dad65726db97b27cd3172059b75ea5051edce401a18d752764b" }, "downloads": -1, "filename": "sagecipher-0.6.1.tar.gz", "has_sig": false, "md5_digest": "ffbda90aab5aaa9ef37fb6f646279911", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5914, "upload_time": "2016-05-03T11:25:23", "url": "https://files.pythonhosted.org/packages/a7/07/e53de5c937f58b0808799e713ee5087eafc1434c813e8592a7dce85f9a16/sagecipher-0.6.1.tar.gz" } ], "0.6.2": [ { "comment_text": "", "digests": { "md5": "436c293418b9a8c93155cee71742cb12", "sha256": "9405afe6b65ae3babc3d1813494d7259557656236273b1722a8f5ec8c221255e" }, "downloads": -1, "filename": "sagecipher-0.6.2.tar.gz", "has_sig": false, "md5_digest": "436c293418b9a8c93155cee71742cb12", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7652, "upload_time": "2016-05-03T18:22:45", "url": "https://files.pythonhosted.org/packages/a7/ef/8bb02353013da553cae798cbc783340c22af3f5170c89b384abfd0bf2b43/sagecipher-0.6.2.tar.gz" } ], "0.6.3": [ { "comment_text": "", "digests": { "md5": "a198da8387732973d39ab7a9654722fa", "sha256": "3f15805bb36a904da3af9c757860aee2182fa1cb6fe18f02f770ac8077effbab" }, "downloads": -1, "filename": "sagecipher-0.6.3.tar.gz", "has_sig": false, "md5_digest": "a198da8387732973d39ab7a9654722fa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7655, "upload_time": "2016-05-03T18:27:42", "url": "https://files.pythonhosted.org/packages/d6/2d/8f9527b3089955b017174346ec51897079973413b636b828e26f7e9245b1/sagecipher-0.6.3.tar.gz" } ], "0.6.4": [ { "comment_text": "", "digests": { "md5": "185fb3a8b5f4abca2b6885aa9fef0156", "sha256": "238d85a8ace33b1f41aefb4a198c0af50693afc51a916e7301b8b600ab6528a8" }, "downloads": -1, "filename": "sagecipher-0.6.4.tar.gz", "has_sig": false, "md5_digest": "185fb3a8b5f4abca2b6885aa9fef0156", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7671, "upload_time": "2016-05-03T18:30:46", "url": "https://files.pythonhosted.org/packages/62/5b/4476349dee93d2c3c47aa4ce09cf9d00a65e61d56c292da41a3bfc6bdc44/sagecipher-0.6.4.tar.gz" } ], "0.6.5": [ { "comment_text": "", "digests": { "md5": "0b0e3cef859d6cc3335b04895c42ed5a", "sha256": "c6d557af26c7b5a06357a56d6e2d67c09834923311ae177659ddd4378b42128b" }, "downloads": -1, "filename": "sagecipher-0.6.5.tar.gz", "has_sig": false, "md5_digest": "0b0e3cef859d6cc3335b04895c42ed5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7757, "upload_time": "2016-05-03T19:19:44", "url": "https://files.pythonhosted.org/packages/26/e3/db71f0648cedbf31837cdfc4b06173479d66bbf9c737360f2d99d4d4292f/sagecipher-0.6.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b0e3cef859d6cc3335b04895c42ed5a", "sha256": "c6d557af26c7b5a06357a56d6e2d67c09834923311ae177659ddd4378b42128b" }, "downloads": -1, "filename": "sagecipher-0.6.5.tar.gz", "has_sig": false, "md5_digest": "0b0e3cef859d6cc3335b04895c42ed5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7757, "upload_time": "2016-05-03T19:19:44", "url": "https://files.pythonhosted.org/packages/26/e3/db71f0648cedbf31837cdfc4b06173479d66bbf9c737360f2d99d4d4292f/sagecipher-0.6.5.tar.gz" } ] }