Skip to content

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