Skip to main content
3 events
when toggle format what by license comment
Mar 2, 2023 at 23:12 comment added Pieter Wuille Yes, and the code you mailed me, and the answer in that linked question, does not compute a modular inverse; it doesn't exist. It's solving equations of the form ax = b mod m, and these have only solutions if b is a multiple of gcd(a,m). In your case, b must be even at the very least. The modular inverse, corresponding to the case b=1, is not that.
Mar 2, 2023 at 23:05 comment added Alfhilðr ínn Seiðkona I just emailed you the Python code. Also, this is the link to what I was referring: math.stackexchange.com/questions/1015552/…
Mar 2, 2023 at 21:00 history answered Pieter Wuille CC BY-SA 4.0