very dirty prototype. python-crypto needed