# crypto/edwards25519: correctly flip the Y sign in the H2C operation · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/bd8b94bd0ec592b62b8ae5637375a8d79cbe3e3b)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: bd8b94bd0ec592b62b8ae5637375a8d79cbe3e3b

Requested commit: bd8b94bd0ec592b62b8ae5637375a8d79cbe3e3b

Commit: bd8b94bd0ec592b62b8ae5637375a8d79cbe3e3b

Tree: 7e3e9de3eedaa71f1131f64f5928c33df35baf4e

Author: Frank Denis

Committer: Frank Denis

## Message

```
crypto/edwards25519: correctly flip the Y sign in the H2C operation

No security implications, but the current hash-to-curve standard
defines the sign of the Y coordinate to be negative if `gx1`
is a square, positive otherwise.

We were doing it the other way round.

```

## Parents

- [6b5e403e5dcdd55baf318e8734b77ce4bc635fe9](https://git.cafe/gitcafe/zig/commit/6b5e403e5dcdd55baf318e8734b77ce4bc635fe9?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/bd8b94bd0ec592b62b8ae5637375a8d79cbe3e3b?format=markdown)
