I'm using the Curve25519 code (from http://www.dlbeer.co.nz/oss/c25519.html), and trying to convert from a public signing key (Edwards form) to a public key-exchange key (Montgomery form). There's test code that does that, but it seems to extract the Y coordinate from the secret key, and if I had the secret key I wouldn't need to do this.
I'm a software developer, not a mathematician. I don't see how to go from a packed Ed25519 public key to the unpacked X and Y coordinates required for the conversion.
How can I split a packed Ed25519 public signing key into its X and Y coordinates?
I'm asking for the mathematical explanation and/or references to the functions in that package that will split the packed Ed25519 key into X and Y coordinates.
For reference, I've tried the
upp function to unpack the public key, and the
ed25519_try_unpack function. Both give the same (incorrect) value.