{ "info": { "author": "Carlton Shepherd", "author_email": "carlton@linux.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Security :: Cryptography" ], "description": "# PyCocks\n\nA Python implementation of Cocks' identity-based encryption (IBE) scheme [1].\n\nCocks' scheme is distinct in that it is based on the quadratic residuosity hardness problem, rather than bilinear pairings used prevalently in other IBE schemes, e.g. Boneh-Franklin [2]. \n\nAs such, no dependencies are required for performing pairing-based cryptography; only gmpy2 is sufficient.\n\n## Usage\n\nThe module comprises two main classes:\n\n1. ```CocksPKG```: the public key generator (PKG) responsible for the scheme's initialisation and extracting secret keys from authorised user identity values.\n\n2. ```Cocks```: the user-side class for encrypting and decrypting messages using the secret key and public modulus generated by ```CocksPKG```.\n\nExample usage:\n```\nfrom cocks.cocks import CocksPKG, Cocks\n\ncocks_pkg = CocksPKG() # Optional param.: bit size (default = 2048)\n\n# Extract private key, r, from an identity string; a transformed\n# ID string, a, is also returned, which is required for encryption\n# and decryption.\nr, a = cocks_pkg.extract(\"User1\")\n\ncocks = Cocks(cocks_pkg.n) # Must use same public modulus, n, from cocks_pkg\nc = cocks.encrypt(b\"test\", a)\nmsg = cocks.decrypt(c, r, a) # => b\"test\"\n```\n\n## Tests\n\nSome tests can be found in ```test_pycocks.py```, which can be executed using ```pytest```.\n\n## Requirements\n\n- gmpy2 (tested v2.0.8)\n\n## References\n\n1. [C. Cocks, *\"An identity based encryption scheme based on quadratic residues\"*, Proceedings of the IMA International Conference on Cryptography and Coding. Springer, 2001.](https://link.springer.com/chapter/10.1007/3-540-45325-3_32)\n2. [D. Boneh and M. Franklin, *\"Identity-based encryption from the Weil pairing\"*, Annual International Cryptology Conference. Springer, 2001.](https://search.proquest.com/docview/918831320?pq-origsite=gscholar)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/CarltonShepherd/pycocks", "keywords": "cocks,encryption,decryption,ibe,identity,based,crypto,cryptography,security,privacy", "license": "", "maintainer": "", "maintainer_email": "", "name": "pycocks", "package_url": "https://pypi.org/project/pycocks/", "platform": "", "project_url": "https://pypi.org/project/pycocks/", "project_urls": { "Homepage": "https://github.com/CarltonShepherd/pycocks" }, "release_url": "https://pypi.org/project/pycocks/0.0.1/", "requires_dist": [ "gmpy2 (>=2.0.0)" ], "requires_python": "", "summary": "An implementation of Cocks' identity-based encryption (IBE) scheme", "version": "0.0.1" }, "last_serial": 5838435, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "99540ad78887638b9fd3e4320ac7ce7f", "sha256": "958d8760532a9648c5d1cd2fc13cb849e423cc927d7829e2916b5fcf64a0c771" }, "downloads": -1, "filename": "pycocks-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "99540ad78887638b9fd3e4320ac7ce7f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5495, "upload_time": "2019-09-16T22:12:45", "url": "https://files.pythonhosted.org/packages/48/25/fd2b2c953d56400e68927c561cdda76a99488b1442cf0ab5b6783d1ebf5a/pycocks-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "62ecb62919c42beeedf03e685d9b8a25", "sha256": "101406b4e662b5b8b309645f34ce24530ac786351637d7024b4a05d48fe186df" }, "downloads": -1, "filename": "pycocks-0.0.1.tar.gz", "has_sig": false, "md5_digest": "62ecb62919c42beeedf03e685d9b8a25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4068, "upload_time": "2019-09-16T22:12:47", "url": "https://files.pythonhosted.org/packages/21/52/930270d57f53e9de440013255980c679e69b45abfbfe831e66a34513bd07/pycocks-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "99540ad78887638b9fd3e4320ac7ce7f", "sha256": "958d8760532a9648c5d1cd2fc13cb849e423cc927d7829e2916b5fcf64a0c771" }, "downloads": -1, "filename": "pycocks-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "99540ad78887638b9fd3e4320ac7ce7f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5495, "upload_time": "2019-09-16T22:12:45", "url": "https://files.pythonhosted.org/packages/48/25/fd2b2c953d56400e68927c561cdda76a99488b1442cf0ab5b6783d1ebf5a/pycocks-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "62ecb62919c42beeedf03e685d9b8a25", "sha256": "101406b4e662b5b8b309645f34ce24530ac786351637d7024b4a05d48fe186df" }, "downloads": -1, "filename": "pycocks-0.0.1.tar.gz", "has_sig": false, "md5_digest": "62ecb62919c42beeedf03e685d9b8a25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4068, "upload_time": "2019-09-16T22:12:47", "url": "https://files.pythonhosted.org/packages/21/52/930270d57f53e9de440013255980c679e69b45abfbfe831e66a34513bd07/pycocks-0.0.1.tar.gz" } ] }