Skip to content

Commit ac6d106

Browse files
committed
secp256k1-sys: bump version to 0.9.0 (but don't release yet)
1 parent b09935d commit ac6d106

File tree

107 files changed

+6245
-6245
lines changed

Some content is hidden

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

107 files changed

+6245
-6245
lines changed

Cargo-minimal.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ dependencies = [
266266

267267
[[package]]
268268
name = "secp256k1-sys"
269-
version = "0.8.1"
269+
version = "0.9.0"
270270
dependencies = [
271271
"cc",
272272
"libc",

Cargo-recent.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ dependencies = [
187187

188188
[[package]]
189189
name = "secp256k1-sys"
190-
version = "0.8.1"
190+
version = "0.9.0"
191191
dependencies = [
192192
"cc",
193193
"libc",

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ global-context = ["std"]
3535
global-context-less-secure = ["global-context"]
3636

3737
[dependencies]
38-
secp256k1-sys = { version = "0.8.1", default-features = false, path = "./secp256k1-sys" }
38+
secp256k1-sys = { version = "0.9.0", default-features = false, path = "./secp256k1-sys" }
3939
serde = { version = "1.0.103", default-features = false, optional = true }
4040

4141
# You likely only want to enable these if you explicitly do not want to use "std", otherwise enable

secp256k1-sys/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-sys"
3-
version = "0.8.1"
3+
version = "0.9.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_8_1"
15+
links = "rustsecp256k1_v0_9_0"
1616
edition = "2018"
1717

1818
[package.metadata.docs.rs]

secp256k1-sys/depend/secp256k1/Makefile.am

+17-17
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_8_1_preallocated.h
9+
include_HEADERS += include/rustsecp256k1_v0_9_0_preallocated.h
1010
noinst_HEADERS =
1111
noinst_HEADERS += src/scalar.h
1212
noinst_HEADERS += src/scalar_4x64.h
@@ -63,22 +63,22 @@ 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_8_1_sha256_bitcoin_test.h
66+
noinst_HEADERS += src/wycheproof/ecdsa_rustsecp256k1_v0_9_0_sha256_bitcoin_test.h
6767
noinst_HEADERS += contrib/lax_der_parsing.h
6868
noinst_HEADERS += contrib/lax_der_parsing.c
6969
noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
7070
noinst_HEADERS += contrib/lax_der_privatekey_parsing.c
7171
noinst_HEADERS += examples/examples_util.h
7272

73-
PRECOMPUTED_LIB = librustsecp256k1_v0_8_1_precomputed.la
73+
PRECOMPUTED_LIB = librustsecp256k1_v0_9_0_precomputed.la
7474
noinst_LTLIBRARIES = $(PRECOMPUTED_LIB)
75-
librustsecp256k1_v0_8_1_precomputed_la_SOURCES = src/precomputed_ecmult.c src/precomputed_ecmult_gen.c
76-
# We need `-I$(top_srcdir)/src` in VPATH builds if librustsecp256k1_v0_8_1_precomputed_la_SOURCES have been recreated in the build tree.
75+
librustsecp256k1_v0_9_0_precomputed_la_SOURCES = src/precomputed_ecmult.c src/precomputed_ecmult_gen.c
76+
# We need `-I$(top_srcdir)/src` in VPATH builds if librustsecp256k1_v0_9_0_precomputed_la_SOURCES have been recreated in the build tree.
7777
# This helps users and packagers who insist on recreating the precomputed files (e.g., Gentoo).
78-
librustsecp256k1_v0_8_1_precomputed_la_CPPFLAGS = -I$(top_srcdir)/src $(SECP_CONFIG_DEFINES)
78+
librustsecp256k1_v0_9_0_precomputed_la_CPPFLAGS = -I$(top_srcdir)/src $(SECP_CONFIG_DEFINES)
7979

8080
if USE_EXTERNAL_ASM
81-
COMMON_LIB = librustsecp256k1_v0_8_1_common.la
81+
COMMON_LIB = librustsecp256k1_v0_9_0_common.la
8282
else
8383
COMMON_LIB =
8484
endif
@@ -89,14 +89,14 @@ pkgconfig_DATA = libsecp256k1.pc
8989

9090
if USE_EXTERNAL_ASM
9191
if USE_ASM_ARM
92-
librustsecp256k1_v0_8_1_common_la_SOURCES = src/asm/field_10x26_arm.s
92+
librustsecp256k1_v0_9_0_common_la_SOURCES = src/asm/field_10x26_arm.s
9393
endif
9494
endif
9595

96-
librustsecp256k1_v0_8_1_la_SOURCES = src/secp256k1.c
97-
librustsecp256k1_v0_8_1_la_CPPFLAGS = $(SECP_CONFIG_DEFINES)
98-
librustsecp256k1_v0_8_1_la_LIBADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
99-
librustsecp256k1_v0_8_1_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
96+
librustsecp256k1_v0_9_0_la_SOURCES = src/secp256k1.c
97+
librustsecp256k1_v0_9_0_la_CPPFLAGS = $(SECP_CONFIG_DEFINES)
98+
librustsecp256k1_v0_9_0_la_LIBADD = $(COMMON_LIB) $(PRECOMPUTED_LIB)
99+
librustsecp256k1_v0_9_0_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
100100

101101
noinst_PROGRAMS =
102102
if USE_BENCHMARK
@@ -223,11 +223,11 @@ maintainer-clean-local: clean-precomp
223223

224224
### Pregenerated test vectors
225225
### (see the comments in the previous section for detailed rationale)
226-
TESTVECTORS = src/wycheproof/ecdsa_rustsecp256k1_v0_8_1_sha256_bitcoin_test.h
226+
TESTVECTORS = src/wycheproof/ecdsa_rustsecp256k1_v0_9_0_sha256_bitcoin_test.h
227227

228-
src/wycheproof/ecdsa_rustsecp256k1_v0_8_1_sha256_bitcoin_test.h:
228+
src/wycheproof/ecdsa_rustsecp256k1_v0_9_0_sha256_bitcoin_test.h:
229229
mkdir -p $(@D)
230-
python3 $(top_srcdir)/tools/tests_wycheproof_generate.py $(top_srcdir)/src/wycheproof/ecdsa_rustsecp256k1_v0_8_1_sha256_bitcoin_test.json > $@
230+
python3 $(top_srcdir)/tools/tests_wycheproof_generate.py $(top_srcdir)/src/wycheproof/ecdsa_rustsecp256k1_v0_9_0_sha256_bitcoin_test.json > $@
231231

232232
testvectors: $(TESTVECTORS)
233233

@@ -246,10 +246,10 @@ EXTRA_DIST += sage/gen_exhaustive_groups.sage
246246
EXTRA_DIST += sage/gen_split_lambda_constants.sage
247247
EXTRA_DIST += sage/group_prover.sage
248248
EXTRA_DIST += sage/prove_group_implementations.sage
249-
EXTRA_DIST += sage/rustsecp256k1_v0_8_1_params.sage
249+
EXTRA_DIST += sage/rustsecp256k1_v0_9_0_params.sage
250250
EXTRA_DIST += sage/weierstrass_prover.sage
251251
EXTRA_DIST += src/wycheproof/WYCHEPROOF_COPYING
252-
EXTRA_DIST += src/wycheproof/ecdsa_rustsecp256k1_v0_8_1_sha256_bitcoin_test.json
252+
EXTRA_DIST += src/wycheproof/ecdsa_rustsecp256k1_v0_9_0_sha256_bitcoin_test.json
253253
EXTRA_DIST += tools/tests_wycheproof_generate.py
254254

255255
if ENABLE_MODULE_ECDH

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include(CheckCCompilerFlag)
22

3-
function(rustsecp256k1_v0_8_1_check_c_flags_internal flags output)
3+
function(rustsecp256k1_v0_9_0_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_8_1_check_c_flags_internal("${ARGV}" result)
20+
rustsecp256k1_v0_9_0_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

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@
88

99
#include "lax_der_parsing.h"
1010

11-
int rustsecp256k1_v0_8_1_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_8_1_context* ctx, rustsecp256k1_v0_8_1_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) {
11+
int rustsecp256k1_v0_9_0_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_9_0_context* ctx, rustsecp256k1_v0_9_0_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) {
1212
size_t rpos, rlen, spos, slen;
1313
size_t pos = 0;
1414
size_t lenbyte;
1515
unsigned char tmpsig[64] = {0};
1616
int overflow = 0;
1717

1818
/* Hack to initialize sig with a correctly-parsed but invalid signature. */
19-
rustsecp256k1_v0_8_1_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
19+
rustsecp256k1_v0_9_0_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
2020

2121
/* Sequence tag byte */
2222
if (pos == inputlen || input[pos] != 0x30) {
@@ -137,11 +137,11 @@ int rustsecp256k1_v0_8_1_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_8_
137137
}
138138

139139
if (!overflow) {
140-
overflow = !rustsecp256k1_v0_8_1_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
140+
overflow = !rustsecp256k1_v0_9_0_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
141141
}
142142
if (overflow) {
143143
memset(tmpsig, 0, 64);
144-
rustsecp256k1_v0_8_1_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
144+
rustsecp256k1_v0_9_0_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
145145
}
146146
return 1;
147147
}

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

+5-5
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_8_1_ecdsa_signature_parse_der and
30-
* rustsecp256k1_v0_8_1_ecdsa_signature_parse_compact).
29+
* instead if you have the choice (see rustsecp256k1_v0_9_0_ecdsa_signature_parse_der and
30+
* rustsecp256k1_v0_9_0_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_8_1_ecdsa_signature_parse_der_lax(
87-
const rustsecp256k1_v0_8_1_context* ctx,
88-
rustsecp256k1_v0_8_1_ecdsa_signature* sig,
86+
int rustsecp256k1_v0_9_0_ecdsa_signature_parse_der_lax(
87+
const rustsecp256k1_v0_9_0_context* ctx,
88+
rustsecp256k1_v0_9_0_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);

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

+7-7
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "lax_der_privatekey_parsing.h"
1010

11-
int ec_privkey_import_der(const rustsecp256k1_v0_8_1_context* ctx, unsigned char *out32, const unsigned char *privkey, size_t privkeylen) {
11+
int ec_privkey_import_der(const rustsecp256k1_v0_9_0_context* ctx, unsigned char *out32, const unsigned char *privkey, size_t privkeylen) {
1212
const unsigned char *end = privkey + privkeylen;
1313
int lenb = 0;
1414
int len = 0;
@@ -45,17 +45,17 @@ int ec_privkey_import_der(const rustsecp256k1_v0_8_1_context* ctx, unsigned char
4545
return 0;
4646
}
4747
if (privkey[1]) memcpy(out32 + 32 - privkey[1], privkey + 2, privkey[1]);
48-
if (!rustsecp256k1_v0_8_1_ec_seckey_verify(ctx, out32)) {
48+
if (!rustsecp256k1_v0_9_0_ec_seckey_verify(ctx, out32)) {
4949
memset(out32, 0, 32);
5050
return 0;
5151
}
5252
return 1;
5353
}
5454

55-
int ec_privkey_export_der(const rustsecp256k1_v0_8_1_context *ctx, unsigned char *privkey, size_t *privkeylen, const unsigned char *key32, int compressed) {
56-
rustsecp256k1_v0_8_1_pubkey pubkey;
55+
int ec_privkey_export_der(const rustsecp256k1_v0_9_0_context *ctx, unsigned char *privkey, size_t *privkeylen, const unsigned char *key32, int compressed) {
56+
rustsecp256k1_v0_9_0_pubkey pubkey;
5757
size_t pubkeylen = 0;
58-
if (!rustsecp256k1_v0_8_1_ec_pubkey_create(ctx, &pubkey, key32)) {
58+
if (!rustsecp256k1_v0_9_0_ec_pubkey_create(ctx, &pubkey, key32)) {
5959
*privkeylen = 0;
6060
return 0;
6161
}
@@ -79,7 +79,7 @@ int ec_privkey_export_der(const rustsecp256k1_v0_8_1_context *ctx, unsigned char
7979
memcpy(ptr, key32, 32); ptr += 32;
8080
memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
8181
pubkeylen = 33;
82-
rustsecp256k1_v0_8_1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED);
82+
rustsecp256k1_v0_9_0_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED);
8383
ptr += pubkeylen;
8484
*privkeylen = ptr - privkey;
8585
} else {
@@ -104,7 +104,7 @@ int ec_privkey_export_der(const rustsecp256k1_v0_8_1_context *ctx, unsigned char
104104
memcpy(ptr, key32, 32); ptr += 32;
105105
memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
106106
pubkeylen = 65;
107-
rustsecp256k1_v0_8_1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
107+
rustsecp256k1_v0_9_0_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
108108
ptr += pubkeylen;
109109
*privkeylen = ptr - privkey;
110110
}

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ extern "C" {
4343
/** Export a private key in DER format.
4444
*
4545
* Returns: 1 if the private key was valid.
46-
* Args: ctx: pointer to a context object (not rustsecp256k1_v0_8_1_context_static).
46+
* Args: ctx: pointer to a context object (not rustsecp256k1_v0_9_0_context_static).
4747
* Out: privkey: pointer to an array for storing the private key in BER.
4848
* Should have space for 279 bytes, and cannot be NULL.
4949
* privkeylen: Pointer to an int where the length of the private key in
@@ -57,10 +57,10 @@ extern "C" {
5757
* simple 32-byte private keys are sufficient.
5858
*
5959
* Note that this function does not guarantee correct DER output. It is
60-
* guaranteed to be parsable by rustsecp256k1_v0_8_1_ec_privkey_import_der
60+
* guaranteed to be parsable by rustsecp256k1_v0_9_0_ec_privkey_import_der
6161
*/
6262
SECP256K1_WARN_UNUSED_RESULT int ec_privkey_export_der(
63-
const rustsecp256k1_v0_8_1_context* ctx,
63+
const rustsecp256k1_v0_9_0_context* ctx,
6464
unsigned char *privkey,
6565
size_t *privkeylen,
6666
const unsigned char *seckey,
@@ -82,7 +82,7 @@ SECP256K1_WARN_UNUSED_RESULT int ec_privkey_export_der(
8282
* key.
8383
*/
8484
SECP256K1_WARN_UNUSED_RESULT int ec_privkey_import_der(
85-
const rustsecp256k1_v0_8_1_context* ctx,
85+
const rustsecp256k1_v0_9_0_context* ctx,
8686
unsigned char *seckey,
8787
const unsigned char *privkey,
8888
size_t privkeylen

secp256k1-sys/depend/secp256k1/examples/ecdh.c

+13-13
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ int main(void) {
2626
unsigned char randomize[32];
2727
int return_val;
2828
size_t len;
29-
rustsecp256k1_v0_8_1_pubkey pubkey1;
30-
rustsecp256k1_v0_8_1_pubkey pubkey2;
29+
rustsecp256k1_v0_9_0_pubkey pubkey1;
30+
rustsecp256k1_v0_9_0_pubkey pubkey2;
3131

3232
/* Before we can call actual API functions, we need to create a "context". */
33-
rustsecp256k1_v0_8_1_context* ctx = rustsecp256k1_v0_8_1_context_create(SECP256K1_CONTEXT_NONE);
33+
rustsecp256k1_v0_9_0_context* ctx = rustsecp256k1_v0_9_0_context_create(SECP256K1_CONTEXT_NONE);
3434
if (!fill_random(randomize, sizeof(randomize))) {
3535
printf("Failed to generate randomness\n");
3636
return 1;
3737
}
3838
/* Randomizing the context is recommended to protect against side-channel
39-
* leakage See `rustsecp256k1_v0_8_1_context_randomize` in secp256k1.h for more
39+
* leakage See `rustsecp256k1_v0_9_0_context_randomize` in secp256k1.h for more
4040
* information about it. This should never fail. */
41-
return_val = rustsecp256k1_v0_8_1_context_randomize(ctx, randomize);
41+
return_val = rustsecp256k1_v0_9_0_context_randomize(ctx, randomize);
4242
assert(return_val);
4343

4444
/*** Key Generation ***/
@@ -51,27 +51,27 @@ int main(void) {
5151
printf("Failed to generate randomness\n");
5252
return 1;
5353
}
54-
if (rustsecp256k1_v0_8_1_ec_seckey_verify(ctx, seckey1) && rustsecp256k1_v0_8_1_ec_seckey_verify(ctx, seckey2)) {
54+
if (rustsecp256k1_v0_9_0_ec_seckey_verify(ctx, seckey1) && rustsecp256k1_v0_9_0_ec_seckey_verify(ctx, seckey2)) {
5555
break;
5656
}
5757
}
5858

5959
/* Public key creation using a valid context with a verified secret key should never fail */
60-
return_val = rustsecp256k1_v0_8_1_ec_pubkey_create(ctx, &pubkey1, seckey1);
60+
return_val = rustsecp256k1_v0_9_0_ec_pubkey_create(ctx, &pubkey1, seckey1);
6161
assert(return_val);
62-
return_val = rustsecp256k1_v0_8_1_ec_pubkey_create(ctx, &pubkey2, seckey2);
62+
return_val = rustsecp256k1_v0_9_0_ec_pubkey_create(ctx, &pubkey2, seckey2);
6363
assert(return_val);
6464

6565
/* Serialize pubkey1 in a compressed form (33 bytes), should always return 1 */
6666
len = sizeof(compressed_pubkey1);
67-
return_val = rustsecp256k1_v0_8_1_ec_pubkey_serialize(ctx, compressed_pubkey1, &len, &pubkey1, SECP256K1_EC_COMPRESSED);
67+
return_val = rustsecp256k1_v0_9_0_ec_pubkey_serialize(ctx, compressed_pubkey1, &len, &pubkey1, SECP256K1_EC_COMPRESSED);
6868
assert(return_val);
6969
/* Should be the same size as the size of the output, because we passed a 33 byte array. */
7070
assert(len == sizeof(compressed_pubkey1));
7171

7272
/* Serialize pubkey2 in a compressed form (33 bytes) */
7373
len = sizeof(compressed_pubkey2);
74-
return_val = rustsecp256k1_v0_8_1_ec_pubkey_serialize(ctx, compressed_pubkey2, &len, &pubkey2, SECP256K1_EC_COMPRESSED);
74+
return_val = rustsecp256k1_v0_9_0_ec_pubkey_serialize(ctx, compressed_pubkey2, &len, &pubkey2, SECP256K1_EC_COMPRESSED);
7575
assert(return_val);
7676
/* Should be the same size as the size of the output, because we passed a 33 byte array. */
7777
assert(len == sizeof(compressed_pubkey2));
@@ -80,12 +80,12 @@ int main(void) {
8080

8181
/* Perform ECDH with seckey1 and pubkey2. Should never fail with a verified
8282
* seckey and valid pubkey */
83-
return_val = rustsecp256k1_v0_8_1_ecdh(ctx, shared_secret1, &pubkey2, seckey1, NULL, NULL);
83+
return_val = rustsecp256k1_v0_9_0_ecdh(ctx, shared_secret1, &pubkey2, seckey1, NULL, NULL);
8484
assert(return_val);
8585

8686
/* Perform ECDH with seckey2 and pubkey1. Should never fail with a verified
8787
* seckey and valid pubkey */
88-
return_val = rustsecp256k1_v0_8_1_ecdh(ctx, shared_secret2, &pubkey1, seckey2, NULL, NULL);
88+
return_val = rustsecp256k1_v0_9_0_ecdh(ctx, shared_secret2, &pubkey1, seckey2, NULL, NULL);
8989
assert(return_val);
9090

9191
/* Both parties should end up with the same shared secret */
@@ -104,7 +104,7 @@ int main(void) {
104104
print_hex(shared_secret1, sizeof(shared_secret1));
105105

106106
/* This will clear everything from the context and free the memory */
107-
rustsecp256k1_v0_8_1_context_destroy(ctx);
107+
rustsecp256k1_v0_9_0_context_destroy(ctx);
108108

109109
/* It's best practice to try to clear secrets from memory after using them.
110110
* This is done because some bugs can allow an attacker to leak memory, for

0 commit comments

Comments
 (0)