Skip to content
/ wcurve Public

wcurve implements basic arithmetic operations on elliptic curves in short Weiertsraß form.

License

Notifications You must be signed in to change notification settings

seb-m/wcurve

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wcurve

Description

This package implements basic arithmetic operations such as point addition and single-scalar multiplication on elliptic curves in short Weiertsrass form.

Example

import wcurve, random
# Instantiate secp256r1 standardized curve
curve  = wcurve.secp256r1_curve()
# Generate a new secret value
sk = random.SystemRandom().randint(1, curve.n - 1)
# Compute the public key associated to the previous secret
pk = sk * curve.base_point
# Get its affine coordinates
pkx, pky = pk.to_affine()

Install

# From tarball
$ sudo python setup.py install
# Or with setuptools
$ sudo easy_install wcurve

Run tests

$ make test

Build Documentation

The current documentation is built with Sphynx, just use this command to generate it:

$ cd doc/ && make html

About

wcurve implements basic arithmetic operations on elliptic curves in short Weiertsraß form.

Resources

License

Stars

Watchers

Forks

Packages

No packages published