@@ -40,7 +40,7 @@ extern "C" {
4040 * Regarding randomization, either do it once at creation time (in which case
4141 * you do not need any locking for the other calls), or use a read-write lock.
4242 */
43- typedef struct secp256k1_context_struct secp256k1_context_t ;
43+ typedef struct secp256k1_context_struct secp256k1_context ;
4444
4545/** Opaque data structure that holds a parsed and valid public key.
4646 *
@@ -55,7 +55,7 @@ typedef struct secp256k1_context_struct secp256k1_context_t;
5555 */
5656typedef struct {
5757 unsigned char data [64 ];
58- } secp256k1_pubkey_t ;
58+ } secp256k1_pubkey ;
5959
6060/** Opaque data structured that holds a parsed ECDSA signature.
6161 *
@@ -71,7 +71,7 @@ typedef struct {
7171 */
7272typedef struct {
7373 unsigned char data [64 ];
74- } secp256k1_ecdsa_signature_t ;
74+ } secp256k1_ecdsa_signature ;
7575
7676/** A pointer to a function to deterministically generate a nonce.
7777 *
@@ -89,7 +89,7 @@ typedef struct {
8989 * Except for test cases, this function should compute some cryptographic hash of
9090 * the message, the algorithm, the key and the attempt.
9191 */
92- typedef int (* secp256k1_nonce_function_t )(
92+ typedef int (* secp256k1_nonce_function )(
9393 unsigned char * nonce32 ,
9494 const unsigned char * msg32 ,
9595 const unsigned char * key32 ,
@@ -145,7 +145,7 @@ typedef int (*secp256k1_nonce_function_t)(
145145 * Returns: a newly created context object.
146146 * In: flags: which parts of the context to initialize.
147147 */
148- secp256k1_context_t * secp256k1_context_create (
148+ secp256k1_context * secp256k1_context_create (
149149 unsigned int flags
150150) SECP256K1_WARN_UNUSED_RESULT ;
151151
@@ -154,8 +154,8 @@ secp256k1_context_t* secp256k1_context_create(
154154 * Returns: a newly created context object.
155155 * Args: ctx: an existing context to copy (cannot be NULL)
156156 */
157- secp256k1_context_t * secp256k1_context_clone (
158- const secp256k1_context_t * ctx
157+ secp256k1_context * secp256k1_context_clone (
158+ const secp256k1_context * ctx
159159) SECP256K1_ARG_NONNULL (1 ) SECP256K1_WARN_UNUSED_RESULT ;
160160
161161/** Destroy a secp256k1 context object.
@@ -164,7 +164,7 @@ secp256k1_context_t* secp256k1_context_clone(
164164 * Args: ctx: an existing context to destroy (cannot be NULL)
165165 */
166166void secp256k1_context_destroy (
167- secp256k1_context_t * ctx
167+ secp256k1_context * ctx
168168);
169169
170170/** Set a callback function to be called when an illegal argument is passed to
@@ -188,7 +188,7 @@ void secp256k1_context_destroy(
188188 * data: the opaque pointer to pass to fun above.
189189 */
190190void secp256k1_context_set_illegal_callback (
191- secp256k1_context_t * ctx ,
191+ secp256k1_context * ctx ,
192192 void (* fun )(const char * message , void * data ),
193193 const void * data
194194) SECP256K1_ARG_NONNULL (1 );
@@ -210,7 +210,7 @@ void secp256k1_context_set_illegal_callback(
210210 * data: the opaque pointer to pass to fun above.
211211 */
212212void secp256k1_context_set_error_callback (
213- secp256k1_context_t * ctx ,
213+ secp256k1_context * ctx ,
214214 void (* fun )(const char * message , void * data ),
215215 const void * data
216216) SECP256K1_ARG_NONNULL (1 );
@@ -230,8 +230,8 @@ void secp256k1_context_set_error_callback(
230230 * byte 0x06 or 0x07) format public keys.
231231 */
232232SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse (
233- const secp256k1_context_t * ctx ,
234- secp256k1_pubkey_t * pubkey ,
233+ const secp256k1_context * ctx ,
234+ secp256k1_pubkey * pubkey ,
235235 const unsigned char * input ,
236236 size_t inputlen
237237) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
@@ -244,16 +244,16 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_parse(
244244 * compressed==1) byte array to place the serialized key in.
245245 * outputlen: a pointer to an integer which will contain the serialized
246246 * size.
247- * In: pubkey: a pointer to a secp256k1_pubkey_t containing an initialized
247+ * In: pubkey: a pointer to a secp256k1_pubkey containing an initialized
248248 * public key.
249249 * flags: SECP256K1_EC_COMPRESSED if serialization should be in
250250 * compressed format.
251251 */
252252int secp256k1_ec_pubkey_serialize (
253- const secp256k1_context_t * ctx ,
253+ const secp256k1_context * ctx ,
254254 unsigned char * output ,
255255 size_t * outputlen ,
256- const secp256k1_pubkey_t * pubkey ,
256+ const secp256k1_pubkey * pubkey ,
257257 unsigned int flags
258258) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
259259
@@ -268,8 +268,8 @@ int secp256k1_ec_pubkey_serialize(
268268 * Note that this function also supports some violations of DER and even BER.
269269 */
270270int secp256k1_ecdsa_signature_parse_der (
271- const secp256k1_context_t * ctx ,
272- secp256k1_ecdsa_signature_t * sig ,
271+ const secp256k1_context * ctx ,
272+ secp256k1_ecdsa_signature * sig ,
273273 const unsigned char * input ,
274274 size_t inputlen
275275) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
@@ -286,10 +286,10 @@ int secp256k1_ecdsa_signature_parse_der(
286286 * In: sig: a pointer to an initialized signature object
287287 */
288288int secp256k1_ecdsa_signature_serialize_der (
289- const secp256k1_context_t * ctx ,
289+ const secp256k1_context * ctx ,
290290 unsigned char * output ,
291291 size_t * outputlen ,
292- const secp256k1_ecdsa_signature_t * sig
292+ const secp256k1_ecdsa_signature * sig
293293) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
294294
295295/** Verify an ECDSA signature.
@@ -302,20 +302,20 @@ int secp256k1_ecdsa_signature_serialize_der(
302302 * pubkey: pointer to an initialized public key to verify with (cannot be NULL)
303303 */
304304SECP256K1_WARN_UNUSED_RESULT int secp256k1_ecdsa_verify (
305- const secp256k1_context_t * ctx ,
306- const secp256k1_ecdsa_signature_t * sig ,
305+ const secp256k1_context * ctx ,
306+ const secp256k1_ecdsa_signature * sig ,
307307 const unsigned char * msg32 ,
308- const secp256k1_pubkey_t * pubkey
308+ const secp256k1_pubkey * pubkey
309309) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
310310
311311/** An implementation of RFC6979 (using HMAC-SHA256) as nonce generation function.
312312 * If a data pointer is passed, it is assumed to be a pointer to 32 bytes of
313313 * extra entropy.
314314 */
315- extern const secp256k1_nonce_function_t secp256k1_nonce_function_rfc6979 ;
315+ extern const secp256k1_nonce_function secp256k1_nonce_function_rfc6979 ;
316316
317317/** A default safe nonce generation function (currently equal to secp256k1_nonce_function_rfc6979). */
318- extern const secp256k1_nonce_function_t secp256k1_nonce_function_default ;
318+ extern const secp256k1_nonce_function secp256k1_nonce_function_default ;
319319
320320/** Create an ECDSA signature.
321321 *
@@ -356,11 +356,11 @@ extern const secp256k1_nonce_function_t secp256k1_nonce_function_default;
356356 * be taken when this property is required for an application.
357357 */
358358int secp256k1_ecdsa_sign (
359- const secp256k1_context_t * ctx ,
360- secp256k1_ecdsa_signature_t * sig ,
359+ const secp256k1_context * ctx ,
360+ secp256k1_ecdsa_signature * sig ,
361361 const unsigned char * msg32 ,
362362 const unsigned char * seckey ,
363- secp256k1_nonce_function_t noncefp ,
363+ secp256k1_nonce_function noncefp ,
364364 const void * ndata
365365) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 ) SECP256K1_ARG_NONNULL (4 );
366366
@@ -372,7 +372,7 @@ int secp256k1_ecdsa_sign(
372372 * In: seckey: pointer to a 32-byte secret key (cannot be NULL)
373373 */
374374SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify (
375- const secp256k1_context_t * ctx ,
375+ const secp256k1_context * ctx ,
376376 const unsigned char * seckey
377377) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 );
378378
@@ -385,8 +385,8 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_seckey_verify(
385385 * In: seckey: pointer to a 32-byte private key (cannot be NULL)
386386 */
387387SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create (
388- const secp256k1_context_t * ctx ,
389- secp256k1_pubkey_t * pubkey ,
388+ const secp256k1_context * ctx ,
389+ secp256k1_pubkey * pubkey ,
390390 const unsigned char * seckey
391391) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
392392
@@ -411,7 +411,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_create(
411411 * guaranteed to be parsable by secp256k1_ec_privkey_import.
412412 */
413413SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_export (
414- const secp256k1_context_t * ctx ,
414+ const secp256k1_context * ctx ,
415415 unsigned char * privkey ,
416416 size_t * privkeylen ,
417417 const unsigned char * seckey ,
@@ -433,7 +433,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_export(
433433 * key.
434434 */
435435SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_import (
436- const secp256k1_context_t * ctx ,
436+ const secp256k1_context * ctx ,
437437 unsigned char * seckey ,
438438 const unsigned char * privkey ,
439439 size_t privkeylen
@@ -449,7 +449,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_import(
449449 * In: tweak: pointer to a 32-byte tweak.
450450 */
451451SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add (
452- const secp256k1_context_t * ctx ,
452+ const secp256k1_context * ctx ,
453453 unsigned char * seckey ,
454454 const unsigned char * tweak
455455) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
@@ -465,8 +465,8 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_add(
465465 * In: tweak: pointer to a 32-byte tweak.
466466 */
467467SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add (
468- const secp256k1_context_t * ctx ,
469- secp256k1_pubkey_t * pubkey ,
468+ const secp256k1_context * ctx ,
469+ secp256k1_pubkey * pubkey ,
470470 const unsigned char * tweak
471471) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
472472
@@ -478,7 +478,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_add(
478478 * In: tweak: pointer to a 32-byte tweak.
479479 */
480480SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul (
481- const secp256k1_context_t * ctx ,
481+ const secp256k1_context * ctx ,
482482 unsigned char * seckey ,
483483 const unsigned char * tweak
484484) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
@@ -492,8 +492,8 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_privkey_tweak_mul(
492492 * In: tweak: pointer to a 32-byte tweak.
493493 */
494494SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul (
495- const secp256k1_context_t * ctx ,
496- secp256k1_pubkey_t * pubkey ,
495+ const secp256k1_context * ctx ,
496+ secp256k1_pubkey * pubkey ,
497497 const unsigned char * tweak
498498) SECP256K1_ARG_NONNULL (1 ) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
499499
@@ -504,7 +504,7 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_tweak_mul(
504504 * In: seed32: pointer to a 32-byte random seed (NULL resets to initial state)
505505 */
506506SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize (
507- secp256k1_context_t * ctx ,
507+ secp256k1_context * ctx ,
508508 const unsigned char * seed32
509509) SECP256K1_ARG_NONNULL (1 );
510510
@@ -520,9 +520,9 @@ SECP256K1_WARN_UNUSED_RESULT int secp256k1_context_randomize(
520520 * uncompressed format is needed.
521521 */
522522SECP256K1_WARN_UNUSED_RESULT int secp256k1_ec_pubkey_combine (
523- const secp256k1_context_t * ctx ,
524- secp256k1_pubkey_t * out ,
525- const secp256k1_pubkey_t * const * ins ,
523+ const secp256k1_context * ctx ,
524+ secp256k1_pubkey * out ,
525+ const secp256k1_pubkey * const * ins ,
526526 int n
527527) SECP256K1_ARG_NONNULL (2 ) SECP256K1_ARG_NONNULL (3 );
528528
0 commit comments