doppio
doppio copied to clipboard
Add group ops
Added skeleton for group ops.
- Addition formula from section 3.1, a=-1 special case in https://eprint.iacr.org/2008/522.pdf
- Naive doubling and subtraction formulas
TODO (next PR?):
- actually get the right value for EDWARDS_D (waiting on field arithmetic code to be implemented)
Eventually we want to have impl From<[u8;32]> for EdwardsPoint
and impl Into<[u8;32]> for EdwardsPoint
(ie define a serialization format) but for the moment, to do testing, we could add a function that takes a y
value and a sign and tries to solve for (x,y)
using the sign parameter to distinguish between the two possible solutions (if there are any; if not we should return None
). The x
-recovery will probably be similar to the Ed25519 case, except that we need to check how to compute square roots of a ratio in the Doppio base field.
Alternately, we could try generating a single point in Sage and hardcoding it (and do the x-coordinate recovery later).