elliptic-curves icon indicating copy to clipboard operation
elliptic-curves copied to clipboard

Optimize Montgomery to Edwards conversions

Open daxpedda opened this issue 7 months ago • 2 comments

This PR updates the Montgomery to Edwards isogeny mapping to a more optimized version. Notably reducing inversions from two to one.

This is currently only used for hash2curve, which actually has a more optimized mapping I will add in a different PR. This functionality will however be used when adding Montgomery to Edwards conversions in #1306.

daxpedda avatar Jul 19 '25 12:07 daxpedda

I'm a little confused what's happening here. The input and output types are both AffinePoint which is ostensibly the untwisted Edwards form. What is this isogeny between? It looks like you're computing the Montgomery coordinates from the Edwards affine ones?

tarcieri avatar Oct 30 '25 20:10 tarcieri

Indeed. As I was saying in the OP: this is currently only used in hash2curve.

This PR just improves existing code, I didn't add this function. But #1306 properly exposes this function to users and the Montgomery to Edwards conversion.

Alternatively we can just close this as this improvement is included in #1306.

daxpedda avatar Oct 30 '25 20:10 daxpedda