# edwards25519 fixes \(\#11568\) · gitcafe/zig

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

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

Visibility: public

Requested revision: 098bee0e5657bb6dcd92b2b2fa8056ffce893ffc

Requested commit: 098bee0e5657bb6dcd92b2b2fa8056ffce893ffc

Commit: 098bee0e5657bb6dcd92b2b2fa8056ffce893ffc

Tree: 3ff994f4705f5c0fb13f369ce8c1827a5b7b8fa4

Author: Frank Denis

Committer: GitHub

## Message

```
edwards25519 fixes (#11568)

* edwards25519: fix X coordinate of the base point

Reported by @OfekShochat -- Thanks!

* edwards25519: reduce public scalar when the top bit is set, not cleared

This is an optimization for the unexpected case of a scalar
larger than the field size.

Fixes #11563

* edwards25519: add a test implicit reduction of invalid scalars
```

## Parents

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

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