Reduce field elements during conversion to vector form.

The IFMA types have tighter bounds than the u64 types.
This commit is contained in:
Henry de Valence 2018-11-16 00:20:51 -08:00
parent 3f21bb3b58
commit a62571b003

View file

@ -29,7 +29,8 @@ impl From<edwards::EdwardsPoint> for ExtendedPoint {
impl From<ExtendedPoint> for 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 {
X: tmp[0],
Y: tmp[1],