{ "info": { "author": "Igor `idle sign` Starikov", "author_email": "idlesign@yandex.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "srptools\n========\nhttps://github.com/idlesign/srptools\n\n.. image:: https://idlesign.github.io/lbc/py2-lbc.svg\n :target: https://idlesign.github.io/lbc/\n :alt: LBC Python 2\n\n----\n\n|release| |stats| |lic| |ci| |coverage| |health|\n\n.. |release| image:: https://img.shields.io/pypi/v/srptools.svg\n :target: https://pypi.python.org/pypi/srptools\n\n.. |stats| image:: https://img.shields.io/pypi/dm/srptools.svg\n :target: https://pypi.python.org/pypi/srptools\n\n.. |lic| image:: https://img.shields.io/pypi/l/srptools.svg\n :target: https://pypi.python.org/pypi/srptools\n\n.. |ci| image:: https://img.shields.io/travis/idlesign/srptools/master.svg\n :target: https://travis-ci.org/idlesign/srptools\n\n.. |coverage| image:: https://img.shields.io/coveralls/idlesign/srptools/master.svg\n :target: https://coveralls.io/r/idlesign/srptools\n\n.. |health| image:: https://landscape.io/github/idlesign/srptools/master/landscape.svg?style=flat\n :target: https://landscape.io/github/idlesign/srptools/master\n\n\nDescription\n-----------\n\n*Tools to implement Secure Remote Password (SRP) authentication*\n\nSRP is a secure password-based authentication and key-exchange protocol -\na password-authenticated key agreement protocol (PAKE).\n\nThis package contains protocol implementation for Python 2 and 3.\n\nYou may import it into you applications and use its API or you may use\n``srptools`` command-line utility (CLI):\n\n\nCLI usage\n---------\n\nCommand-line utility requires ``click`` package to be installed.\n\nBasic scenario:\n\n.. code-block::\n\n > srptools get_user_data_triplet\n > srptools server get_private_and_public\n > srptools client get_private_and_public\n > srptools client get_session_data\n > srptools server get_session_data\n\nHelp is available:\n\n.. code-block::\n\n > srptools --help\n\n\n\nAPI usage\n---------\n\nPreliminary step. Agree on communication details:\n\n.. code-block:: python\n\n from srptools import SRPContext\n\n context = SRPContext('alice', 'password123')\n username, password_verifier, salt = context.get_user_data_triplet()\n prime = context.prime\n gen = context.generator\n\n\nSimplified workflow:\n\n.. code-block:: python\n\n from srptools import SRPContext, SRPServerSession, SRPClientSession\n\n # Receive username from client and generate server public.\n server_session = SRPServerSession(SRPContext(username, prime=prime, generator=gen), password_verifier)\n server_public = server_session.public\n\n # Receive server public and salt and process them.\n client_session = SRPClientSession(SRPContext('alice', 'password123', prime=prime, generator=gen))\n client_session.process(server_public, salt)\n # Generate client public and session key.\n client_public = client_session.public\n\n # Process client public and compare session keys.\n server_session.process(client_public, salt)\n\n assert server_session.key == client_session.key\n\n\nExtended workflow\n\n.. code-block:: python\n\n from srptools import SRPContext, SRPServerSession, SRPClientSession\n\n # Receive username from client and generate server public.\n server_session = SRPServerSession(SRPContext(username, prime=prime, generator=gen), password_verifier)\n server_public = server_session.public\n\n # Receive server public and salt and process them.\n client_session = SRPClientSession(SRPContext('alice', 'password123', prime=prime, generator=gen))\n client_session.process(server_public, salt)\n # Generate client public and session key proof.\n client_public = client_session.public\n client_session_key_proof = client_session.key_proof\n\n # Process client public and verify session key proof.\n server_session.process(client_public, salt)\n assert server_session.verify_proof(client_session_key_proof)\n # Generate session key proof hash.\n server_session_key_proof_hash = client_session.key_proof_hash\n\n # Verify session key proof hash received from server.\n assert client_session.verify_proof(server_session_key_proof_hash)\n\n\n\nUsage hints\n-----------\n\n* ``srptools.constants`` contains basic constants which can be used with ``SRPContext`` for server and client to agree\n upon communication details.\n* ``.process()`` methods of session classes may raise ``SRPException`` in certain circumstances. Auth process on\n such occasions must be stopped.\n* ``.private`` attribute of session classes may be used to restore sessions:\n .. code-block:: python\n\n server_private = server_session.private\n\n # Restore session on new request.\n server_session = SRPServerSession(context, password_verifier, private=server_private)\n\n* ``SRPContext`` is rather flexible, so you can implement some custom server/client session logic with its help.\n* Basic values are represented as hex strings but base64 encoded values are also supported:\n\n .. code-block:: python\n\n server_public = server_session.public_b64\n\n # Receive server public and salt and process them.\n client_session = SRPClientSession(SRPContext('alice', 'password123', prime=prime, generator=gen))\n client_session.process(server_public, salt, base64=True)\n\n # Use srptools.hex_from_b64() to represent base64 value as hex.\n server_public_hex = hex_from_b64(server_public)\n\n\nLinks\n-----\n* RFC 2945 - The SRP Authentication and Key Exchange System\n https://tools.ietf.org/html/rfc2945\n\n* RFC 5054 - Using the Secure Remote Password (SRP) Protocol for TLS Authentication\n https://tools.ietf.org/html/rfc5054\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/idlesign/srptools", "keywords": "", "license": "BSD 3-Clause License", "maintainer": "", "maintainer_email": "", "name": "srptools", "package_url": "https://pypi.org/project/srptools/", "platform": "", "project_url": "https://pypi.org/project/srptools/", "project_urls": { "Homepage": "https://github.com/idlesign/srptools" }, "release_url": "https://pypi.org/project/srptools/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Tools to implement Secure Remote Password (SRP) authentication", "version": "1.0.0" }, "last_serial": 4717078, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5fc283372a3ef7b9435ed13936e906cd", "sha256": "c7c38c39d070339c3a0cdec4e68c6aeed9e6e4cef7b2a59f09c31242f9092a6a" }, "downloads": -1, "filename": "srptools-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5fc283372a3ef7b9435ed13936e906cd", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13802, "upload_time": "2017-02-11T17:37:26", "url": "https://files.pythonhosted.org/packages/aa/6f/d2269d50703b76ca88f89256b2a02b4fedc2687fe483c4b82b6f15bd39fb/srptools-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9676aeb1f3eb0d5295beae6ec17bc260", "sha256": "5e059cac3a007ff4833b3aaa7201957c4b3bce93aaaf6051d81281178dbefe17" }, "downloads": -1, "filename": "srptools-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9676aeb1f3eb0d5295beae6ec17bc260", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18501, "upload_time": "2017-02-11T17:37:24", "url": "https://files.pythonhosted.org/packages/af/8f/de15a5558c96dca6d390cc7d5efa0eb572b3a694e7827960eb130bb55ae6/srptools-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "46da018ac55487f5990875ee2ce6ba6f", "sha256": "0e4550e4098d101d274e952820864a95991c83abdf9caf59765f084e342407d5" }, "downloads": -1, "filename": "srptools-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "46da018ac55487f5990875ee2ce6ba6f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13966, "upload_time": "2017-03-12T03:02:35", "url": "https://files.pythonhosted.org/packages/47/73/b0fac93e0650139888e85dc26d35f140b982c74a99d0895423fa10845641/srptools-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "811c38f3e45039a8973cc6820d3ce94f", "sha256": "80c76b5f422bdce1c87eaf2fbcb2c2e43974085a1d758cb9195438ee6b8ca0cb" }, "downloads": -1, "filename": "srptools-0.1.1.tar.gz", "has_sig": false, "md5_digest": "811c38f3e45039a8973cc6820d3ce94f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19998, "upload_time": "2017-03-12T03:02:33", "url": "https://files.pythonhosted.org/packages/d2/19/4d9beec46e82d17249517291d0564c9eb6773c51015c278fef97312e63e3/srptools-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "417affab7472b6115926c0813ac53724", "sha256": "4f8014ff8cd71a18d9f52feaa730ac27fae5b5bb161c2b57d103026f91d36828" }, "downloads": -1, "filename": "srptools-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "417affab7472b6115926c0813ac53724", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14342, "upload_time": "2017-06-18T12:10:21", "url": "https://files.pythonhosted.org/packages/d0/fe/f5cf417857404c3b797cb3a8fc43967145686a921e491980cdd4ff505408/srptools-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b82b15d453d4846b117c512caca50b66", "sha256": "675c041b575b60a85fb91fbfa190660d5afc9c366f8cf57ad97c344bd76c123c" }, "downloads": -1, "filename": "srptools-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b82b15d453d4846b117c512caca50b66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15255, "upload_time": "2017-06-18T12:10:18", "url": "https://files.pythonhosted.org/packages/9b/44/24fb65f5cc26ebefd472e0d344578e5d125fc4ff4d96831a0e25072ff9b1/srptools-0.2.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "1c27e5aa339454752c0392e6334a46e5", "sha256": "3155194063f496f1950a55a1a757d2578771ace78dea35b1b1cc7f3e9e6bb9fc" }, "downloads": -1, "filename": "srptools-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1c27e5aa339454752c0392e6334a46e5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14402, "upload_time": "2019-01-20T02:35:46", "url": "https://files.pythonhosted.org/packages/54/6d/b1d42918fc721545d6ba92e6a77e414bc5eda9f4c1c352d8836632499024/srptools-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f5f24ed51d43d96888de25fa074c8c0", "sha256": "5754f639ed1888f47c1185d74e8907ff9af4c0ccc1c8be2ef19339d0a1327f4d" }, "downloads": -1, "filename": "srptools-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6f5f24ed51d43d96888de25fa074c8c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15350, "upload_time": "2019-01-20T02:35:43", "url": "https://files.pythonhosted.org/packages/d7/5a/7baeeafb8209ed4f243c0a7dda2f6d5843efba479b0c2ad6b793803e6c1b/srptools-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c27e5aa339454752c0392e6334a46e5", "sha256": "3155194063f496f1950a55a1a757d2578771ace78dea35b1b1cc7f3e9e6bb9fc" }, "downloads": -1, "filename": "srptools-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1c27e5aa339454752c0392e6334a46e5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14402, "upload_time": "2019-01-20T02:35:46", "url": "https://files.pythonhosted.org/packages/54/6d/b1d42918fc721545d6ba92e6a77e414bc5eda9f4c1c352d8836632499024/srptools-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6f5f24ed51d43d96888de25fa074c8c0", "sha256": "5754f639ed1888f47c1185d74e8907ff9af4c0ccc1c8be2ef19339d0a1327f4d" }, "downloads": -1, "filename": "srptools-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6f5f24ed51d43d96888de25fa074c8c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15350, "upload_time": "2019-01-20T02:35:43", "url": "https://files.pythonhosted.org/packages/d7/5a/7baeeafb8209ed4f243c0a7dda2f6d5843efba479b0c2ad6b793803e6c1b/srptools-1.0.0.tar.gz" } ] }