Changeset View
Changeset View
Standalone View
Standalone View
src/secp256k1/include/secp256k1_schnorr.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | SECP256K1_API int secp256k1_schnorr_sign( | ||||
const secp256k1_context *ctx, | const secp256k1_context *ctx, | ||||
unsigned char *sig64, | unsigned char *sig64, | ||||
const unsigned char *msg32, | const unsigned char *msg32, | ||||
const unsigned char *seckey, | const unsigned char *seckey, | ||||
secp256k1_nonce_function noncefp, | secp256k1_nonce_function noncefp, | ||||
const void *ndata | const void *ndata | ||||
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5); | ) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5); | ||||
/** | |||||
* This function combines several keys into one. | |||||
* The combined public key looks like a regular public key, but generating | |||||
* a signature for it necessitates all the priavate keys corresponding to each | |||||
Fabien: priavate => private | |||||
* combined public key. | |||||
* Args: ctx: pointer to a context object, initialized for signing | |||||
* (cannot be NULL) | |||||
* Out: C: pointer to a 32-byte buffer where a unique identifier | |||||
* of the key combination will be placed (cannot be NULL) | |||||
* combined_pubkey: pointer to a secp256k1_pubkey where the combined | |||||
* public key will be placed (cannot be NULL) | |||||
* In: pubkeys: pointer to an array of public keys (cannot be NULL) | |||||
* nkeys: how many public keys are to be combined | |||||
*/ | |||||
SECP256K1_API int secp256k1_schnorr_combine_keys( | |||||
const secp256k1_context *ctx, | |||||
unsigned char *C, | |||||
secp256k1_pubkey *combined_pubkey, | |||||
const secp256k1_pubkey *pubkeys, | |||||
const size_t nkeys | |||||
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4); | |||||
/** | |||||
* This function retrieve the partial private key corresponding to a share | |||||
* of a combined public key. | |||||
* This partial key can be used to create a partial signature. Partial | |||||
* signature can then be combined to form a schnorr signature. | |||||
* Args: ctx: pointer to a context object, initialized for signing | |||||
* (cannot be NULL) | |||||
* Out: partial_key: pointer to a 32-byte buffer where the partial | |||||
* private key will be placed (cannot be NULL) | |||||
* In: C: pointer to a 32-byte buffer containing the unique | |||||
* identifier provided by secp256k1_schnorr_combine_keys | |||||
* (cannot be NULL) | |||||
* seckey: pointer to a 32-byte secret key (cannot be NULL) | |||||
* pubkey: the public key to sign with (cannot be NULL) | |||||
*/ | |||||
SECP256K1_API int secp256k1_schnorr_get_partial_key( | |||||
const secp256k1_context *ctx, | |||||
unsigned char *partial_key, | |||||
const unsigned char *C, | |||||
const unsigned char *seckey, | |||||
const secp256k1_pubkey *pubkey | |||||
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) SECP256K1_ARG_NONNULL(5); | |||||
# ifdef __cplusplus | # ifdef __cplusplus | ||||
} | } | ||||
# endif | # endif | ||||
#endif | #endif |
priavate => private