From 694342fdb71722b31dd4b6bc7241b992fdf6f492 Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Thu, 31 Oct 2024 13:55:52 -0400 Subject: [PATCH] Name public API structs --- include/secp256k1.h | 4 ++-- include/secp256k1_extrakeys.h | 4 ++-- include/secp256k1_musig.h | 12 ++++++------ include/secp256k1_recovery.h | 2 +- include/secp256k1_schnorrsig.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/secp256k1.h b/include/secp256k1.h index b0c5e63404..c6e9417f05 100644 --- a/include/secp256k1.h +++ b/include/secp256k1.h @@ -58,7 +58,7 @@ typedef struct secp256k1_context_struct secp256k1_context; * use secp256k1_ec_pubkey_serialize and secp256k1_ec_pubkey_parse. To * compare keys, use secp256k1_ec_pubkey_cmp. */ -typedef struct { +typedef struct secp256k1_pubkey { unsigned char data[64]; } secp256k1_pubkey; @@ -71,7 +71,7 @@ typedef struct { * comparison, use the secp256k1_ecdsa_signature_serialize_* and * secp256k1_ecdsa_signature_parse_* functions. */ -typedef struct { +typedef struct secp256k1_ecdsa_signature { unsigned char data[64]; } secp256k1_ecdsa_signature; diff --git a/include/secp256k1_extrakeys.h b/include/secp256k1_extrakeys.h index 13acb0325f..48c98693cf 100644 --- a/include/secp256k1_extrakeys.h +++ b/include/secp256k1_extrakeys.h @@ -19,7 +19,7 @@ extern "C" { * use secp256k1_xonly_pubkey_serialize and secp256k1_xonly_pubkey_parse. To * compare keys, use secp256k1_xonly_pubkey_cmp. */ -typedef struct { +typedef struct secp256k1_xonly_pubkey { unsigned char data[64]; } secp256k1_xonly_pubkey; @@ -30,7 +30,7 @@ typedef struct { * guaranteed to be portable between different platforms or versions. It is * however guaranteed to be 96 bytes in size, and can be safely copied/moved. */ -typedef struct { +typedef struct secp256k1_keypair { unsigned char data[96]; } secp256k1_keypair; diff --git a/include/secp256k1_musig.h b/include/secp256k1_musig.h index 53501814e1..11b8f08c88 100644 --- a/include/secp256k1_musig.h +++ b/include/secp256k1_musig.h @@ -40,7 +40,7 @@ extern "C" { * Guaranteed to be 197 bytes in size. No serialization and parsing functions * (yet). */ -typedef struct { +typedef struct secp256k1_musig_keyagg_cache { unsigned char data[197]; } secp256k1_musig_keyagg_cache; @@ -56,7 +56,7 @@ typedef struct { * Copying this data structure can result in nonce reuse which will leak the * secret signing key. */ -typedef struct { +typedef struct secp256k1_musig_secnonce { unsigned char data[132]; } secp256k1_musig_secnonce; @@ -65,7 +65,7 @@ typedef struct { * Guaranteed to be 132 bytes in size. Serialized and parsed with * `musig_pubnonce_serialize` and `musig_pubnonce_parse`. */ -typedef struct { +typedef struct secp256k1_musig_pubnonce { unsigned char data[132]; } secp256k1_musig_pubnonce; @@ -74,7 +74,7 @@ typedef struct { * Guaranteed to be 132 bytes in size. Serialized and parsed with * `musig_aggnonce_serialize` and `musig_aggnonce_parse`. */ -typedef struct { +typedef struct secp256k1_musig_aggnonce { unsigned char data[132]; } secp256k1_musig_aggnonce; @@ -84,7 +84,7 @@ typedef struct { * be secure. Guaranteed to be 133 bytes in size. No serialization and parsing * functions (yet). */ -typedef struct { +typedef struct secp256k1_musig_session { unsigned char data[133]; } secp256k1_musig_session; @@ -93,7 +93,7 @@ typedef struct { * Guaranteed to be 36 bytes in size. Serialized and parsed with * `musig_partial_sig_serialize` and `musig_partial_sig_parse`. */ -typedef struct { +typedef struct secp256k1_musig_partial_sig { unsigned char data[36]; } secp256k1_musig_partial_sig; diff --git a/include/secp256k1_recovery.h b/include/secp256k1_recovery.h index 78a3eee05c..93a2e4ccbd 100644 --- a/include/secp256k1_recovery.h +++ b/include/secp256k1_recovery.h @@ -21,7 +21,7 @@ extern "C" { * recoverability) will have identical representation, so they can be * memcmp'ed. */ -typedef struct { +typedef struct secp256k1_ecdsa_recoverable_signature { unsigned char data[65]; } secp256k1_ecdsa_recoverable_signature; diff --git a/include/secp256k1_schnorrsig.h b/include/secp256k1_schnorrsig.h index 23163de2fb..013d4ee73d 100644 --- a/include/secp256k1_schnorrsig.h +++ b/include/secp256k1_schnorrsig.h @@ -79,7 +79,7 @@ SECP256K1_API const secp256k1_nonce_function_hardened secp256k1_nonce_function_b * secp256k1_nonce_function_bip340 is used, then ndata must be a * pointer to 32-byte auxiliary randomness as per BIP-340. */ -typedef struct { +typedef struct secp256k1_schnorrsig_extraparams { unsigned char magic[4]; secp256k1_nonce_function_hardened noncefp; void *ndata;