This code has not been formally audited by a cryptographer. It therefore should not be considered safe or correct. Use it at your own risk!
Read the Sphinx paper:
Sphinx: A Compact and Provably Secure Mix Format by Ian Goldberg and George Danezis
This is a crypto library for writing mix networks. The code was forked from Ian Goldberg's reference implementation.
This crypto library is binary compatible with the golang sphinx crypto library:
Both projects contain the same unit test vectors.
Pypi packages available
pip install sphinxmixcrypto
or install from github into a python virtual env
pip install git+https://github.com/applied-mixnetworks/sphinxmixcrypto.git