# Curve25519.fromEdwards25519\(\): don't assume normalized coordinates \(\#17920\) · gitcafe/zig

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

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

Visibility: public

Requested revision: a70d8d29d5895a8b44a86e8f065ee3ee59c9bfe8

Requested commit: a70d8d29d5895a8b44a86e8f065ee3ee59c9bfe8

Commit: a70d8d29d5895a8b44a86e8f065ee3ee59c9bfe8

Tree: e72871be6b35b0d5f431915b2e1faad34346aeb2

Author: Frank Denis

Committer: GitHub

## Message

```
Curve25519.fromEdwards25519(): don't assume normalized coordinates (#17920)

The low-level `Curve25519.fromEdwards25519()` function assumed
that the X/Y coordinates were not scaled (Z=1).

But this is not guaranteed to be the case.

In most real-world applications, the coordinates are freshly decoded,
either directly or via the `X25519.fromEd25519()` function, so this
is not an issue.

However, since we offer the ability to do that conversion after
arbitrary computations, the assertion was not correct.
```

## Parents

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

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