python-cryptoplus
python-cryptoplus copied to clipboard
Change python_Serpent implementation
python_Serpent uses pyserpent.py found on http://www.cl.cam.ac.uk/~fms27/serpent/. It is human readable but extremely slow.
I replaced pyserpent.py with serpent.py. Though the writer of this code says "These implementations are converted directly from the C code and are thus very ugly Python, but the code works although it’s slow," it is 250x faster than pyserpent.py I expect.
I made it more readable on https://github.com/doegox/python-cryptoplus/commit/2086c2099f8376ccd2f2a9a2e7cb4d837f1a3386, it still runs 200x faster than pyserpent.py.
In the same way as #5, new version of serpent.py runs on Python 2.7 and Python 3.5.