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.

Source Distribution

ECCArithmetic-1.0.0.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

ECCArithmetic-1.0.0-py3-none-any.whl (16.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page