@@ -56,24 +56,6 @@ typedef struct {
5656 unsigned char data [64 ];
5757} secp256k1_ecdsa_signature_t ;
5858
59- /** Opaque data structured that holds a parsed ECDSA signature,
60- * supporting pubkey recovery.
61- *
62- * The exact representation of data inside is implementation defined and not
63- * guaranteed to be portable between different platforms or versions. It is
64- * however guaranteed to be 65 bytes in size, and can be safely copied/moved.
65- * If you need to convert to a format suitable for storage or transmission, use
66- * the secp256k1_ecdsa_signature_serialize_* and
67- * secp256k1_ecdsa_signature_serialize_* functions.
68- *
69- * Furthermore, it is guaranteed to identical signatures (including their
70- * recoverability) will have identical representation, so they can be
71- * memcmp'ed.
72- */
73- typedef struct {
74- unsigned char data [65 ];
75- } secp256k1_ecdsa_recoverable_signature_t ;
76-
7759/** A pointer to a function to deterministically generate a nonce.
7860 *
7961 * Returns: 1 if a nonce was successfully generated. 0 will cause signing to fail.
@@ -270,33 +252,6 @@ int secp256k1_ecdsa_signature_parse_der(
270252 int inputlen
271253) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
272254
273- /** Parse a compact ECDSA signature (64 bytes + recovery id).
274- *
275- * Returns: 1 when the signature could be parsed, 0 otherwise
276- * In: ctx: a secp256k1 context object
277- * input64: a pointer to a 64-byte compact signature
278- * recid: the recovery id (0, 1, 2 or 3)
279- * Out: sig: a pointer to a signature object
280- */
281- int secp256k1_ecdsa_recoverable_signature_parse_compact (
282- const secp256k1_context_t * ctx ,
283- secp256k1_ecdsa_recoverable_signature_t * sig ,
284- const unsigned char * input64 ,
285- int recid
286- ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
287-
288- /** Convert a recoverable signature into a normal signature.
289- *
290- * Returns: 1
291- * In: sigin: a pointer to a recoverable signature (cannot be NULL).
292- * Out: sig: a pointer to a normal signature (cannot be NULL).
293- */
294- int secp256k1_ecdsa_recoverable_signature_convert (
295- const secp256k1_context_t * ctx ,
296- secp256k1_ecdsa_signature_t * sig ,
297- const secp256k1_ecdsa_recoverable_signature_t * sigin
298- ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
299-
300255/** Serialize an ECDSA signature in DER format.
301256 *
302257 * Returns: 1 if enough space was available to serialize, 0 otherwise
@@ -315,21 +270,6 @@ int secp256k1_ecdsa_signature_serialize_der(
315270 const secp256k1_ecdsa_signature_t * sig
316271) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
317272
318- /** Serialize an ECDSA signature in compact format (64 bytes + recovery id).
319- *
320- * Returns: 1
321- * In: ctx: a secp256k1 context object
322- * sig: a pointer to an initialized signature object (cannot be NULL)
323- * Out: output64: a pointer to a 64-byte array of the compact signature (cannot be NULL)
324- * recid: a pointer to an integer to hold the recovery id (can be NULL).
325- */
326- int secp256k1_ecdsa_recoverable_signature_serialize_compact (
327- const secp256k1_context_t * ctx ,
328- unsigned char * output64 ,
329- int * recid ,
330- const secp256k1_ecdsa_recoverable_signature_t * sig
331- ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (4 );
332-
333273/** Verify an ECDSA signature.
334274 *
335275 * Returns: 1: correct signature
@@ -366,8 +306,6 @@ extern const secp256k1_nonce_function_t secp256k1_nonce_function_default;
366306 * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL)
367307 * Out: sig: pointer to an array where the signature will be placed (cannot be NULL)
368308 *
369- * The resulting signature will support pubkey recovery.
370- *
371309 * The sig always has an s value in the lower half of the range (From 0x1
372310 * to 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0,
373311 * inclusive), unlike many other implementations.
@@ -404,42 +342,6 @@ int secp256k1_ecdsa_sign(
404342 const void * ndata
405343) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
406344
407- /** Create a recoverable ECDSA signature.
408- *
409- * Returns: 1: signature created
410- * 0: the nonce generation function failed, or the private key was invalid.
411- * In: ctx: pointer to a context object, initialized for signing (cannot be NULL)
412- * msg32: the 32-byte message hash being signed (cannot be NULL)
413- * seckey: pointer to a 32-byte secret key (cannot be NULL)
414- * noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used
415- * ndata: pointer to arbitrary data used by the nonce generation function (can be NULL)
416- * Out: sig: pointer to an array where the signature will be placed (cannot be NULL)
417- */
418- int secp256k1_ecdsa_sign_recoverable (
419- const secp256k1_context_t * ctx ,
420- const unsigned char * msg32 ,
421- secp256k1_ecdsa_recoverable_signature_t * sig ,
422- const unsigned char * seckey ,
423- secp256k1_nonce_function_t noncefp ,
424- const void * ndata
425- ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
426-
427- /** Recover an ECDSA public key from a signature.
428- *
429- * Returns: 1: public key successfully recovered (which guarantees a correct signature).
430- * 0: otherwise.
431- * In: ctx: pointer to a context object, initialized for verification (cannot be NULL)
432- * msg32: the 32-byte message hash assumed to be signed (cannot be NULL)
433- * sig: pointer to initialized signature that supports pubkey recovery (cannot be NULL)
434- * Out: pubkey: pointer to the recoved public key (cannot be NULL)
435- */
436- SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_recover (
437- const secp256k1_context_t * ctx ,
438- const unsigned char * msg32 ,
439- const secp256k1_ecdsa_recoverable_signature_t * sig ,
440- secp256k1_pubkey_t * pubkey
441- ) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
442-
443345/** Verify an ECDSA secret key.
444346 *
445347 * Returns: 1: secret key is valid
0 commit comments