3 ms·
sage: p=2^255-19 sage: sqrt(GF(p)(-486664)) 6853475219497561581579357271197624642482790079785650197046958215289687604742 The formula in Wikipedia is no
by pbsd 9y ago
sage: p=2^255-19
sage: sqrt(GF(p)(-486664))
6853475219497561581579357271197624642482790079785650197046958215289687604742
The formula in Wikipedia is not wrong, but note that it maps E_{a,d} to M_{A, B} with B = 4/(a - d) = -486664. curve25519, and pretty much every Montgomery curve, is defined with B = 1, so you need some extra twisting to get there.
- loup-vaillant 9y agoExcellent, thank you. I'll get on it right away.