Skip to content

TomCrypto/pycurve25519

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

pycurve25519

Python 2.7 wrapper for curve25519 (based on curve25519-donna).

Usage

import curve25519

# Generate two private keys
privateA = curve25519.genkey()
privateB = curve25519.genkey()

# Obtain the equivalent public keys
publicA = curve25519.public(privateA)
publicB = curve25519.public(privateB)

# Compute the shared secret (sharedA == sharedB)
sharedA = curve25519.shared(privateA, publicB)
sharedB = curve25519.shared(privateB, publicA)

# Pass the shared secret in a KDF or other before use

Installation

python setup.py build
python setup.py install
python test_curve25519.py

About

Python 2.7 (experimental 3.x) wrapper for curve25519

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published