A Cairo implementation of common elliptic curve, can be used with different parameters for different curves.
For now, it only support 256-bit curve.
We use Python to compute the complex field computing, and verify the correctness in Cairo. Especially, we use ff-cairo do finite field operations.
All common elliptic curve Cairo implementations are in ec
directory.
See examples/example.cairo for some examples of usage of this repo, i.e. Secp256k1 or NIST P-256.
Developers should change domain parameters in ec/param_def.cairo for different curves, and use different test data in example.
Parameters is in 3-limbs format, each limb is in range of [0, 2^86), you can use split.py
to split a big number into 3 limbs.
MIT License © EulerSmile