![](https://cdn.nodeguardians.io/backend-production/solidity_bg_fc76a87eed/solidity_bg_fc76a87eed.webp)
Standalone
Implementing Elliptic Curves
![](https://cdn.nodeguardians.io/backend-production/Implementing_Elliptic_Curves_part3_7eba69cc73/Implementing_Elliptic_Curves_part3_7eba69cc73.webp)
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
![](https://cdn.nodeguardians.io/backend-production/Implementing_Elliptic_Curves_part3_7eba69cc73/Implementing_Elliptic_Curves_part3_7eba69cc73.webp)
You are nearly there. The door begins to glow with fresh runes. Now to complete your task...