Commit c190381
authored
elliptic-curve: expose
In the past we've deliberately avoided exposing the y-coordinate to
prevent the possibility of things like invalid curve attacks, although
with time we have exposed more and more to support things like
alternative point compression formats. See #1237 for some history.
We're now trying to use these traits with Edwards curves like Curve25519
(in `curve25519-dalek`) and Ed448-Goldilocks, which use compressed
Edwards y-coordinates as their compressed point format. That requires
y-coordinate access.
As such, this changes the previous `y_is_odd` method, which was used to
implement SEC1-like compressed points, to a full `fn y` which returns a
serialized field element for the y-coordinate.
Closes #1019AffineCoordinates::y (#1891)1 parent faf3f65 commit c190381
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
473 | 473 | | |
474 | 474 | | |
475 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
476 | 484 | | |
477 | 485 | | |
478 | 486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
0 commit comments