dalek-cryptography / bulletproofs

A pure-Rust implementation of Bulletproofs using Ristretto.
MIT License
1.03k stars 217 forks source link

Working over other curves #369

Closed ycscaly closed 1 year ago

ycscaly commented 1 year ago

Hey,

I'm implementing in Rust an MPC scheme which relies upon bulletproofs, and this crate seemed like the most appropriate.

However, I need my proofs to work over a different curve (specifically, I need a larger curve - on the order of 512bit and not 256bit. p521 came to mind, but we might be able to use other even a little smaller curves like curve448 which is a risteretto curve afaik, if that helps.)

I was wondering how difficult it would be to adapt this repo to work with another curve. I'll be willing to do the work and contribute back, if that's something you'll be interested in.

Thanks, Yehonatan

rubdos commented 1 year ago

@ycscaly I fear that it'll be quite some work, since this library is very much built on top of Curve25519-Dalek. You may have an easier way with https://github.com/FindoraNetwork/ark-bulletproofs/, which is based on Arkworks.

ycscaly commented 1 year ago

I see, thanks for the reply.

Why do you think then that it'll be easier to work with ark-bulletproofs? why would the fact that they're based on Arkworks help me (for they do not support the curve I need)?

rubdos commented 1 year ago

Why do you think then that it'll be easier to work with ark-bulletproofs? why would the fact that they're based on Arkworks help me (for they do not support the curve I need)?

Because implementing a curve in Arkworks is almost trivial (if it's short Weierstrass form or Edwards), and reworking ark-bulletproofs to be curve-agnostic sounds like a kinder endeavour as opposed to reworking this crate to be curve-agnostic, since the Arkworks ecosystem is really built for that purpose.

ycscaly commented 1 year ago

Thanks, that is indeed helpful! It seems like the right approach