{ "info": { "author": "Stefan Marsiske", "author_email": "stefan.marsiske@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: BSD License", "Topic :: Security :: Cryptography" ], "description": "Persistent Crypto Dictionary\n****************************\n\nThis class implements a persistent dictionary using sqlite3 and\nencrypts the keys and the values of the dictionary in a way, that\nmakes it very hard to bruteforce either the key or the values in the\ndb.\n\nexample usage::\n >>> from pcd import PersistentCryptoDict\n >>> d=PersistentCryptoDict()\n >>> print d\n \n >>> print d['my key']\n None\n >>> d['my key']='secret value'\n >>> print d['my key']\n secret value\n >>> d['my key']='top secret value'\n >>> print d['my key']\n top secret value\n\nCrypto\n======\n\nThe key and the value in the dict is transformed according to the\nfollowing algorithm (credit: dnet):\n\nSetting values\n++++++++++++++\n1. we calculate they keyhash - a hmac-sha512(salt,key)\n2. we split the key in half, the first half as a hexdigest (ascii),\n the second we keep as a binary\n3. we use the second binary half from step 2 of the keyhash to encrypt\n the value\n4. we use the ascii keyhash from step 2 as a key to the database, and\n the value is the encrypted result from step 3.\n\nGetting values\n++++++++++++++\n1. we calculate they keyhash - a hmac-sha512(salt,key)\n2. we split the key in half, the first half as a hexdigest (ascii),\n the second we keep as a binary\n3. we query the database using the ascii keyhash from step 2 as a key\n4. we use the second binary half from step 2 of the keyhash to decrypt\n the value\n\nThe database contains only the following pairs of data:\n\n (hmac-sha512(key, salt).hexdigest()[:64], # key\n aes256-ofb(hmac-sha512(key, salt).digest()[32:], value)) # value\n\nwe diligently obey Schneier's law:\nhttps://www.schneier.com/blog/archives/2011/04/schneiers_law.html, and\nthus we would consider the task to retrieve any meaningful data\nwithout huge rainbow tables from such a database a futile task. :)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://packages.python.org/persistent_crypto_dict", "keywords": "crypto collections container persistency cache", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "persistent_crypto_dict", "package_url": "https://pypi.org/project/persistent_crypto_dict/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/persistent_crypto_dict/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://packages.python.org/persistent_crypto_dict" }, "release_url": "https://pypi.org/project/persistent_crypto_dict/0.4.3/", "requires_dist": null, "requires_python": null, "summary": "UNKNOWN", "version": "0.4.3" }, "last_serial": 796174, "releases": { "0.4": [ { "comment_text": "", "digests": { "md5": "e325afda34203a7e71bbc5b0c94ddd52", "sha256": "4cc29ba81521261be9d9fd0a498cc3cb1e729e254240858bab64e558178e8616" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4-py2.7.egg", "has_sig": true, "md5_digest": "e325afda34203a7e71bbc5b0c94ddd52", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 5791, "upload_time": "2012-01-23T16:07:02", "url": "https://files.pythonhosted.org/packages/b5/f7/ad4b77728ab8e37731010900b585d745d3e4bf441ec2bd33f06ea0cfc405/persistent_crypto_dict-0.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "078e33a751a7e3bd3218af53b166aeaf", "sha256": "0741b0e3dd7e1f5c3c6efab91f592457fe3cb99bfc563bed5d1819097979090d" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4.tar.gz", "has_sig": true, "md5_digest": "078e33a751a7e3bd3218af53b166aeaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3552, "upload_time": "2012-01-23T16:06:53", "url": "https://files.pythonhosted.org/packages/de/3c/9e68371b825072b938da41170fd505bf02505a28824d4cc7477440a6f5a8/persistent_crypto_dict-0.4.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "750fc16734c41f6ea156bda112c94dbc", "sha256": "b9c03d35e221a529baee0f6a55254d5265e445b8d5944fc8e8c3f8a93dadb2bb" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4.2-py2.7.egg", "has_sig": true, "md5_digest": "750fc16734c41f6ea156bda112c94dbc", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 5442, "upload_time": "2012-01-24T18:49:49", "url": "https://files.pythonhosted.org/packages/fc/41/c2aaa5539babc8ced8ebe49bd9b03f50fb88f83f5241aa42b4765efa9dc5/persistent_crypto_dict-0.4.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "c5f5f6135db56ca6f8cf7c3d75b1765f", "sha256": "8264637f2607597a440e1f6f419e5673da019bda1b2cb8a75fb581c1b5a090de" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4.2.tar.gz", "has_sig": true, "md5_digest": "c5f5f6135db56ca6f8cf7c3d75b1765f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3575, "upload_time": "2012-01-24T18:49:39", "url": "https://files.pythonhosted.org/packages/40/72/0c5893886e24f7c4ee63c6229f2dec4bd8b0abb48e62c6b06a4cd05e1ec8/persistent_crypto_dict-0.4.2.tar.gz" } ], "0.4.3": [ { "comment_text": "", "digests": { "md5": "241461fea0dbca33c3ac165dd96d0461", "sha256": "06ed104838b960df3b44920a0e4bb32bfdab340b5e575ccce4ec14f9d407143d" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4.3-py2.7.egg", "has_sig": true, "md5_digest": "241461fea0dbca33c3ac165dd96d0461", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 5478, "upload_time": "2013-02-04T20:47:31", "url": "https://files.pythonhosted.org/packages/dd/94/093f10056ef6a98d4aeccfd598e67558099a1c4adadb2d155019927da7ed/persistent_crypto_dict-0.4.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "2a8fe76c3730f6b7da50a666e4de308a", "sha256": "b1618accf02494ecf1cb4d8aafff68fe5a3bbfa558cbfb639fc888652afe867d" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4.3.tar.gz", "has_sig": true, "md5_digest": "2a8fe76c3730f6b7da50a666e4de308a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3585, "upload_time": "2013-02-04T20:47:16", "url": "https://files.pythonhosted.org/packages/1b/d5/eab9beede971b4e1d44f19153083142253e094a91eb72a5a052f38c39826/persistent_crypto_dict-0.4.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "241461fea0dbca33c3ac165dd96d0461", "sha256": "06ed104838b960df3b44920a0e4bb32bfdab340b5e575ccce4ec14f9d407143d" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4.3-py2.7.egg", "has_sig": true, "md5_digest": "241461fea0dbca33c3ac165dd96d0461", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 5478, "upload_time": "2013-02-04T20:47:31", "url": "https://files.pythonhosted.org/packages/dd/94/093f10056ef6a98d4aeccfd598e67558099a1c4adadb2d155019927da7ed/persistent_crypto_dict-0.4.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "2a8fe76c3730f6b7da50a666e4de308a", "sha256": "b1618accf02494ecf1cb4d8aafff68fe5a3bbfa558cbfb639fc888652afe867d" }, "downloads": -1, "filename": "persistent_crypto_dict-0.4.3.tar.gz", "has_sig": true, "md5_digest": "2a8fe76c3730f6b7da50a666e4de308a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3585, "upload_time": "2013-02-04T20:47:16", "url": "https://files.pythonhosted.org/packages/1b/d5/eab9beede971b4e1d44f19153083142253e094a91eb72a5a052f38c39826/persistent_crypto_dict-0.4.3.tar.gz" } ] }