Skip to main content

Python Elliptic Curve Arithmetic Library.

Project description

ECCArithmetic

Installation

pip install ECCArithmetic

Generate the Curve

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)

PickGenerator

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)
G = Curve.pickGenerator()

PickPoint

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)
P = Curve.pickPoint()

isPointOnEC

Multiplication is realised with the double and add algorithm.

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)
G = Curve.isPointOnEC([14967, 14215])

Identity Element

from ECCArithmetic.ec import *

O = ECPt.identity()

Find All Points

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)
all = Curve.enumerateAllPoints()

Addition

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)
P = Curve.pickPoint()
Q = Curve.pickPoint()

S = P + Q

Subtraction

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)
P = Curve.pickPoint()
Q = Curve.pickPoint()

S = P - Q

Multiplication

from ECCArithmetic.ec import *

Curve = EC(0, 5, 2, 23981)
P = Curve.pickPoint()
Q = Curve.pickPoint()

S = P * Q

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ECCArithmetic, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size ECCArithmetic-1.0.0-py3-none-any.whl (16.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ECCArithmetic-1.0.0.tar.gz (14.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page