{ "info": { "author": "Christian Heimes", "author_email": "christian@python.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Natural Language :: English", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: C", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Security :: Cryptography" ], "description": "========================================================\nPKCS#5 password-based key derivation function 2 (PBKDF2)\n========================================================\n\nThis is a backport of ``hashlib.pbkdf2_hmac`` for Python 2.6 to 2.7. The\nimplementation comes with a pure Python implementation and a C module that\ndepends on OpenSSL. The C code does *not* wrap ``PKCS5_PBKDF2_HMAC`` as\nits implementation is suboptimal.\n\n\nUsage\n=====\n\n::\n\n >>> from backports.pbkdf2 import pbkdf2_hmac, compare_digest\n >>> dkey = pbkdf2_hmac('sha1', passwordbytes, saltbytes, iterations=100000)\n >>> compare_digest(dkey, originalkey)\n True\n\n\npbkdf2_hmac(hash_name, password, salt, iterations, dklen=None)\n\n hash_name\n name of the digest algorithm as string\n\n password\n password as bytes, bytearray or bytes-like object (*)\n\n salt\n salt as bytes, bytearray or bytes-like object (*). The salt should be\n generated with a CPRNG like ``os.urandom()``. You should **never** use\n ``random.random()``. About 16 bytes seem to be a good choice.\n\n iterations\n number of rounds, 100,000 rounds of SHA-1 take about 30ms on a modern\n CPU.\n\n dklen\n length of the derived key (defaults to digest_size)\n\n returns\n derived key as bytes\n\n (*) bytearray and bytes-like objects are not supported on Python 2.6\n\n\nBenchmarks\n==========\n\n==================== ===== ===== ===== ======\npassword length 10 100 500 1000\n==================== ===== ===== ===== ======\nbackports.pbkdf2 C 0.314 0.321 0.310 0.310\nbackports.pbkdf2 Py 0.838 0.847 0.853 0.913\npbkdf2_ctypes 0.99.3 0.554 0.663 0.954 1.344\npbkdf2 1.3 5.235 5.746 6.155 6.450\nDjango pbkdf2 1.5.4 1.976 2.430 2.676 3.078\nPyCrypto 2.6.1 6.903 9.062 9.518 10.274\n==================== ===== ===== ===== ======\n\n algorithm\n sha1\n rounds\n 50000\n dklen\n 20\n saltlen\n 16\n number of runs per test\n 10\n Python\n Python 3.3 on Linux AMD64\n CPU\n Intel i7-2860QM @ 2.50GHz\n\nChangelog\n=========\n\npbkdf2 0.1\n----------\n\n*Release date: 19-Oct-2013*\n\n- initial release of backports.pbkdf2", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/tiran/backports.pbkdf2", "keywords": "pbkdf2 password openssl security", "license": "PSFL", "maintainer": null, "maintainer_email": null, "name": "backports.pbkdf2", "package_url": "https://pypi.org/project/backports.pbkdf2/", "platform": "POSIX,Windows", "project_url": "https://pypi.org/project/backports.pbkdf2/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/tiran/backports.pbkdf2" }, "release_url": "https://pypi.org/project/backports.pbkdf2/0.1/", "requires_dist": null, "requires_python": null, "summary": "Fast PBKDF2 for Python 2.6 - 3.4", "version": "0.1" }, "last_serial": 898267, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a818df09939f1fffacd0b04ab381b3a8", "sha256": "6d342adb73dd86396b7c604f6da473bf98eb5356e68b99c913a30a5e64832e03" }, "downloads": -1, "filename": "backports.pbkdf2-0.1.tar.gz", "has_sig": true, "md5_digest": "a818df09939f1fffacd0b04ab381b3a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9912, "upload_time": "2013-10-19T13:55:29", "url": "https://files.pythonhosted.org/packages/d0/32/36174bcfe19964e7baf7dd592b4ef8b1df5f54c3996264d6e366c8050c03/backports.pbkdf2-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a818df09939f1fffacd0b04ab381b3a8", "sha256": "6d342adb73dd86396b7c604f6da473bf98eb5356e68b99c913a30a5e64832e03" }, "downloads": -1, "filename": "backports.pbkdf2-0.1.tar.gz", "has_sig": true, "md5_digest": "a818df09939f1fffacd0b04ab381b3a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9912, "upload_time": "2013-10-19T13:55:29", "url": "https://files.pythonhosted.org/packages/d0/32/36174bcfe19964e7baf7dd592b4ef8b1df5f54c3996264d6e366c8050c03/backports.pbkdf2-0.1.tar.gz" } ] }