Remove deprecated `secp256k1_schnorrsig_sign` alias
What changed, and why it matters
This commit removes an old, renamed function called secp256k1_schnorrsig_sign from the libsecp256k1 cryptographic library. It had been marked as deprecated for over three years and was simply an alias pointing to the newer secp256k1_schnorrsig_sign32. Any software still using the old name will fail to compile or link after this change, but the actual signing behavior is unchanged. There is no security vulnerability introduced by this cleanup.
No security action required. Downstream projects should migrate any remaining calls from secp256k1_schnorrsig_sign to secp256k1_schnorrsig_sign32 before upgrading to the version containing this commit. Monitor release notes for breaking API changes.
Security signals we found
No security-relevant code change: only a deprecated alias and its test are removed
No memory safety, cryptographic, or input validation changes
No bug fix, vulnerability patch, or incident disclosure present in commit or references
Evidence from the diff
The change deletes the deprecated public API alias secp256k1_schnorrsig_sign and its implementation, leaving secp256k1_schnorrsig_sign32 and secp256k1_schnorrsig_sign_custom as the supported Schnorr signing entry points. The removed function was a thin wrapper delegating to sign32, so no cryptographic logic changed. The header annotation SECP256K1_DEPRECATED is also removed, and the test that verified alias output equality is deleted. This is a routine API cleanup, not a behavioral or security fix.
Changed components
include/secp256k1_schnorrsig.hsrc/modules/schnorrsig/main_impl.hsrc/modules/schnorrsig/tests_impl.hPublic API: secp256k1_schnorrsig_sign (removed)Inspect captured patch +4 / −19
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bd5e12d..ef82c73 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#### Changed
- CMake: Shared libraries built with CMake on OpenBSD and NetBSD now create the full versioned filename (e.g. `libsecp256k1.so.6.2` instead of `libsecp256k1.so.6`) and symlink chain, matching the behavior of GNU Autotools builds.
+#### Removed
+- Removed previously deprecated function alias `secp256k1_schnorrsig_sign`. Use `secp256k1_schnorrsig_sign32` instead.
+
## [0.7.1] - 2026-01-26
#### Changed
diff --git a/include/secp256k1_schnorrsig.h b/include/secp256k1_schnorrsig.h
index 013d4ee..721b3d2 100644
--- a/include/secp256k1_schnorrsig.h
+++ b/include/secp256k1_schnorrsig.h
@@ -124,20 +124,9 @@ SECP256K1_API int secp256k1_schnorrsig_sign32(
const unsigned char *aux_rand32
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4);
-/** Same as secp256k1_schnorrsig_sign32, but DEPRECATED. Will be removed in
- * future versions. */
-SECP256K1_API int secp256k1_schnorrsig_sign(
- const secp256k1_context *ctx,
- unsigned char *sig64,
- const unsigned char *msg32,
- const secp256k1_keypair *keypair,
- const unsigned char *aux_rand32
-) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4)
- SECP256K1_DEPRECATED("Use secp256k1_schnorrsig_sign32 instead");
-
/** Create a Schnorr signature with a more flexible API.
*
- * Same arguments as secp256k1_schnorrsig_sign except that it allows signing
+ * Same arguments as secp256k1_schnorrsig_sign32 except that it allows signing
* variable length messages and accepts a pointer to an extraparams object that
* allows customizing signing by passing additional arguments.
*
diff --git a/src/modules/schnorrsig/main_impl.h b/src/modules/schnorrsig/main_impl.h
index efc7216..785bc4a 100644
--- a/src/modules/schnorrsig/main_impl.h
+++ b/src/modules/schnorrsig/main_impl.h
@@ -190,10 +190,6 @@ int secp256k1_schnorrsig_sign32(const secp256k1_context* ctx, unsigned char *sig
return secp256k1_schnorrsig_sign_internal(ctx, sig64, msg32, 32, keypair, secp256k1_nonce_function_bip340, (unsigned char*)aux_rand32);
}
-int secp256k1_schnorrsig_sign(const secp256k1_context* ctx, unsigned char *sig64, const unsigned char *msg32, const secp256k1_keypair *keypair, const unsigned char *aux_rand32) {
- return secp256k1_schnorrsig_sign32(ctx, sig64, msg32, keypair, aux_rand32);
-}
-
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) {
secp256k1_nonce_function_hardened noncefp = NULL;
void *ndata = NULL;
diff --git a/src/modules/schnorrsig/tests_impl.h b/src/modules/schnorrsig/tests_impl.h
index 56812e7..12403c5 100644
--- a/src/modules/schnorrsig/tests_impl.h
+++ b/src/modules/schnorrsig/tests_impl.h
@@ -823,9 +823,6 @@ static void test_schnorrsig_sign_internal(void) {
CHECK(secp256k1_keypair_xonly_pub(CTX, &pk, NULL, &keypair));
CHECK(secp256k1_schnorrsig_sign32(CTX, sig, msg, &keypair, NULL) == 1);
CHECK(secp256k1_schnorrsig_verify(CTX, sig, msg, sizeof(msg), &pk));
- /* Check that deprecated alias gives the same result */
- CHECK(secp256k1_schnorrsig_sign(CTX, sig2, msg, &keypair, NULL) == 1);
- CHECK(secp256k1_memcmp_var(sig, sig2, sizeof(sig)) == 0);
/* Test different nonce functions */
CHECK(secp256k1_schnorrsig_sign_custom(CTX, sig, msg, sizeof(msg), &keypair, &extraparams) == 1);
Why this scored 19/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.