Skip to content

bartvm/pyring

Repository files navigation

Ring signatures

This is an imlementation of one-time ring signatures in Python. Ring signatures allow a user to sign a message as a member of a group, without revealing their identity. One-time ring signatures are a type of ring signature where multiple signatures of the same user can be identified as such.

One-time ring signatures are described in a CryptoNote whitepaper and the accompanying CrypteNote standard (CC BY-SA 3.0). An implementation can be found in the reference code of the CryptoNote protocol (MIT/X11).

Implementation

This implementation follows the white-paper and CryptoNote implementation closely. The arithmetic is performed on the Ed25519 curve using Sodium (ISC licensed). Sodium 1.0.18 is included with the package.

Installation and usage

Clone the repository (including the Sodium submodule) and use setup.py to install the package.

git clone --recurse-submodules https://github.com/bartvm/pyring.git
python setup.py install

Alternatively, use python setup.py build and python setup.py develop to build the library in-place.

A simple command line interface is provided:

ring-keygen  # Generate a key pair
head -c 100 < /dev/urandom > message  # Generate a random message
ring-sign message ringkey ringkey.pub ringkey2.pub > ring.sig  # Sign the message against two public keys
ring-verify message - < ring.sig  # Verify that the signature is correct

Disclaimer

This is not an officially supported Google product.

About

Ring signature implementations in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published