Python binding for libelligator
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
patches
src
tests
.gitignore
Makefile
README.md
setup.py

README.md

pyelligator - Python binding for libelligator

Alfonso De Gregorio (adg at secYOUre dot com)

What?

pyelligator is a Python binding for libelligator. Based on the code authored by agl in the ed25519/extra25519, libelligator is a C++ implementation of "Elligator: Elliptic-curve points indistinguishable from uniform random strings" for Curve25519.

Usage

import elligator

from os import urandom

# Generate keys
while True:
    private = urandom(32)
    (valid, public, representative) = elligator.scalarbasemult(private)
    if valid:
        break


# Convert a uniform representative value for Curve25519 public key, 
# as produced by scalarbasemult, to a Curve25519 public key
public = elligator.representativetopublic(representative)

Installation

make
make install
make test