arkworks-rs / curves

Implementations of popular elliptic curves
https://www.arkworks.rs
Apache License 2.0
303 stars 103 forks source link

Add Grumpkin support for arkworks #174

Closed CPerezz closed 1 year ago

CPerezz commented 1 year ago

This PR adds the Grumpkin curve to the workspace to make the Bn254 half-pairing cycle avaliable. The PR has been build following the exact same form on which @daira build both pallas and vesta libs inside of the workspace. So that there's a uniform way to implement curve cycles.

Resolves: https://github.com/arkworks-rs/curves/issues/173

This also resolves: https://github.com/privacy-scaling-explorations/folding-schemes/issues/12 which unblocks EVM verification for Nova folding via Cyclefold.

TODO:

Pratyush commented 1 year ago

Thanks for the PR!

wyattbenno777 commented 1 year ago

How does one use this in a cargo.toml?

ark-grumpkin = "0.4.0"

wyattbenno777 commented 1 year ago

Never mind. I got it.

` ark-bn254 = { version = "^0.4.0", default-features = false, features = [ "curve" ] } ark-grumpkin = { version = "^0.4.0", default-features = false }

[patch.crates-io] ark-ff = { git = "https://github.com/arkworks-rs/algebra/" } ark-ec = { git = "https://github.com/arkworks-rs/algebra/" } ark-poly = { git = "https://github.com/arkworks-rs/algebra/" } ark-serialize = { git = "https://github.com/arkworks-rs/algebra/" } ark-grumpkin = { path = "./curves/grumpkin" } ark-bn254 = { path = "./curves/bn254" }`

CPerezz commented 1 year ago

How does one use this in a cargo.toml?

ark-grumpkin = "0.4.0"

If the crate isn't released yet, I think you need to import from git in the Cargo.toml.