Closed CPerezz closed 5 years ago
With e935456:
Doubling is the only operation that has been both implemented and tested.
Mul is implemented with the double_and_add
algorithm.
It relies on addition and doubling, so due to the first
dependency, it cannot be tested yet.
Addition has not been implemented yet since we need to figure out the mapping between the isomorphic twist addition and the Doppio addition (both in TwEds Extended Coords)
Tests implemented in 252f782 proved that Addp
and Mul
impl are working as expected.
Reviewing the Ristretto implementation, and working also on #78 and #76 at the same time, I realized that the implementation done for Ristretto Point ops was not correct because:
This is correct, if you're working with an
a
andd
values that satisfy the Ristretto constraints/requirements(a-d) is Quadratic Residue
. But in our case, since we chose the @ebfull tweet parameters which do not satisfy the Ristretto req. we also use anotherd
value for ourRistrettoPoint
which is different from the one used onEdwardsPoint
formulas.This causes:
RISTRETTO_D
instead ofEDWARDS_D
. (That's how it is implemented).RistrettoPoint
operations cannot rely onEdwardsPoint
ones because they are already mapped to a differentd
.That second thing was not considered at the beginning and so we need to refactor it.