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
Just to avoid Point Doubling inside, Adding G + 2G, here they are :
python -m timeit -s "from coincurve import PrivateKey,PublicKey;pub_key2=PrivateKey.from_int(2).public_key;pub_key1=PrivateKey.from_int(1).public_key;keys=[pub_key1, pub_key2]" "PublicKey.combine_keys(keys)"
50000 loops, best of 5: 8.41 usec per loop
python -m timeit -s "import gmp_ec as ec;pub_key1=ec.G;pub_key2=ec.Scalar_Multiplication(2)" "ec.Point_Addition(pub_key1, pub_key2)"
50000 loops, best of 5: 3.9 usec per loop
Your library performance is Very good for Scalar Multiplication. But i am trying for Point Addition and getting slower speed.
pub1 = bit.Key.from_int(1)._pk.public_key
timeit pub1.combine_keys([pub1, pub1])
8.81 µs ± 287 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
In comparison, by using gmpy2 with https://github.com/iceland2k14/bsgs/blob/main/gmp_ec.py
timeit ec.G + ec.G
6.56 µs ± 106 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)
Maybe i am not trying in proper way to do Point Addition with bit or coincurve. Can you please show ?
The text was updated successfully, but these errors were encountered: