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

[WIP] Update secp256k1 to btc v0.6.0 #7

Closed
wants to merge 5 commits into from
Closed

Conversation

joii2020
Copy link
Contributor

@joii2020 joii2020 commented Dec 11, 2024

Upgrade secp256k1 to use the official version.
Size: 121K -> 143K
Cycles 1.43M -> 1.40M (Take the average of multiple test_btc_success)

Comment on lines -43 to +39
$(SECP256K1_SRC_20210801):
cd deps/secp256k1-20210801 && \
./autogen.sh && \
CC=$(CC) LD=$(LD) ./configure --with-bignum=no --enable-ecmult-static-precomputation --enable-endomorphism --enable-module-recovery --host=$(TARGET) && \
make src/ecmult_static_pre_context.h src/ecmult_static_context.h

gcc -I deps/secp256k1-20210801/src -o $@ $<
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these line removed? New secp256k1 lib don't require config?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

precomputed_ecmult.c already exists in the repositorie and does not need to be regenerated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is too large, about 2.3M bytes. We need a smaller one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the exported secp256k1_data_20210801 is still 1M (1048576).
The size still needs to be controlled at around 20k? (ckb-auth)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's ok to have same size as before (1M).

@joii2020 joii2020 closed this Dec 18, 2024
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

Successfully merging this pull request may close these issues.

2 participants