aboutsummaryrefslogtreecommitdiff
path: root/src/secp256k1/include/secp256k1.h
diff options
context:
space:
mode:
authormerge-script <fanquake@gmail.com>2024-05-22 08:50:42 +0100
committermerge-script <fanquake@gmail.com>2024-05-22 08:50:42 +0100
commit0388dd702b8d76c83bd17fc339d8c63904234fb0 (patch)
treee412803c6fc8c3339a728af715a7300870a3f054 /src/secp256k1/include/secp256k1.h
parent2ec0a28a37dbb50d463899f53c28fb96905d97b7 (diff)
parenta057869aa3c42457570765966cb66accb2375b13 (diff)
downloadbitcoin-0388dd702b8d76c83bd17fc339d8c63904234fb0.tar.xz
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/include/secp256k1.h')
-rw-r--r--src/secp256k1/include/secp256k1.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/secp256k1/include/secp256k1.h b/src/secp256k1/include/secp256k1.h
index f4053f2a93..cfbdd528c2 100644
--- a/src/secp256k1/include/secp256k1.h
+++ b/src/secp256k1/include/secp256k1.h
@@ -474,6 +474,20 @@ SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_cmp(
const secp256k1_pubkey *pubkey2
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);
+/** Sort public keys using lexicographic (of compressed serialization) order
+ *
+ * Returns: 0 if the arguments are invalid. 1 otherwise.
+ *
+ * Args: ctx: pointer to a context object
+ * In: pubkeys: array of pointers to pubkeys to sort
+ * n_pubkeys: number of elements in the pubkeys array
+ */
+SECP256K1_API int secp256k1_ec_pubkey_sort(
+ const secp256k1_context *ctx,
+ const secp256k1_pubkey **pubkeys,
+ size_t n_pubkeys
+) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2);
+
/** Parse an ECDSA signature in compact (64 bytes) format.
*
* Returns: 1 when the signature could be parsed, 0 otherwise.