-
Notifications
You must be signed in to change notification settings - Fork 120
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
Stable wNAF API #27
Comments
Is this just a matter of being able to preprocess the exponent into wNAF form (so that it can be reused)? If so then perhaps the API does not need to specify that it is wNAF, so that other things like mbwNAF can be implemented later. |
Also, consider having separate APIs for constant-time and variable-time (or side-channel resistant and non-side-channel-resistant). |
There are many use cases for wNAF (MPC, solo paramgen, multiexp perhaps, verification) but various ways of interacting and sharing allocated space for window tables and wNAF-form scalars across threads, and it's a little bit tricky to balance all of these requirements for a nice clean API. In particular, I want it to be impossible to accidentally use the wrong window table sizes in these different contexts. I know there's a nice API to do it, I just haven't come up with it yet. :) |
Alright, I have a mockup of something that may work. It's similar to what I originally wrote for bellman a while back. There's a Once you have one of these objects with a defined window size, you can call All using the typesystem, no unsafe code:
|
Introduce a more typesafe wNAF API, and remove the unstable-wnaf feature Closes #27.
Introduce a more typesafe wNAF API, and remove the unstable-wnaf feature Closes #27.
Introduce a more typesafe wNAF API, and remove the unstable-wnaf feature Closes #27.
Introduce a more typesafe wNAF API, and remove the unstable-wnaf feature Closes #27.
Currently you have to opt-in to it because it's a low level API. I want a simple API that you cannot misuse.
The text was updated successfully, but these errors were encountered: