Standalone
Implementing Elliptic Curves
Part III
Affine ↔ Jacobian Coordinates
We only have to implement 2 more functions for ObsidianGates
to work. The contract accepts a signature , where (rx, ry)
is an affine point. Key holders are also represented as a mapping of affine points.
Hence, our elliptic curve library must support the conversion of points between the affine space and Jacobian space. We wish to implement the following 2 functions.
Function | Description |
| Projects an affine point into the Jacobian space. |
| Converts a Jacobian point back into the affine space. |
Your Task
In contracts/EllipticCurve.sol
, implement the logic for affineToJac
and jacToAffine
. These functions must be implemented efficiently.
After that, the ObsidianGates
should open to the city's key bearers again!
Run tests in Questplay
Submit work in Questplay
You are nearly there. The door begins to glow with fresh runes. Now to complete your task...