{ "info": { "author": "Naveen Nathan", "author_email": "eccsnacks@t.lastninja.net", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: Public Domain", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Operating System :: POSIX :: BSD", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "eccsnacks\r\n=========\r\n\r\nThis package contains a simple reference implementation of Curve25519\r\nand Curve448 (goldilocks) as specified in\r\n`RFC7748 `__.\r\n\r\n**Caution:** this implementation is inadvisable for use if timing\r\ninvariance matters. Future versions of this package may implement a C\r\nbackend.\r\n\r\n*eccsnacks* is a play on the word\r\n`ecchacks `__, a cool site by djb and Tanja\r\nLange.\r\n\r\nInstallation\r\n------------\r\n\r\n``pip install eccsnacks``\r\n\r\nUsage\r\n-----\r\n\r\nThese examples demonstrate the `Diffie-Hellman\r\noperation `__\r\nfor each curve.\r\n\r\nCurve25519:\r\n^^^^^^^^^^^\r\n\r\n.. code:: python\r\n\r\n from os import urandom\r\n from eccsnacks.curve25519 import scalarmult, scalarmult_base\r\n\r\n # Private keys in Curve25519 can be any 32-byte string.\r\n a = urandom(32)\r\n a_pub = scalarmult_base(a)\r\n\r\n b = urandom(32)\r\n b_pub = scalarmult_base(b)\r\n\r\n # perform Diffie-Hellman computation for alice and bob\r\n k_ab = scalarmult(a, b_pub)\r\n k_ba = scalarmult(b, a_pub)\r\n\r\n # keys should be the same\r\n assert k_ab == k_ba\r\n\r\nCurve448:\r\n^^^^^^^^^\r\n\r\n.. code:: python\r\n\r\n from os import urandom\r\n from eccsnacks.curve448 import scalarmult, scalarmult_base\r\n\r\n # Private keys in Curve448 can be any 32-byte string.\r\n a = urandom(56)\r\n a_pub = scalarmult_base(a)\r\n\r\n b = urandom(56)\r\n b_pub = scalarmult_base(b)\r\n\r\n # perform Diffie-Hellman computation for alice and bob\r\n k_ab = scalarmult(a, b_pub)\r\n k_ba = scalarmult(b, a_pub)\r\n\r\n # keys should be the same\r\n assert k_ab == k_ba\r\n\r\nTodo\r\n----\r\n\r\n- Fast timing invariant implementation of both curves in C.\r\n- More curves.\r\n\r\nAlternatives\r\n------------\r\n\r\n- `curve25519-donna `__\r\n- `python-pure25519 `__\r\n- `pynacl `__\r\n- `pysodium `__\r\n- ... and more can be found `on\r\n pypi `__\r\n\r\nAcknowledgements\r\n----------------\r\n\r\n- Matthew Dempsky for\r\n `slownacl `__\r\n which initially served as a baseline when implementing Curve25519.\r\n\r\n- djb for Curve25519\r\n\r\n- Mike Hamburg for Curve448", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/nnathan/eccsnacks", "keywords": "curve25519,curve448,goldilocks,rfc7748", "license": "Public Domain", "maintainer": "", "maintainer_email": "", "name": "eccsnacks", "package_url": "https://pypi.org/project/eccsnacks/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/eccsnacks/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/nnathan/eccsnacks" }, "release_url": "https://pypi.org/project/eccsnacks/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Reference implementation of Curve25519 and Curve448 (goldilocks) as specified in RFC7748", "version": "1.0.1" }, "last_serial": 2284698, "releases": { "0.0.0": [], "1.0.0": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "09d535b6dfb07013cf4c2fe9bd25dc2d", "sha256": "d6bbe85c079c3938e832998e9bf98110faafcdd4614aacf7a97305ebf338a308" }, "downloads": -1, "filename": "eccsnacks-1.0.1.tar.gz", "has_sig": false, "md5_digest": "09d535b6dfb07013cf4c2fe9bd25dc2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6023, "upload_time": "2016-08-16T17:46:21", "url": "https://files.pythonhosted.org/packages/c1/5b/d4fdaca320473906f310bddbc722b8f935de5038217d0348ffccdf3e1887/eccsnacks-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "09d535b6dfb07013cf4c2fe9bd25dc2d", "sha256": "d6bbe85c079c3938e832998e9bf98110faafcdd4614aacf7a97305ebf338a308" }, "downloads": -1, "filename": "eccsnacks-1.0.1.tar.gz", "has_sig": false, "md5_digest": "09d535b6dfb07013cf4c2fe9bd25dc2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6023, "upload_time": "2016-08-16T17:46:21", "url": "https://files.pythonhosted.org/packages/c1/5b/d4fdaca320473906f310bddbc722b8f935de5038217d0348ffccdf3e1887/eccsnacks-1.0.1.tar.gz" } ] }