pyvecc


Namepyvecc JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/pglen/pyvecc
SummaryPure Python implementation of an elliptic curve cryptosystem based on FIPS 186-3
upload_time2024-02-27 18:10:03
maintainer
docs_urlNone
authorpeterglen99@gmail.com
requires_python
licenseMIT
keywords simple elliptic curve cryptosystem
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyvecc

## Elliptic curve FIPS 186-3

Cloned from the ecc project

Pure Python implementation of an elliptic curve cryptosystem based on FIPS 186-3
Cloned from the ecc project

This is an adaptation from the original to Python Version 3.
Also added test suite.

### Timings / Performance:

    Key generation

    192 bits     0.15692 seconds   637.26951/sec
    224 bits     0.19632 seconds   509.36798/sec
    256 bits     0.25150 seconds   397.61599/sec
    384 bits     0.53108 seconds   188.29529/sec
    521 bits     1.10281 seconds    90.67742/sec

    Signing

    192 bits     0.16258 seconds   615.06642/sec
    224 bits     0.21078 seconds   474.42906/sec
    256 bits     0.26684 seconds   374.75208/sec
    384 bits     0.54190 seconds   184.53698/sec
    521 bits     1.08671 seconds    92.02118/sec

    Verifying

    192 bits     0.20362 seconds   491.11330/sec
    224 bits     0.26438 seconds   378.24961/sec
    256 bits     0.31328 seconds   319.20826/sec
    384 bits     0.68741 seconds   145.47447/sec
    521 bits     1.39412 seconds    71.72986/sec

    Encrypting

    192 bits     0.00326 seconds  30689.28075/sec
    224 bits     0.00410 seconds  24365.65586/sec
    256 bits     0.00512 seconds  19532.92041/sec
    384 bits     0.01096 seconds  9122.01827/sec
    521 bits     0.02173 seconds  4601.03554/sec

    Decrypting

    192 bits     0.00178 seconds  56306.94053/sec
    224 bits     0.00220 seconds  45407.64317/sec
    256 bits     0.00268 seconds  37302.59694/sec
    384 bits     0.00549 seconds  18230.55592/sec
    521 bits     0.01075 seconds  9300.21508/sec

### Getting Started

    org2 = Random.new().read(80)
    org = base64.b64encode(org2)

        ttt = time.time()
        k = Key.generate(256)
        print("key gen time %.3fms" % ((time.time() - ttt) * 1000) )

        print("org:")
        print(org2)
        ttt = time.time()
        sss = k.encrypt(org)
        print("encrypt time %.3fms" % ((time.time() - ttt) * 1000) )

        ttt = time.time()
        ddd = k.decrypt(sss)
        print("decypt time %.3fms" % ((time.time() - ttt) * 1000) )

        ddd2 = base64.b64decode(ddd)
        print("dec:")
        print(ddd2)

### The above command will print:

    key gen time 2.669ms
    org:
    b'\xdb\xef\xcf\xdc\xc3\x03\x0e\xfd\x05\x9c\x8b\xba\xa8\x05\x0e\xd7\x9d(1\xb2\x80\x80t\xd05\xed\x8f\xa4\x81\xa7'
    encrypt time 5.411ms
    decypt time 2.803ms
    dec:
    b'\xdb\xef\xcf\xdc\xc3\x03\x0e\xfd\x05\x9c\x8b\xba\xa8\x05\x0e\xd7\x9d(1\xb2\x80\x80t\xd05\xed\x8f\xa4\x81\xa7'

#### PyTest results
    ============================= test session starts ==============================
    platform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.0.0
    rootdir: /home/peterglen/pgpygtk/pyvecc
    collected 2 items

    test_encdec.py .                                                         [ 50%]
    test_gen.py .                                                            [100%]


### Revisions:

    rev 0.0.2  Tue 27.Feb.2024     Initial

## Errata:

  Ported from Python 2 ... Not all is carried over. This port is not 8 bit clean
but can be used with a help of hexify utils like base64.

