You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On NEO2 the VM used to be the major performance bottleneck. Now that this is resolved for NEO3 through a C-extension a place with room for performance is in signature verification.
The current pure Python ECC implementation comes from neo-python and works fine but is slow. An issue about replacing that implementation existed for neo-python but was dropped to focus on more important issues. At the time also most considered ECC packages did not seem suitable. This was 2+ years ago and available libraries have evolved.
The requirements have not changed much
support custom curves (as we never know what NEO will change to)
support point on curve validation
support ECPoint loading from binary data (not PEM/DER format)
is a pure Python implementation, but if it detects gmpy2 it will use that for arithmetic speeding it up massively. With gmpy2 it is supposedly 3 x faster than fast-ecdsa. gmpy2 is supported on all platforms and has wheels for Windows. The downside is that you'll need to have build tools for OSX/Linux
signing key can be made deterministic which is nice for unittests
need to try creating a custom curve to see how/if that works
sacrifices side-channel resistance for speed. This is good for our purpose
note that we already use this package for signature verification, but ideally we also use it in signing and all other parts. Meaning among others we wrap Point into ECPoint and inherit from ISerializable.
Do our own in C++ (or port the NEO version to C++) and wrap it with pybind11.
the pro is that we can create wheels for all platforms thus not needing any compilers.
the downside is that it takes significantly more time to create and adds maintenance
fast-ecdsa is not considered because that has side channel resistance which results in being slower than python-ecdsa. Speed for us is more important.
The text was updated successfully, but these errors were encountered:
On NEO2 the VM used to be the major performance bottleneck. Now that this is resolved for NEO3 through a C-extension a place with room for performance is in signature verification.
The current pure Python ECC implementation comes from
neo-python
and works fine but is slow. An issue about replacing that implementation existed forneo-python
but was dropped to focus on more important issues. At the time also most considered ECC packages did not seem suitable. This was 2+ years ago and available libraries have evolved.The requirements have not changed much
The options
gmpy2
it will use that for arithmetic speeding it up massively. Withgmpy2
it is supposedly 3 x faster thanfast-ecdsa
.gmpy2
is supported on all platforms and has wheels for Windows. The downside is that you'll need to have build tools for OSX/LinuxPoint
intoECPoint
and inherit fromISerializable
.fast-ecdsa
is not considered because that has side channel resistance which results in being slower thanpython-ecdsa
. Speed for us is more important.The text was updated successfully, but these errors were encountered: