AntonKueltz / fastecdsa

Python library for fast elliptic curve crypto
https://pypi.python.org/pypi/fastecdsa
The Unlicense
264 stars 77 forks source link

How is the performance boost achieved? #19

Closed bosswissam closed 6 years ago

bosswissam commented 6 years ago

Would be great to include how did you achieve the performance boost in the README, especially if the performance boost comes at the cost of something else - otherwise I wonder why python-ecdsa couldn't do the same thing if it's better in every way (perhaps just because it's less maintained?), if it's too good to be true...

Of course if the perf boost comes at no cost, would help to state that explicitly as well so it's clear.

Thanks!

AntonKueltz commented 6 years ago

python-ecdsa is written in pure python, this package is written using GMP, a C library specifically for big integer arithmetic. That's where the performance increase comes in. In general, C code is going to run a lot faster than python is.

bosswissam commented 6 years ago

Gotcha, thanks.