Skip to content

Commit 405e29b

Browse files
committed
Remove deprecated secp256k1_schnorrsig_sign alias
This function has been deprecated since the rename to `_schnorrsig_sign32` more than three and a half years ago (see PR #1089, commit 99e6568), before the first official release 0.2.0. Removing it should be fine by now.
1 parent b6c2a3c commit 405e29b

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
#### Removed
11+
- Removed previously deprecated function alias `secp256k1_schnorrsig_sign`. Use `secp256k1_schnorrsig_sign32` instead.
12+
1013
## [0.7.0] - 2025-07-21
1114

1215
#### Added

include/secp256k1_schnorrsig.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -124,20 +124,9 @@ SECP256K1_API int secp256k1_schnorrsig_sign32(
124124
const unsigned char *aux_rand32
125125
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
126126

127-
/** Same as secp256k1_schnorrsig_sign32, but DEPRECATED. Will be removed in
128-
* future versions. */
129-
SECP256K1_API int secp256k1_schnorrsig_sign(
130-
const secp256k1_context *ctx,
131-
unsigned char *sig64,
132-
const unsigned char *msg32,
133-
const secp256k1_keypair *keypair,
134-
const unsigned char *aux_rand32
135-
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
136-
SECP256K1_DEPRECATED("Use secp256k1_schnorrsig_sign32 instead");
137-
138127
/** Create a Schnorr signature with a more flexible API.
139128
*
140-
* Same arguments as secp256k1_schnorrsig_sign except that it allows signing
129+
* Same arguments as secp256k1_schnorrsig_sign32 except that it allows signing
141130
* variable length messages and accepts a pointer to an extraparams object that
142131
* allows customizing signing by passing additional arguments.
143132
*

src/modules/schnorrsig/main_impl.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,6 @@ int secp256k1_schnorrsig_sign32(const secp256k1_context* ctx, unsigned char *sig
202202
return secp256k1_schnorrsig_sign_internal(ctx, sig64, msg32, 32, keypair, secp256k1_nonce_function_bip340, (unsigned char*)aux_rand32);
203203
}
204204

205-
int secp256k1_schnorrsig_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const secp256k1_keypair *keypair, const unsigned char *aux_rand32) {
206-
return secp256k1_schnorrsig_sign32(ctx, sig64, msg32, keypair, aux_rand32);
207-
}
208-
209205
int secp256k1_schnorrsig_sign_custom(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg, size_t msglen, const secp256k1_keypair *keypair, secp256k1_schnorrsig_extraparams *extraparams) {
210206
secp256k1_nonce_function_hardened noncefp = NULL;
211207
void *ndata = NULL;

src/modules/schnorrsig/tests_impl.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -820,9 +820,6 @@ static void test_schnorrsig_sign_internal(void) {
820820
CHECK(secp256k1_keypair_xonly_pub(CTX, &pk, NULL, &keypair));
821821
CHECK(secp256k1_schnorrsig_sign32(CTX, sig, msg, &keypair, NULL) == 1);
822822
CHECK(secp256k1_schnorrsig_verify(CTX, sig, msg, sizeof(msg), &pk));
823-
/* Check that deprecated alias gives the same result */
824-
CHECK(secp256k1_schnorrsig_sign(CTX, sig2, msg, &keypair, NULL) == 1);
825-
CHECK(secp256k1_memcmp_var(sig, sig2, sizeof(sig)) == 0);
826823

827824
/* Test different nonce functions */
828825
CHECK(secp256k1_schnorrsig_sign_custom(CTX, sig, msg, sizeof(msg), &keypair, &extraparams) == 1);

0 commit comments

Comments
 (0)