mirror of
https://github.com/saymrwulf/curve25519-dalek-source.git
synced 2026-09-10 21:21:13 +00:00
Reduce field elements during conversion to vector form.
The IFMA types have tighter bounds than the u64 types.
This commit is contained in:
parent
3f21bb3b58
commit
a62571b003
1 changed files with 2 additions and 1 deletions
|
|
@ -29,7 +29,8 @@ impl From<edwards::EdwardsPoint> for ExtendedPoint {
|
||||||
|
|
||||||
impl From<ExtendedPoint> for edwards::EdwardsPoint {
|
impl From<ExtendedPoint> for edwards::EdwardsPoint {
|
||||||
fn from(P: ExtendedPoint) -> edwards::EdwardsPoint {
|
fn from(P: ExtendedPoint) -> edwards::EdwardsPoint {
|
||||||
let tmp = P.0.split();
|
let reduced = F51x4Reduced::from(P.0);
|
||||||
|
let tmp = F51x4Unreduced::from(reduced).split();
|
||||||
edwards::EdwardsPoint {
|
edwards::EdwardsPoint {
|
||||||
X: tmp[0],
|
X: tmp[0],
|
||||||
Y: tmp[1],
|
Y: tmp[1],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue