diff options
author | merge-script <fanquake@gmail.com> | 2024-05-22 08:50:42 +0100 |
---|---|---|
committer | merge-script <fanquake@gmail.com> | 2024-05-22 08:50:42 +0100 |
commit | 0388dd702b8d76c83bd17fc339d8c63904234fb0 (patch) | |
tree | e412803c6fc8c3339a728af715a7300870a3f054 /src/secp256k1/configure.ac | |
parent | 2ec0a28a37dbb50d463899f53c28fb96905d97b7 (diff) | |
parent | a057869aa3c42457570765966cb66accb2375b13 (diff) |
Merge bitcoin/bitcoin#30120: Update libsecp256k1 subtree to current master
a057869aa3c42457570765966cb66accb2375b13 build: pass --with-ecmult-gen-kb=86 to secp256k1 (fanquake)
ca3d945dc66e177e8fa3e83c77236de89cc0072a Squashed 'src/secp256k1/' changes from d8311688bd..06bff6dec8 (fanquake)
Pull request description:
This includes changes from the 0.5.0 release: https://github.com/bitcoin-core/secp256k1/releases/tag/v0.5.0
> New function secp256k1_ec_pubkey_sort that sorts public keys using lexicographic (of compressed serialization) order.
> The implementation of the point multiplication algorithm used for signing and public key generation was changed, resulting in improved performance for those operations.
> The related configure option --ecmult-gen-precision was replaced with --ecmult-gen-kb (ECMULT_GEN_KB for CMake).
> This changes the supported precomputed table sizes for these operations. The new supported sizes are 2 KiB, 22 KiB, or 86 KiB (while the old supported sizes were 32 KiB, 64 KiB, or 512 KiB).
ACKs for top commit:
hebasto:
ACK a057869aa3c42457570765966cb66accb2375b13, I've got a zero diff with my local branch, which reproduces the subtree update, and `ecmult gen table size = 86 KiB` in the configure summary.
jonasnick:
utACK a057869aa3c42457570765966cb66accb2375b13
Tree-SHA512: 907012b0d7e0a6bd68b245c238e968f2318d8ac5de5ec9070245de8391c996eb5ec6428184d028f6f0f54d3b2f5a8292ad7081177e1c331397879505436dc38e
Diffstat (limited to 'src/secp256k1/configure.ac')
-rw-r--r-- | src/secp256k1/configure.ac | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/src/secp256k1/configure.ac b/src/secp256k1/configure.ac index 158ed5d769..8b62e1dbfd 100644 --- a/src/secp256k1/configure.ac +++ b/src/secp256k1/configure.ac @@ -4,8 +4,8 @@ AC_PREREQ([2.60]) # the API. All changes in experimental modules are treated as # backwards-compatible and therefore at most increase the minor version. define(_PKG_VERSION_MAJOR, 0) -define(_PKG_VERSION_MINOR, 4) -define(_PKG_VERSION_PATCH, 2) +define(_PKG_VERSION_MINOR, 5) +define(_PKG_VERSION_PATCH, 1) define(_PKG_VERSION_IS_RELEASE, false) # The library version is based on libtool versioning of the ABI. The set of @@ -13,9 +13,9 @@ define(_PKG_VERSION_IS_RELEASE, false) # https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # All changes in experimental modules are treated as if they don't affect the # interface and therefore only increase the revision. -define(_LIB_VERSION_CURRENT, 3) -define(_LIB_VERSION_REVISION, 2) -define(_LIB_VERSION_AGE, 1) +define(_LIB_VERSION_CURRENT, 4) +define(_LIB_VERSION_REVISION, 1) +define(_LIB_VERSION_AGE, 2) AC_INIT([libsecp256k1],m4_join([.], _PKG_VERSION_MAJOR, _PKG_VERSION_MINOR, _PKG_VERSION_PATCH)m4_if(_PKG_VERSION_IS_RELEASE, [true], [], [-dev]),[https://github.com/bitcoin-core/secp256k1/issues],[libsecp256k1],[https://github.com/bitcoin-core/secp256k1]) @@ -213,13 +213,12 @@ AC_ARG_WITH([ecmult-window], [AS_HELP_STRING([--with-ecmult-window=SIZE|auto], )], [req_ecmult_window=$withval], [req_ecmult_window=auto]) -AC_ARG_WITH([ecmult-gen-precision], [AS_HELP_STRING([--with-ecmult-gen-precision=2|4|8|auto], -[Precision bits to tune the precomputed table size for signing.] -[The size of the table is 32kB for 2 bits, 64kB for 4 bits, 512kB for 8 bits of precision.] -[A larger table size usually results in possible faster signing.] -["auto" is a reasonable setting for desktop machines (currently 4). [default=auto]] +AC_ARG_WITH([ecmult-gen-kb], [AS_HELP_STRING([--with-ecmult-gen-kb=2|22|86|auto], +[The size of the precomputed table for signing in multiples of 1024 bytes (on typical platforms).] +[Larger values result in possibly better signing/keygeneration performance at the cost of a larger table.] +["auto" is a reasonable setting for desktop machines (currently 22). [default=auto]] )], -[req_ecmult_gen_precision=$withval], [req_ecmult_gen_precision=auto]) +[req_ecmult_gen_kb=$withval], [req_ecmult_gen_kb=auto]) AC_ARG_WITH([valgrind], [AS_HELP_STRING([--with-valgrind=yes|no|auto], [Build with extra checks for running inside Valgrind [default=auto]] @@ -358,19 +357,25 @@ case $set_ecmult_window in ;; esac -# Set ecmult gen precision -if test x"$req_ecmult_gen_precision" = x"auto"; then - set_ecmult_gen_precision=4 +# Set ecmult gen kb +if test x"$req_ecmult_gen_kb" = x"auto"; then + set_ecmult_gen_kb=22 else - set_ecmult_gen_precision=$req_ecmult_gen_precision + set_ecmult_gen_kb=$req_ecmult_gen_kb fi -case $set_ecmult_gen_precision in -2|4|8) - SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DECMULT_GEN_PREC_BITS=$set_ecmult_gen_precision" +case $set_ecmult_gen_kb in +2) + SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=2 -DCOMB_TEETH=5" + ;; +22) + SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=11 -DCOMB_TEETH=6" + ;; +86) + SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES -DCOMB_BLOCKS=43 -DCOMB_TEETH=6" ;; *) - AC_MSG_ERROR(['ecmult gen precision not 2, 4, 8 or "auto"']) + AC_MSG_ERROR(['ecmult gen table size not 2, 22, 86 or "auto"']) ;; esac @@ -475,7 +480,7 @@ echo " module ellswift = $enable_module_ellswift" echo echo " asm = $set_asm" echo " ecmult window size = $set_ecmult_window" -echo " ecmult gen prec. bits = $set_ecmult_gen_precision" +echo " ecmult gen table size = $set_ecmult_gen_kb KiB" # Hide test-only options unless they're used. if test x"$set_widemul" != xauto; then echo " wide multiplication = $set_widemul" |