{ "info": { "author": "real", "author_email": "realcr@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Topic :: Security" ], "description": "# Python Secure Stash\n\nA simple on-disk secure stash for secrets, written in python.\nRequires python >= 3 to work.\n\n**This is a new project. Use with caution.**\n\n# Basic API Usage\n\n```python\n>>> from sstash.sstash import SecureStash\n\n>>> ss = SecureStash('my_stash','my_password1234')\n\n>>> ss.write_value(['project','SomeService','token1'],b'622324c09486bf30ed3a9213954a35c34de84535')\n\n>>> ss.read_value(['project','SomeService','token1'])\nb'622324c09486bf30ed3a9213954a35c34de84535'\n\n>>> ss.write_value(['project','SomeService','token2'],b'2435e188b48f4d1778279f1ae764fa5c1d272a03')\n\n>>> ss.read_value(['project','SomeService','token2'])\nb'2435e188b48f4d1778279f1ae764fa5c1d272a03'\n\n>>> ss.remove_key(['project','SomeService','token1'])\nb'622324c09486bf30ed3a9213954a35c34de84535'\n\n>>> ss.read_value(['project','SomeService','token1'])\n...\nsstash.exceptions.SSKeyError: Key ['project', 'SomeService', 'token1'] was not found in store.\n\n```\n\n# Installation\n\nFirst make sure you have those packages:\n\n```\napt install libffi-dev python3-dev\n```\n\nThen install from Pypi:\n\n```\npip install sstash\n```\n\n\n# Tutorial\n\nsecure_stash allows you to encrypt your secrets on disk using a simple python\nAPI. A secure_stash is a single file on disk. \n\nTo keep the data inside the data store hidden from other people, we\nencrypt it using a password. \n\nTo create a new stash file, we run a python line of this form:\n\n```\nss = SecureStash('my_stash','my_password1234')\n```\n\nIf my_stash has never existed before, this line will create a new stash file\ncalled my_stash. It will be empty, and it will be encrypted using the password\n'my_password1234'. If the stash my_stash already exists, it will be opened.\n\n\nThe secure stash is built as a tree based data store. \n\nFor example, If you store the bytes b'hello' in the key ['a','b','c'], and the\nbytes b'bye' in the key ['a','b','d'], you will get the following tree inside\nthe data store:\n\n```\nss.write_value(['a','b','c'],b'hello')\nss.write_value(['a','b','d'],b'bye')\n\n'a'\n |--'b'\n |--'c' : b'hello'\n |--'d' : b'bye'\n```\n\nIf you then store the bytes b'chocolate' inside the key ['a','e'], you will get\nthe following tree:\n\n\n```\nss.write_value(['a','e'],b'chocolate')\n\n'a'\n |--'b'\n | |--'c' : b'hello'\n | |--'d' : b'bye'\n |\n |--'e': b'chocolate'\n```\n\nIf we then remove the key ['a','b','c'] we will get the following tree:\n\n```\nss.remove_key(['a','b','c'])\n\n'a'\n |--'b'\n | |--'d' : b'bye'\n |\n |--'e': b'chocolate'\n```\n\n\n# Cryptography used\n\nsecure_stash is based on well known cryptography primitives. For key derivation\n(Creating a key from the given user password) it uses pbkdf2 (Python's standard\nimplementation).\nThe random for the salt for the password is taken from os.urandom.\n\nPyNaCl's Secret Key Encryption is used for encrypting the data store. PyNaCl\nuses Secret Key Encryption uses Salsa20 steam cipher for encryption and\nPoly1305 MAC for authentication.\n\nAll of the cryptography code can be found inside the file crypto_stash.py.\n\n# Tests\n\nProudly tested by py.test.\nTo run the tests (Make sure that you are at the root directory first):\n\n```\npy.test sstash \n```\n\n\n## Exceptions:\n\nAll the exceptions can be imported from\n\n```\nsstash.exceptions\n```\n\nThe base exception is sstash.exceptions.SSError.\nOther exceptions are:\n\n- sstash.exceptions.SSKeyError\n- sstash.exceptions.SSValueError\n- sstash.exceptions.SSCryptoError", "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/realcr/sstash", "keywords": "sstash secure stash secret on-disk", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "sstash", "package_url": "https://pypi.org/project/sstash/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/sstash/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/realcr/sstash" }, "release_url": "https://pypi.org/project/sstash/0.17/", "requires_dist": null, "requires_python": null, "summary": "A simple on-disk secure stash for secrets", "version": "0.17" }, "last_serial": 2331378, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "ac1358626e002d5e68909bb215721ead", "sha256": "4a9cd84f94a9685ff9e1787b15a68d28a740ef70b3ca28699c09130f01fb9623" }, "downloads": -1, "filename": "sstash-0.1.tar.gz", "has_sig": false, "md5_digest": "ac1358626e002d5e68909bb215721ead", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5417, "upload_time": "2016-09-07T18:21:55", "url": "https://files.pythonhosted.org/packages/c0/14/f4031cb703740ce4280cd4831cc357fa847a3f2814c103203310eff0db75/sstash-0.1.tar.gz" } ], "0.15": [ { "comment_text": "", "digests": { "md5": "f3a9642f55792c89f3c27f8396c7e1dd", "sha256": "6ac11a3cbb8180a387dbb0a329848e9c393966f663b67c72cdbfd7b4ce7bd54c" }, "downloads": -1, "filename": "sstash-0.15.tar.gz", "has_sig": false, "md5_digest": "f3a9642f55792c89f3c27f8396c7e1dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5499, "upload_time": "2016-09-08T11:45:55", "url": "https://files.pythonhosted.org/packages/b1/b0/b06c888feaf02d4a5d70e2401881d92802a1ff28f3a6f611a796c3b330c9/sstash-0.15.tar.gz" } ], "0.16": [ { "comment_text": "", "digests": { "md5": "f30c43eaf8ebe6e2189cad4e04c7ab8f", "sha256": "bec66b49268b91efc632c13c990f98ec596f4f2154df2f6dd317f35dd02b40a9" }, "downloads": -1, "filename": "sstash-0.16.tar.gz", "has_sig": false, "md5_digest": "f30c43eaf8ebe6e2189cad4e04c7ab8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5982, "upload_time": "2016-09-08T13:21:12", "url": "https://files.pythonhosted.org/packages/f1/ff/37471f8fb0086cb0c3b1b793b4e9ce650e114820b6c24436ee2f08bbc3a3/sstash-0.16.tar.gz" } ], "0.17": [ { "comment_text": "", "digests": { "md5": "bcc3e86eccca4d81024798cdda29bef7", "sha256": "2fbcfb3b73b3f90fb2b96685cc84ed0823ebe3f8f35197038b9d8bcb5076dadb" }, "downloads": -1, "filename": "sstash-0.17.tar.gz", "has_sig": false, "md5_digest": "bcc3e86eccca4d81024798cdda29bef7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5992, "upload_time": "2016-09-08T13:27:57", "url": "https://files.pythonhosted.org/packages/81/df/2689559c75f052faf13f114f661ddc13d580ba41aa32f141ad8198e5d111/sstash-0.17.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bcc3e86eccca4d81024798cdda29bef7", "sha256": "2fbcfb3b73b3f90fb2b96685cc84ed0823ebe3f8f35197038b9d8bcb5076dadb" }, "downloads": -1, "filename": "sstash-0.17.tar.gz", "has_sig": false, "md5_digest": "bcc3e86eccca4d81024798cdda29bef7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5992, "upload_time": "2016-09-08T13:27:57", "url": "https://files.pythonhosted.org/packages/81/df/2689559c75f052faf13f114f661ddc13d580ba41aa32f141ad8198e5d111/sstash-0.17.tar.gz" } ] }