nisse@lysator.liu.se (Niels Möller) writes:
If we want to compute v = z^-1 (mod p), but in redc form with v' = vB and z' = zB, then we have
v z = 1 (mod p)
but
v' z' = B^2 (mod p)
So for redc curves we need to compute v' as
v' = (z' / B^2)^-1 (mod p)
I've pushed changes to do this to a new branch invert-with-redc. I think it makes things a bit simpler. I haven't yet looked at any benchmarks, but I'd hope to either see no change or an epsilon improvement.
Regards, /Niels