// EOF

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pglen/pyvecc",
    "name": "pyvecc",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "simple elliptic curve cryptosystem",
    "author": "peterglen99@gmail.com",
    "author_email": "peterglen99@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d6/6b/3f04e78d0368b53cd307168a2a1a77878643d7dc79a26e5e23afdb3d3e71/pyvecc-0.0.2.tar.gz",
    "platform": null,
    "description": "# pyvecc\n\n## Elliptic curve FIPS 186-3\n\nCloned from the ecc project\n\nPure Python implementation of an elliptic curve cryptosystem based on FIPS 186-3\nCloned from the ecc project\n\nThis is an adaptation from the original to Python Version 3.\nAlso added test suite.\n\n### Timings / Performance:\n\n    Key generation\n\n    192 bits     0.15692 seconds   637.26951/sec\n    224 bits     0.19632 seconds   509.36798/sec\n    256 bits     0.25150 seconds   397.61599/sec\n    384 bits     0.53108 seconds   188.29529/sec\n    521 bits     1.10281 seconds    90.67742/sec\n\n    Signing\n\n    192 bits     0.16258 seconds   615.06642/sec\n    224 bits     0.21078 seconds   474.42906/sec\n    256 bits     0.26684 seconds   374.75208/sec\n    384 bits     0.54190 seconds   184.53698/sec\n    521 bits     1.08671 seconds    92.02118/sec\n\n    Verifying\n\n    192 bits     0.20362 seconds   491.11330/sec\n    224 bits     0.26438 seconds   378.24961/sec\n    256 bits     0.31328 seconds   319.20826/sec\n    384 bits     0.68741 seconds   145.47447/sec\n    521 bits     1.39412 seconds    71.72986/sec\n\n    Encrypting\n\n    192 bits     0.00326 seconds  30689.28075/sec\n    224 bits     0.00410 seconds  24365.65586/sec\n    256 bits     0.00512 seconds  19532.92041/sec\n    384 bits     0.01096 seconds  9122.01827/sec\n    521 bits     0.02173 seconds  4601.03554/sec\n\n    Decrypting\n\n    192 bits     0.00178 seconds  56306.94053/sec\n    224 bits     0.00220 seconds  45407.64317/sec\n    256 bits     0.00268 seconds  37302.59694/sec\n    384 bits     0.00549 seconds  18230.55592/sec\n    521 bits     0.01075 seconds  9300.21508/sec\n\n### Getting Started\n\n    org2 = Random.new().read(80)\n    org = base64.b64encode(org2)\n\n        ttt = time.time()\n        k = Key.generate(256)\n        print(\"key gen time %.3fms\" % ((time.time() - ttt) * 1000) )\n\n        print(\"org:\")\n        print(org2)\n        ttt = time.time()\n        sss = k.encrypt(org)\n        print(\"encrypt time %.3fms\" % ((time.time() - ttt) * 1000) )\n\n        ttt = time.time()\n        ddd = k.decrypt(sss)\n        print(\"decypt time %.3fms\" % ((time.time() - ttt) * 1000) )\n\n        ddd2 = base64.b64decode(ddd)\n        print(\"dec:\")\n        print(ddd2)\n\n### The above command will print:\n\n    key gen time 2.669ms\n    org:\n    b'\\xdb\\xef\\xcf\\xdc\\xc3\\x03\\x0e\\xfd\\x05\\x9c\\x8b\\xba\\xa8\\x05\\x0e\\xd7\\x9d(1\\xb2\\x80\\x80t\\xd05\\xed\\x8f\\xa4\\x81\\xa7'\n    encrypt time 5.411ms\n    decypt time 2.803ms\n    dec:\n    b'\\xdb\\xef\\xcf\\xdc\\xc3\\x03\\x0e\\xfd\\x05\\x9c\\x8b\\xba\\xa8\\x05\\x0e\\xd7\\x9d(1\\xb2\\x80\\x80t\\xd05\\xed\\x8f\\xa4\\x81\\xa7'\n\n#### PyTest results\n    ============================= test session starts ==============================\n    platform linux -- Python 3.10.12, pytest-7.4.3, pluggy-1.0.0\n    rootdir: /home/peterglen/pgpygtk/pyvecc\n    collected 2 items\n\n    test_encdec.py .                                                         [ 50%]\n    test_gen.py .                                                            [100%]\n\n\n### Revisions:\n\n    rev 0.0.2  Tue 27.Feb.2024     Initial\n\n## Errata:\n\n  Ported from Python 2 ... Not all is carried over. This port is not 8 bit clean\nbut can be used with a help of hexify utils like base64.\n\n// EOF\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Pure Python implementation of an elliptic curve cryptosystem based on FIPS 186-3",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/pglen/pyvecc"
    },
    "split_keywords": [
        "simple",
        "elliptic",
        "curve",
        "cryptosystem"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "667f3836c51ceb28e836c89703545e4206b88a8bd6029e79ae4575906add2835",
                "md5": "5b5d2d864efdbe0c4bdd0eb5033918e5",
                "sha256": "f5fc97aa7c75d99ba425a74e57ed17ad79ef84eedcbeccd979c974a20f2db297"
            },
            "downloads": -1,
            "filename": "pyvecc-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b5d2d864efdbe0c4bdd0eb5033918e5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 24508,
            "upload_time": "2024-02-27T18:10:00",
            "upload_time_iso_8601": "2024-02-27T18:10:00.170274Z",
            "url": "https://files.pythonhosted.org/packages/66/7f/3836c51ceb28e836c89703545e4206b88a8bd6029e79ae4575906add2835/pyvecc-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d66b3f04e78d0368b53cd307168a2a1a77878643d7dc79a26e5e23afdb3d3e71",
                "md5": "025725778d90ca61116cd0aa02cf6f2e",
                "sha256": "b28775191355a90ac21cf21f98051172ee1fe9c2ec7c73ed042ca13cfd23a728"
            },
            "downloads": -1,
            "filename": "pyvecc-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "025725778d90ca61116cd0aa02cf6f2e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 23429,
            "upload_time": "2024-02-27T18:10:03",
            "upload_time_iso_8601": "2024-02-27T18:10:03.423464Z",
            "url": "https://files.pythonhosted.org/packages/d6/6b/3f04e78d0368b53cd307168a2a1a77878643d7dc79a26e5e23afdb3d3e71/pyvecc-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-27 18:10:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pglen",
    "github_project": "pyvecc",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "pyvecc"
}
        
Elapsed time: 0.73190s