python-cryptoplus icon indicating copy to clipboard operation
python-cryptoplus copied to clipboard

Change python_Serpent implementation

Open koujiandou-mhfg opened this issue 9 years ago • 0 comments

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.

koujiandou-mhfg avatar Nov 21 '16 01:11 koujiandou-mhfg