Skip to content

Commit cdedca8

Browse files
committed
secp256k1-sys: Bump version to 0.12.0
In preparation for release, bump the version, add a changelog entry, and update the lock files, and run the vendor script. Ran script with ./vendor-libsecp.sh 0cdc758a56360bf58a851fe91085a327ec97685a
1 parent 5fdf959 commit cdedca8

File tree

129 files changed

+7538
-7531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+7538
-7531
lines changed

Cargo-minimal.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ dependencies = [
223223

224224
[[package]]
225225
name = "secp256k1-sys"
226-
version = "0.11.0"
226+
version = "0.12.0"
227227
dependencies = [
228228
"cc",
229229
"libc",

Cargo-recent.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ dependencies = [
214214

215215
[[package]]
216216
name = "secp256k1-sys"
217-
version = "0.11.0"
217+
version = "0.12.0"
218218
dependencies = [
219219
"cc",
220220
"libc",

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ global-context-less-secure = ["global-context"]
3131
arbitrary = ["dep:arbitrary"]
3232

3333
[dependencies]
34-
secp256k1-sys = { version = "0.11.0", default-features = false, path = "./secp256k1-sys" }
34+
secp256k1-sys = { version = "0.12.0", default-features = false, path = "./secp256k1-sys" }
3535

3636
arbitrary = { version = "1.4", optional = true }
3737
rand = { version = "0.9", default-features = false, optional = true }

secp256k1-sys/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# 0.12.0 - 2025-10-10
2+
3+
* Fix lowmemory feature [#799](https://github.com/rust-bitcoin/rust-secp256k1/pull/799)
4+
* Add support for MuSig2, initial PR
5+
[#716](https://github.com/rust-bitcoin/rust-secp256k1/pull/716) then
6+
a bunch of follow up PRs. See `../CHANGELOG.md` for full listing.
7+
18
# 0.10.0 - 2024-03-28
29

310
* Bump MSRV to Rust `v1.56.1` [#693](https://github.com/rust-bitcoin/rust-secp256k1/pull/693)

secp256k1-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-sys"
3-
version = "0.11.0"
3+
version = "0.12.0"
44
authors = [ "Dawid Ciężarkiewicz <[email protected]>",
55
"Andrew Poelstra <[email protected]>",
66
"Steven Roose <[email protected]>" ]
@@ -12,7 +12,7 @@ description = "FFI for Pieter Wuille's `libsecp256k1` library."
1212
keywords = [ "secp256k1", "libsecp256k1", "ffi" ]
1313
readme = "README.md"
1414
build = "build.rs"
15-
links = "rustsecp256k1_v0_11"
15+
links = "rustsecp256k1_v0_12"
1616
edition = "2021"
1717
rust-version = "1.63.0"
1818

secp256k1-sys/depend/secp256k1/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ The Contributor Workflow & Peer Review in libsecp256k1 are similar to Bitcoin Co
4444

4545
In addition, libsecp256k1 tries to maintain the following coding conventions:
4646

47-
* No runtime heap allocation (e.g., no `malloc`) unless explicitly requested by the caller (via `rustsecp256k1_v0_11_context_create` or `rustsecp256k1_v0_11_scratch_space_create`, for example). Moreover, it should be possible to use the library without any heap allocations.
47+
* No runtime heap allocation (e.g., no `malloc`) unless explicitly requested by the caller (via `rustsecp256k1_v0_12_context_create` or `rustsecp256k1_v0_12_scratch_space_create`, for example). Moreover, it should be possible to use the library without any heap allocations.
4848
* The tests should cover all lines and branches of the library (see [Test coverage](#coverage)).
4949
* Operations involving secret data should be tested for being constant time with respect to the secrets (see [src/ctime_tests.c](src/ctime_tests.c)).
5050
* Local variables containing secret data should be cleared explicitly to try to delete secrets from memory.
51-
* Use `rustsecp256k1_v0_11_memcmp_var` instead of `memcmp` (see [#823](https://github.com/bitcoin-core/secp256k1/issues/823)).
51+
* Use `rustsecp256k1_v0_12_memcmp_var` instead of `memcmp` (see [#823](https://github.com/bitcoin-core/secp256k1/issues/823)).
5252
* As a rule of thumb, the default values for configuration options should target standard desktop machines and align with Bitcoin Core's defaults, and the tests should mostly exercise the default configuration (see [#1549](https://github.com/bitcoin-core/secp256k1/issues/1549#issuecomment-2200559257)).
5353

5454
#### Style conventions
@@ -72,7 +72,7 @@ In addition, libsecp256k1 tries to maintain the following coding conventions:
7272
* Use `void *ptr` instead of `void* ptr`.
7373
* Arguments of the publicly-facing API must have a specific order defined in [include/secp256k1.h](include/secp256k1.h).
7474
* User-facing comment lines in headers should be limited to 80 chars if possible.
75-
* All identifiers in file scope should start with `rustsecp256k1_v0_11_`.
75+
* All identifiers in file scope should start with `rustsecp256k1_v0_12_`.
7676
* Avoid trailing whitespace.
7777

7878
### Tests

secp256k1-sys/depend/secp256k1/Makefile.am

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AM_CFLAGS = $(SECP_CFLAGS)
66

77
lib_LTLIBRARIES = libsecp256k1.la
88
include_HEADERS = include/secp256k1.h
9-
include_HEADERS += include/rustsecp256k1_v0_11_preallocated.h
9+
include_HEADERS += include/rustsecp256k1_v0_12_preallocated.h
1010
noinst_HEADERS =
1111
noinst_HEADERS += src/scalar.h
1212
noinst_HEADERS += src/scalar_4x64.h
@@ -63,7 +63,7 @@ noinst_HEADERS += src/hash_impl.h
6363
noinst_HEADERS += src/field.h
6464
noinst_HEADERS += src/field_impl.h
6565
noinst_HEADERS += src/bench.h
66-
noinst_HEADERS += src/wycheproof/ecdsa_rustsecp256k1_v0_11_sha256_bitcoin_test.h
66+
noinst_HEADERS += src/wycheproof/ecdsa_rustsecp256k1_v0_12_sha256_bitcoin_test.h
6767
noinst_HEADERS += src/hsort.h
6868
noinst_HEADERS += src/hsort_impl.h
6969
noinst_HEADERS += contrib/lax_der_parsing.h
@@ -72,15 +72,15 @@ noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
7272
noinst_HEADERS += contrib/lax_der_privatekey_parsing.c
7373
noinst_HEADERS += examples/examples_util.h
7474

75-
PRECOMPUTED_LIB = librustsecp256k1_v0_11_precomputed.la
75+
PRECOMPUTED_LIB = librustsecp256k1_v0_12_precomputed.la
7676
noinst_LTLIBRARIES = $(PRECOMPUTED_LIB)
77-
librustsecp256k1_v0_11_precomputed_la_SOURCES = src/precomputed_ecmult.c src/precomputed_ecmult_gen.c
78-
# We need `-I$(top_srcdir)/src` in VPATH builds if librustsecp256k1_v0_11_precomputed_la_SOURCES have been recreated in the build tree.
77+
librustsecp256k1_v0_12_precomputed_la_SOURCES = src/precomputed_ecmult.c src/precomputed_ecmult_gen.c
78+
# We need `-I$(top_srcdir)/src` in VPATH builds if librustsecp256k1_v0_12_precomputed_la_SOURCES have been recreated in the build tree.
7979
# This helps users and packagers who insist on recreating the precomputed files (e.g., Gentoo).
80-
librustsecp256k1_v0_11_precomputed_la_CPPFLAGS = -I$(top_srcdir)/src $(SECP_CONFIG_DEFINES)
80+
librustsecp256k1_v0_12_precomputed_la_CPPFLAGS = -I$(top_srcdir)/src $(SECP_CONFIG_DEFINES)
8181

8282
if USE_EXTERNAL_ASM
83-
COMMON_LIB = librustsecp256k1_v0_11_common.la
83+
COMMON_LIB = librustsecp256k1_v0_12_common.la
8484
else
8585
COMMON_LIB =
8686
endif
@@ -91,14 +91,14 @@ pkgconfig_DATA = libsecp256k1.pc
9191

9292
if USE_EXTERNAL_ASM
9393
if USE_ASM_ARM
94-
librustsecp256k1_v0_11_common_la_SOURCES = src/asm/field_10x26_arm.s
94+
librustsecp256k1_v0_12_common_la_SOURCES = src/asm/field_10x26_arm.s
9595
endif
9696
endif
9797

98-
librustsecp256k1_v0_11_la_SOURCES = src/secp256k1.c
99-
librustsecp256k1_v0_11_la_CPPFLAGS = $(SECP_CONFIG_DEFINES)
100-
librustsecp256k1_v0_11_la_LIBADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
101-
librustsecp256k1_v0_11_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
98+
librustsecp256k1_v0_12_la_SOURCES = src/secp256k1.c
99+
librustsecp256k1_v0_12_la_CPPFLAGS = $(SECP_CONFIG_DEFINES)
100+
librustsecp256k1_v0_12_la_LIBADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
101+
librustsecp256k1_v0_12_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
102102

103103
noinst_PROGRAMS =
104104
if USE_BENCHMARK
@@ -247,11 +247,11 @@ maintainer-clean-local: clean-precomp
247247

248248
### Pregenerated test vectors
249249
### (see the comments in the previous section for detailed rationale)
250-
TESTVECTORS = src/wycheproof/ecdsa_rustsecp256k1_v0_11_sha256_bitcoin_test.h
250+
TESTVECTORS = src/wycheproof/ecdsa_rustsecp256k1_v0_12_sha256_bitcoin_test.h
251251

252-
src/wycheproof/ecdsa_rustsecp256k1_v0_11_sha256_bitcoin_test.h:
252+
src/wycheproof/ecdsa_rustsecp256k1_v0_12_sha256_bitcoin_test.h:
253253
mkdir -p $(@D)
254-
python3 $(top_srcdir)/tools/tests_wycheproof_generate.py $(top_srcdir)/src/wycheproof/ecdsa_rustsecp256k1_v0_11_sha256_bitcoin_test.json > $@
254+
python3 $(top_srcdir)/tools/tests_wycheproof_generate.py $(top_srcdir)/src/wycheproof/ecdsa_rustsecp256k1_v0_12_sha256_bitcoin_test.json > $@
255255

256256
testvectors: $(TESTVECTORS)
257257

@@ -271,10 +271,10 @@ EXTRA_DIST += sage/gen_exhaustive_groups.sage
271271
EXTRA_DIST += sage/gen_split_lambda_constants.sage
272272
EXTRA_DIST += sage/group_prover.sage
273273
EXTRA_DIST += sage/prove_group_implementations.sage
274-
EXTRA_DIST += sage/rustsecp256k1_v0_11_params.sage
274+
EXTRA_DIST += sage/rustsecp256k1_v0_12_params.sage
275275
EXTRA_DIST += sage/weierstrass_prover.sage
276276
EXTRA_DIST += src/wycheproof/WYCHEPROOF_COPYING
277-
EXTRA_DIST += src/wycheproof/ecdsa_rustsecp256k1_v0_11_sha256_bitcoin_test.json
277+
EXTRA_DIST += src/wycheproof/ecdsa_rustsecp256k1_v0_12_sha256_bitcoin_test.json
278278
EXTRA_DIST += tools/tests_wycheproof_generate.py
279279

280280
if ENABLE_MODULE_ECDH

secp256k1-sys/depend/secp256k1/cmake/TryAppendCFlags.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include(CheckCCompilerFlag)
22

3-
function(rustsecp256k1_v0_11_check_c_flags_internal flags output)
3+
function(rustsecp256k1_v0_12_check_c_flags_internal flags output)
44
string(MAKE_C_IDENTIFIER "${flags}" result)
55
string(TOUPPER "${result}" result)
66
set(result "C_SUPPORTS_${result}")
@@ -17,7 +17,7 @@ endfunction()
1717

1818
# Append flags to the COMPILE_OPTIONS directory property if CC accepts them.
1919
macro(try_append_c_flags)
20-
rustsecp256k1_v0_11_check_c_flags_internal("${ARGV}" result)
20+
rustsecp256k1_v0_12_check_c_flags_internal("${ARGV}" result)
2121
if(result)
2222
add_compile_options(${ARGV})
2323
endif()

secp256k1-sys/depend/secp256k1/contrib/lax_der_parsing.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
#include <string.h>
88

99
#include "lax_der_parsing.h"
10-
extern int rustsecp256k1_v0_11_ecdsa_signature_parse_compact(
11-
const rustsecp256k1_v0_11_context *ctx,
12-
rustsecp256k1_v0_11_ecdsa_signature *sig, const unsigned char *input64);
13-
int rustsecp256k1_v0_11_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_11_context* ctx, rustsecp256k1_v0_11_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) {
10+
extern int rustsecp256k1_v0_12_ecdsa_signature_parse_compact(
11+
const rustsecp256k1_v0_12_context *ctx,
12+
rustsecp256k1_v0_12_ecdsa_signature *sig, const unsigned char *input64);
13+
int rustsecp256k1_v0_12_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_12_context* ctx, rustsecp256k1_v0_12_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) {
1414
size_t rpos, rlen, spos, slen;
1515
size_t pos = 0;
1616
size_t lenbyte;
1717
unsigned char tmpsig[64] = {0};
1818
int overflow = 0;
1919

2020
/* Hack to initialize sig with a correctly-parsed but invalid signature. */
21-
rustsecp256k1_v0_11_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
21+
rustsecp256k1_v0_12_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
2222

2323
/* Sequence tag byte */
2424
if (pos == inputlen || input[pos] != 0x30) {
@@ -139,11 +139,11 @@ int rustsecp256k1_v0_11_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_11_
139139
}
140140

141141
if (!overflow) {
142-
overflow = !rustsecp256k1_v0_11_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
142+
overflow = !rustsecp256k1_v0_12_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
143143
}
144144
if (overflow) {
145145
memset(tmpsig, 0, 64);
146-
rustsecp256k1_v0_11_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
146+
rustsecp256k1_v0_12_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
147147
}
148148
return 1;
149149
}

secp256k1-sys/depend/secp256k1/contrib/lax_der_parsing.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* certain violations are easily supported. You may need to adapt it.
2727
*
2828
* Do not use this for new systems. Use well-defined DER or compact signatures
29-
* instead if you have the choice (see rustsecp256k1_v0_11_ecdsa_signature_parse_der and
30-
* rustsecp256k1_v0_11_ecdsa_signature_parse_compact).
29+
* instead if you have the choice (see rustsecp256k1_v0_12_ecdsa_signature_parse_der and
30+
* rustsecp256k1_v0_12_ecdsa_signature_parse_compact).
3131
*
3232
* The supported violations are:
3333
* - All numbers are parsed as nonnegative integers, even though X.609-0207
@@ -83,9 +83,9 @@ extern "C" {
8383
* encoded numbers are out of range, signature validation with it is
8484
* guaranteed to fail for every message and public key.
8585
*/
86-
int rustsecp256k1_v0_11_ecdsa_signature_parse_der_lax(
87-
const rustsecp256k1_v0_11_context* ctx,
88-
rustsecp256k1_v0_11_ecdsa_signature* sig,
86+
int rustsecp256k1_v0_12_ecdsa_signature_parse_der_lax(
87+
const rustsecp256k1_v0_12_context* ctx,
88+
rustsecp256k1_v0_12_ecdsa_signature* sig,
8989
const unsigned char *input,
9090
size_t inputlen
9191
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);

0 commit comments

Comments
 (0)