Skip to content
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

Suggestions on adding precomputes for verification #653

Closed
xxuejie opened this issue Jul 30, 2019 · 2 comments
Closed

Suggestions on adding precomputes for verification #653

xxuejie opened this issue Jul 30, 2019 · 2 comments

Comments

@xxuejie
Copy link

xxuejie commented Jul 30, 2019

Hi there,

Right now secp256k1 has a ecmult-static-precomputation module which allows us to trade space for speed. However the precomputation is only activated in secp256k1_ecmult_gen_context used in signing part. In our case we want to enable the precomputation in secp256k1_ecmult_context used in verification part as well.

We do have a patch that is mostly working here, and we are interested in submitting it to upstream. However, the result here, is that a 512KB code size increase(actually 1MB if endomorphism is also enabled). So before wasting everyone's time, we want to first check the best possible way going forward here. Should we put it in a second flag so we can disable it by default and enable it on demand? Or is it good enough to share the same precomputation flag?

Many thanks!

@real-or-random
Copy link
Contributor

Thanks, great stuff. This is a related PR (abandoned but just because the creator is not working on it anymore):
#614
It introduces precomputed values only if the table is small, which may make more sense than a huge (1 MB) table.

@sipa
Copy link
Contributor

sipa commented Dec 26, 2021

I just stumbled upon this issue. It seems we did some double work in #956, but it does mean this can be now closed.

@sipa sipa closed this as completed Dec 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@xxuejie @sipa @real-or-random and others