-
-
Notifications
You must be signed in to change notification settings - Fork 669
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
Update secp256k1-zkp #2261
Update secp256k1-zkp #2261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
untested ACK
does this mean that the binary size is ~same as before? |
I suppose so but I didn't test it.
Yes, this is exactly what happened. |
This PR doesn't seem to change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Just two details:
- We can probably remove the reference to gen_context.o from core/embed/rust/build.rs.
- See below.
Yes, that is true. Done in d24d4a4. |
d24d4a4
to
f642c1e
Compare
37d99c4
to
1624d7c
Compare
TLDR
This PR updates the
secp256k1-zkp
submodule and fixes #2085.Details
secp256k1-zkp
submodule. Some configuration options were removed and the way the precomputed tables are generated changed:USE_NUM_NONE
,USE_FIELD_INV_BUILTIN
andUSE_SCALAR_INV_BUILTIN
were removed in BlockstreamResearch/secp256k1-zkp@1f233b3. Since then the default behaviour is as these options were set.DUSE_FIELD_10X26
andDUSE_SCALAR_8X32
enforce the use of the 32 x 32 bit multiplication. These options were replaced with the optionSECP256K1_WIDEMUL_INT64
in BlockstreamResearch/secp256k1-zkp@79f1f7a. This option is autmatically set if__SIZEOF_INT128__
is not defined, which is our case, and that implies the 32 x 32 bit multiplication is used.USE_ECMULT_STATIC_PRECOMPUTATION
was removed in BlockstreamResearch/secp256k1-zkp@22dc2c0. Since then the default behaviour is as this option was set, that is some tables are precomputed in compile time (instead of in run time). Since BlockstreamResearch/secp256k1-zkp@22dc2c0 the tables are included in the repository, that is there is no need to precompute them in compile-time.