toyecc


Nametoyecc JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/johndoe31415/toyecc
SummaryElliptic Curve Cryptography playground/toolkit written in pure Python
upload_time2022-12-05 08:21:23
maintainer
docs_urlNone
authorJohannes Bauer
requires_python
licensegpl-3.0
keywords elliptic curve cryptography ed25519 ecdsa ecdh montgomery edwards weierstrass
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            # toyecc
[![Build Status](https://app.travis-ci.com/johndoe31415/toyecc.svg?branch=master)](https://app.travis-ci.com/johndoe31415/toyecc)

toyecc is a playground for Elliptic Curve Cryptography in F<sub>P</sub>. It is
written in pure Python and aims to explain ECC in easy terms. It is neither
written to be performant, nor side-channel resistant nor in any way suited for
productive use at all. Please use it for its intended purpose and for it only.

The rationale behind toyecc is to show a clear and mathematically clean
presentation of the underlying mathematical problems. Most code that is written
arund ECC -- especially code that revolves around Ed25519 and/or Curve25519 is
heavily optimized and in many cases hard to understand. toyecc tries to present
the problems with a high level of abstraction in order to serve as yet another
(different) reference to compare implementations against and in order to aid
understanding of heavily optimized code. All curve arithmetic is therefore
performed in affine space; performance in affine space is lowest, but having
values that directly can be checked against the curve equation makes
understanding everything extremely easy.


## Installation
toyecc is available on PyPi. You can install it by:

```
$ pip3 install toyecc
```


## Tutorial
There's a ECC tutorial that I've written which accompanies the pure code. It
can be found at [http://johannes-bauer.com/compsci/ecc/](http://johannes-bauer.com/compsci/ecc/)


## Features
  * ECDSA demonstration
  * ECIES demonstration
  * ECDH demonstration
  * Elgamal demonstration
  * Dual_EC_DBRG backdoor demonstration
  * Demonstration how a private key can be recovered from two ECDSA signatures
    which reused the same nonce (ECDSA nonce exploit)
  * Support for short-formed Weierstrass curves, Montgomery curves and twisted
    Edwards curves
  * Conversion of domain parameters of twisted Edwards to Montgomery form and
    back, conversion of points between Montgomery representation and its
    birationally equivalent twisted Edwards counterpart
  * Ed25519 and Curve25519 support and support to convert keys between each
    other (Curve25519 and Ed25519 are birationally equivalent curves)
  * Many testcases to try out your own implementation
  * Example of OpenBSD's signify application (generates and verifies Ed25519
    signatures, but doesn't support key encryption)
  * X-coordinate-only scalar multiplication on Short Weierstrass curves
  * Clean, well-documented Python3 code
  * Sage scripts that perform an invalid point attack using a vulnerable
    X-only-ladder implementation of toyecc

## License
GNU GPL-3.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/johndoe31415/toyecc",
    "name": "toyecc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "elliptic,curve,cryptography,ed25519,ecdsa,ecdh,montgomery,edwards,weierstrass",
    "author": "Johannes Bauer",
    "author_email": "joe@johannes-bauer.com",
    "download_url": "https://files.pythonhosted.org/packages/3b/14/c16cb6be10f00f438c02a3572280a09335a1acd710b476bb7ecec24c8791/toyecc-0.0.8.tar.gz",
    "platform": null,
    "description": "# toyecc\n[![Build Status](https://app.travis-ci.com/johndoe31415/toyecc.svg?branch=master)](https://app.travis-ci.com/johndoe31415/toyecc)\n\ntoyecc is a playground for Elliptic Curve Cryptography in F<sub>P</sub>. It is\nwritten in pure Python and aims to explain ECC in easy terms. It is neither\nwritten to be performant, nor side-channel resistant nor in any way suited for\nproductive use at all. Please use it for its intended purpose and for it only.\n\nThe rationale behind toyecc is to show a clear and mathematically clean\npresentation of the underlying mathematical problems. Most code that is written\narund ECC -- especially code that revolves around Ed25519 and/or Curve25519 is\nheavily optimized and in many cases hard to understand. toyecc tries to present\nthe problems with a high level of abstraction in order to serve as yet another\n(different) reference to compare implementations against and in order to aid\nunderstanding of heavily optimized code. All curve arithmetic is therefore\nperformed in affine space; performance in affine space is lowest, but having\nvalues that directly can be checked against the curve equation makes\nunderstanding everything extremely easy.\n\n\n## Installation\ntoyecc is available on PyPi. You can install it by:\n\n```\n$ pip3 install toyecc\n```\n\n\n## Tutorial\nThere's a ECC tutorial that I've written which accompanies the pure code. It\ncan be found at [http://johannes-bauer.com/compsci/ecc/](http://johannes-bauer.com/compsci/ecc/)\n\n\n## Features\n  * ECDSA demonstration\n  * ECIES demonstration\n  * ECDH demonstration\n  * Elgamal demonstration\n  * Dual_EC_DBRG backdoor demonstration\n  * Demonstration how a private key can be recovered from two ECDSA signatures\n    which reused the same nonce (ECDSA nonce exploit)\n  * Support for short-formed Weierstrass curves, Montgomery curves and twisted\n    Edwards curves\n  * Conversion of domain parameters of twisted Edwards to Montgomery form and\n    back, conversion of points between Montgomery representation and its\n    birationally equivalent twisted Edwards counterpart\n  * Ed25519 and Curve25519 support and support to convert keys between each\n    other (Curve25519 and Ed25519 are birationally equivalent curves)\n  * Many testcases to try out your own implementation\n  * Example of OpenBSD's signify application (generates and verifies Ed25519\n    signatures, but doesn't support key encryption)\n  * X-coordinate-only scalar multiplication on Short Weierstrass curves\n  * Clean, well-documented Python3 code\n  * Sage scripts that perform an invalid point attack using a vulnerable\n    X-only-ladder implementation of toyecc\n\n## License\nGNU GPL-3.\n\n\n",
    "bugtrack_url": null,
    "license": "gpl-3.0",
    "summary": "Elliptic Curve Cryptography playground/toolkit written in pure Python",
    "version": "0.0.8",
    "split_keywords": [
        "elliptic",
        "curve",
        "cryptography",
        "ed25519",
        "ecdsa",
        "ecdh",
        "montgomery",
        "edwards",
        "weierstrass"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "e30be186decbf3ee524c4b8180bdda6a",
                "sha256": "bd93425dba589fe08d3889e9f8a26c81bcd50601770d39b0f79a32a88b5783ee"
            },
            "downloads": -1,
            "filename": "toyecc-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "e30be186decbf3ee524c4b8180bdda6a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 114894,
            "upload_time": "2022-12-05T08:21:23",
            "upload_time_iso_8601": "2022-12-05T08:21:23.783755Z",
            "url": "https://files.pythonhosted.org/packages/3b/14/c16cb6be10f00f438c02a3572280a09335a1acd710b476bb7ecec24c8791/toyecc-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-05 08:21:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "johndoe31415",
    "github_project": "toyecc",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "lcname": "toyecc"
}
        
Elapsed time: 0.02033s