Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: posion on March 18, 2020, 08:22:05 AM



Title: Just multiply the point by 2^-1 (mod n)
Post by: posion on March 18, 2020, 08:22:05 AM
x =  f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9
y =  388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672
 how to get x coordinate x how to code in python
 

x = c62c910e502cb615a27c58512b6cc2c94f5742f76cb3d12ec993400a3695d413
y = 17f3dadd767275ddd3b23f46723631778bf01dadaebb9a953cf068712457c010


Title: Re: Just multiply the point by 2^-1 (mod n)
Post by: BrewMaster on March 18, 2020, 05:09:23 PM
check out python-ecdsa code on GitHub: https://github.com/warner/python-ecdsa i believe this is also what Electrum used for a long time.
it has all the functions you want including an inverse_mod(a, m) in its numbertheory.py file.