Skip to content

EulerSmile/common-ec-cairo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

common-ec-cairo

A Cairo implementation of common elliptic curve, can be used with different parameters for different curves.

For now, it only support 256-bit curve.

🎉🎉 The code we implemented in this library was officially adopted by Cairo and added to the core code base, see Cairo v0.8.2 release log.

Outsourcing computing

We use Python to compute the complex field computing, and verify the correctness in Cairo. Especially, we use ff-cairo do finite field operations.

How to use it?

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.

License

MIT License © EulerSmile

About

A Cairo implementation of common Elliptic Curve.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages