-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test migration to ff crate #18
Comments
It seems that the only operations for free are those in the PrimeFieldRepr trait. If that's indeed the cases, and assuming more than that is needed, then I'm not convinced this is the right direction to take: the performance on those select operations is perhaps better than eg GMP and RAMP but it would probably not be the case moving to anything more advanced (not least since they'd have to be implemented afaict). I suspect that most of the benefits from having a common interface and implementation for various rings and fields can be achieved easily on top of eg GMP. |
@mortendahl Basically what you are saying is that once we will encounter a new required method that we will need to implement it will be 1)easier 2)more efficient to implement it directly on top of GMP than using the Question: looking at https://github.com/zkcrypto/ff/blob/master/ff_derive/src/lib.rs it seems that all the arithmetic we need for elliptic curves can be derived using the methods in the PrimeFieldRepr trait. This is also the main reason for interest in this interface imho - to be able to make our code work for all elliptic curves by just changing the EC parameters instead of using a different library with different interface for every curve. Intuitively there will be some performance degradations. |
it's good you insisted @omershlo! after having taken a second look I see we can also get the could a next step be to evaluate how well the operations of the current code base fits with what is offered by |
I suggest to use it in a isolated part of our code and see how it feels, we can start with that. If it make us remove significantly code we wrote (for instance in here: https://github.com/KZen-networks/cryptography-utils) or provides more ability / abstractions, then it is a win (assuming the crate is trustable and well maintained). |
See here ZenGo-X/curv#2. This will be our first POC. |
* Fix broken link to threshold signatures article (ZenGo-X#185) * Map errors instead of expecting * fix check warnings --------- Co-authored-by: Evan Tedesco <Evantedesco@gmail.com> Co-authored-by: 1xstj <106580853+1xstj@users.noreply.github.com>
https://github.com/zkcrypto/ff contain Traits and utilities for working with finite fields.
Before using it let's test how it can fits in our design. i.e. use it instead of mod_mul or mod_sub
The text was updated successfully, but these errors were encountered: