Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 293f9cd Apr 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
curve
.gitignore Initial commit Dec 29, 2014
LICENSE
MANIFEST.in
README.md Merge branch 'master' of github.com:tgalal/python-axolotl-curve25519 Dec 31, 2014
curve25519module.c Fixed differ in signedness [-Wpointer-sign] warning Feb 15, 2015
setup.py

README.md

This is python wrapper for curve25519 library with ed25519 signatures. The C code was pulled from libaxolotl-android At the moment this wrapper is meant for use by python-axolotl and provides the following methods only:

import axolotl_curve25519 as curve
import os

randm32 = os.urandom(32)
randm64 = os.urandom(64)

private_key = curve.generatePrivateKey(randm32)
public_key = message = curve.generatePublicKey(private_key)

agreement = curve.calculateAgreement(private_key, public_key)
signature = curve.calculateSignature(randm64, private_key, message)
verified = curve.verifySignature(public_key, message, signature) == 0

Installation

Linux

You need to have python headers installed, usually through installing package called python-dev, then as superuser run:

python setup.py install

Windows

  • Install mingw compiler
  • Add mingw to your PATH
  • In PYTHONPATH\Lib\distutils create a file called distutils.cfg and add these lines:
[build]
compiler=mingw32
  • Install gcc: mingw-get.exe install gcc
  • Install zlib zlib
  • python setup.py install
You can’t perform that action at this time.