-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
point+point addition #210
Comments
not sure what you're attempting to do, but if you want the coordinates of the resulting point, you'll have to call
|
example work and result, pls correct above script for get result |
you mean, something like this?
|
yes, but you remove import gmpy2 |
yes, it will use gmpy2 when it's installed, irrespective if other modules load it but if speed is what you're after, you should use |
an other thing is gmpy2 you use, but not for inverse calc, 2nd is multiprocess capabilities for refrence, where gmpy2 uses for inverse too and multiprocess import in above script setting will help to load big lists and multiprocess will done job more fast |
no, the code does use gmpy2 for inverse modulo: and I did recently verify that it does use a special case algorithm for the x^-1 power: #204 (comment)
I can imagine using multiprocessing to calculate scalar multiply with precomputed multiples, but without precomputation? No, I don't think the point-double&add algorithm is parallelizable... |
prev i were useing fastecdsa lib in python script, now i tested with python-ecdsa, same speed work, how i could check if my script is useing gmpy2, or you know fastecdsa also useing gmpy2 |
As far as I know, fastecdsa 1.7.5 is slower than python-ecdsa 0.15 and later: AntonKueltz/fastecdsa#45. While fastecdsa doesn't use gmpy2 it does use libgmp, so in the end we both use the same arbitrary precision arithmetic library...
that seems unlikely, I don't see any configuration in which python-ecdsa performance would be equal to fastecdsa performance... even without gmpy2 python-ecdsa 0.15 and later should be faster
no, never used cupy, but it's compatible with numpy, not gmpy2; numpy is good for vector and matrix operations, gmpy2 is for arbitrary precision arithmetic, they target completely different problems finally, I don't think running a single scalar multiplication with CUDA would be faster than on a CPU, I'd be surprised if the communication overhead wouldn't kill any performance improvements now, you could use CUDA to perform multiple scalar multiplications at the same time, if you'd use Montgomery ladder for it, and Fermat's theorem for calculating inverses modulo, but you'd have to completely rewrite this library to do that—as this is a general-purpose ECC/ECDSA library, I'd consider addition of such code to it to be out of scope |
can i send you email at [email protected] for discus more ? |
|
pls someone can correct to get result
from ecdsa.curves import SECP256k1
from ecdsa.ellipticcurve import Point
from ecdsa import keys, curves
import gmpy2
x1 = 0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798
y1 = 0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8
S = Point(x1, y1)
S1 = S+S
print (S1)
The text was updated successfully, but these errors were encountered: