{ "info": { "author": "Anton Kueltz", "author_email": "kueltz.anton@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Security :: Cryptography" ], "description": "=======\nRFC7539\n=======\n.. image:: https://img.shields.io/pypi/v/rfc7539.svg\n :target: https://pypi.org/project/rfc7539/\n :alt: PyPI\n\n.. image:: https://travis-ci.org/AntonKueltz/rfc7539.svg?branch=master\n :target: https://travis-ci.org/AntonKueltz/rfc7539\n :alt: Travis\n\nAbout\n-----\n\nRFC7539_ is an IETF specification for an authenticated encryption algorithm that will be\nincorporated into TLSv1.3. It is comprised of a stream cipher (ChaCha20) and a MAC (Poly1305), both\nwritten by Daniel J. Bernstein. The C implementations for both of these primitives are taken from\nthe NSS library (the reason being that openSSL has license incompatibilities and also requires the\nopenSSL headers which is more overhead than we need to implement these fairly basic primitives).\nThe NSS code has been slightly modified to account for the 96 bit nonce and 32 bit counter\nspecified in the RFC.\n\nInstallation\n------------\n\nMethod 1\n~~~~~~~~\n\n.. code:: bash\n\n pip install rfc7539\n\nMethod 2\n~~~~~~~~\n\n.. code:: bash\n\n git clone https://github.com/AntonKueltz/rfc7539.git\n cd rfc7539\n python setup.py install\n\nUsage\n-----\n\nYou should use the authenticated encryption mode unless you really need to use one of the primitives\nby itself:\n\n.. code:: python\n\n from rfc7539 import aead\n from os import urandom\n\n key = urandom(32) # key is 32 bytes\n nonce = 'thisisanonce' # nonce is 12 bytes (DO NOT REUSE A NONCE WITH THE SAME KEY)\n message = 'Some message to be encrypted'\n additional_data = 'Some additional data' # this will not be encrypted but will be verified for integrity\n\n # encryption\n ciphertext, mac = aead.encrypt_and_tag(key, nonce, message, additional_data)\n\n # decryption (which yields plaintext == message)\n plaintext = aead.verify_and_decrypt(key, nonce, ciphertext, mac, additional_data)\n\nNotes on Python 2 vs 3\n----------------------\n\nIn python2 encryption and decryption and tagging will return :code:`str` data while in python3 they will return\n:code:`bytes` data. This is consistent with how much of the python library operates between the two versions (e.g.\nsee :code:`binascii.unhexlify`). This can lead to some strange behavior if e.g. you encrypt a :code:`str` value in\npython3 and, after decrypting, your decrypted value does not match your original value because you got :code:`bytes`\nback from the decryption. If the returned type is undesirable it is of course always possible to convert between\n:code:`bytes` and :code:`str` as needed.\n\n.. _RFC7539: https://tools.ietf.org/html/rfc7539\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AntonKueltz/rfc7539", "keywords": "rfc7539 poly1305 chacha20 chacha20poly1305", "license": "GNU General Public License v3 (GPLv3)", "maintainer": "", "maintainer_email": "", "name": "rfc7539", "package_url": "https://pypi.org/project/rfc7539/", "platform": "", "project_url": "https://pypi.org/project/rfc7539/", "project_urls": { "Homepage": "https://github.com/AntonKueltz/rfc7539" }, "release_url": "https://pypi.org/project/rfc7539/1.2.1/", "requires_dist": null, "requires_python": "", "summary": "An AEAD construction per RFC7539", "version": "1.2.1" }, "last_serial": 4492163, "releases": { "1.1.0": [ { "comment_text": "", "digests": { "md5": "6771bb6024a80fef4c915a64816ac351", "sha256": "66228f16cac6c47305791bee0eeee1a84ba32a7b812bcd28f675d99fb2c1f030" }, "downloads": -1, "filename": "rfc7539-1.1.0-cp27-cp27m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "6771bb6024a80fef4c915a64816ac351", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 14080, "upload_time": "2018-08-15T04:50:20", "url": "https://files.pythonhosted.org/packages/aa/11/44eb7143285481f73afc80d6ff1b224d4984186751855d22c1d451828319/rfc7539-1.1.0-cp27-cp27m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "d7ebc35bec30ceef5826079d0ba80003", "sha256": "3d0b1d8fc62208c7408599c1b69fd9a7de9b7e97770bdf599546426a5b7a065c" }, "downloads": -1, "filename": "rfc7539-1.1.0-cp37-cp37m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "d7ebc35bec30ceef5826079d0ba80003", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 14248, "upload_time": "2018-08-15T04:50:22", "url": "https://files.pythonhosted.org/packages/84/81/b77bb2170afac8a6b384a4623ee092e985cb144f984ebed958232b134437/rfc7539-1.1.0-cp37-cp37m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "c94af1c44e0fd608d2cee693bdde2e98", "sha256": "2922ca343076e68c82f2a1d5886b386fa8300f4bc95579a476858b4abbf7fec5" }, "downloads": -1, "filename": "rfc7539-1.1.0.tar.gz", "has_sig": true, "md5_digest": "c94af1c44e0fd608d2cee693bdde2e98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10266, "upload_time": "2018-08-15T04:50:24", "url": "https://files.pythonhosted.org/packages/f8/e1/212ca9b09c017b767c09a553380eb2ff4af6bf7443f3dc134888ead469f4/rfc7539-1.1.0.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "b2863885b81448ef15a826826152f597", "sha256": "d170f6ec81bd052e3aa5cab4a964618412a5409c72c8fab16606eaa452c33028" }, "downloads": -1, "filename": "rfc7539-1.2.0-cp27-cp27m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "b2863885b81448ef15a826826152f597", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 14157, "upload_time": "2018-11-14T04:20:49", "url": "https://files.pythonhosted.org/packages/43/4e/e437c4feabfba4ea78d334f5506282b6271d6eff5bf14d0b98675d31e4d8/rfc7539-1.2.0-cp27-cp27m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "f9a07f5bc8c18d1a26a6544806c05a4d", "sha256": "9a18726236b1375c2ac1d7dd34fcf16ff18c98ee044fb0884ba906d96ac13c8d" }, "downloads": -1, "filename": "rfc7539-1.2.0-cp37-cp37m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "f9a07f5bc8c18d1a26a6544806c05a4d", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 14327, "upload_time": "2018-11-14T04:20:51", "url": "https://files.pythonhosted.org/packages/b8/e2/84e84c5f238f83be8f53d70400a6fe854472ad025c4fe19a00d49e51ef48/rfc7539-1.2.0-cp37-cp37m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "583d3815490a11eab91e00a36a8036e5", "sha256": "96899391b5822ded9395d8d598d322e8caba93b47170a6d5c4d0a62afb2d2fa0" }, "downloads": -1, "filename": "rfc7539-1.2.0.tar.gz", "has_sig": true, "md5_digest": "583d3815490a11eab91e00a36a8036e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24666, "upload_time": "2018-11-14T04:20:53", "url": "https://files.pythonhosted.org/packages/f1/72/a5c9322fe8111f504d6f98bb76bdfe56ebc8ea05b54df84f91c59c93a063/rfc7539-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "feed9c867fb04a62937f003bef8d8b6d", "sha256": "28fc64b43d3f9afa036c3987a1fd1b937770346e3d9336c11f31a067055369f9" }, "downloads": -1, "filename": "rfc7539-1.2.1-cp27-cp27m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "feed9c867fb04a62937f003bef8d8b6d", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 14179, "upload_time": "2018-11-16T02:48:30", "url": "https://files.pythonhosted.org/packages/49/87/ba7be368a080168a460c14b5f294b0a82498d1155c0ff31304bbab33d241/rfc7539-1.2.1-cp27-cp27m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "e1d893f499b656886de4206ba611400e", "sha256": "951235ba8f68f444f71c6b7c1a1c45bb918adbcc63412eff60b694cc3c6e75f2" }, "downloads": -1, "filename": "rfc7539-1.2.1-cp37-cp37m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "e1d893f499b656886de4206ba611400e", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 14345, "upload_time": "2018-11-16T02:48:32", "url": "https://files.pythonhosted.org/packages/c0/af/a0f50a59bd1cdc0e3442f05043244c92e66fc9b0acb55e68a4629858ac7a/rfc7539-1.2.1-cp37-cp37m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "6e25a2ac0027ba2bb460186216103f21", "sha256": "c03261307c9d4904f87557484abcffe1d5d45626da3180b2af1eb82f6fe4a23d" }, "downloads": -1, "filename": "rfc7539-1.2.1.tar.gz", "has_sig": true, "md5_digest": "6e25a2ac0027ba2bb460186216103f21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24708, "upload_time": "2018-11-16T02:48:34", "url": "https://files.pythonhosted.org/packages/37/8d/caefa6935d5bf94faa66d6cf3518407ebb2608434a3bbfe2df7df8dee819/rfc7539-1.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "feed9c867fb04a62937f003bef8d8b6d", "sha256": "28fc64b43d3f9afa036c3987a1fd1b937770346e3d9336c11f31a067055369f9" }, "downloads": -1, "filename": "rfc7539-1.2.1-cp27-cp27m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "feed9c867fb04a62937f003bef8d8b6d", "packagetype": "bdist_wheel", "python_version": "cp27", "requires_python": null, "size": 14179, "upload_time": "2018-11-16T02:48:30", "url": "https://files.pythonhosted.org/packages/49/87/ba7be368a080168a460c14b5f294b0a82498d1155c0ff31304bbab33d241/rfc7539-1.2.1-cp27-cp27m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "e1d893f499b656886de4206ba611400e", "sha256": "951235ba8f68f444f71c6b7c1a1c45bb918adbcc63412eff60b694cc3c6e75f2" }, "downloads": -1, "filename": "rfc7539-1.2.1-cp37-cp37m-macosx_10_13_x86_64.whl", "has_sig": true, "md5_digest": "e1d893f499b656886de4206ba611400e", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": null, "size": 14345, "upload_time": "2018-11-16T02:48:32", "url": "https://files.pythonhosted.org/packages/c0/af/a0f50a59bd1cdc0e3442f05043244c92e66fc9b0acb55e68a4629858ac7a/rfc7539-1.2.1-cp37-cp37m-macosx_10_13_x86_64.whl" }, { "comment_text": "", "digests": { "md5": "6e25a2ac0027ba2bb460186216103f21", "sha256": "c03261307c9d4904f87557484abcffe1d5d45626da3180b2af1eb82f6fe4a23d" }, "downloads": -1, "filename": "rfc7539-1.2.1.tar.gz", "has_sig": true, "md5_digest": "6e25a2ac0027ba2bb460186216103f21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24708, "upload_time": "2018-11-16T02:48:34", "url": "https://files.pythonhosted.org/packages/37/8d/caefa6935d5bf94faa66d6cf3518407ebb2608434a3bbfe2df7df8dee819/rfc7539-1.2.1.tar.gz" } ] }