# Birational transformation from Edwards curve with not square d to Edwards curve with square d

How can I transform a complete twisted Edwards curve $$ax^2+y^2 = 1+dx^2y^2$$ with not square $$d$$ and square $$a$$ into an isomorphic Edwards curve $$X^2+Y^2 = 1+DX^2Y^2$$ with a square $$-D$$ i.e. $$D = -r^2$$?

I tried to set $$X = \frac{x}{\sqrt{a}}; Y=y$$, but $$-\frac{d}{a}$$ is also a non square (at least for Edwards25519). This answer is not working as well (i.e. $$-1/d$$ is not a square), because $$-1$$ is square.

Is it even possible to do such a transformation?

• If your number $d$ is not a square, you can always work in the extension field, where the square does exist. E.g. work in $F[u]/(u^2-d)$, where $F$ is your original field. Commented Nov 17, 2021 at 17:12
• @Fractalice, Thanks! However, I'm not sure it will work for the injective encoding I'm implementing (eprint.iacr.org/2013/373.pdf). Is there any other way? Btw, how to find $u$? Is it a square root of something? Commented Nov 17, 2021 at 17:47