Bitcoin ABC 0.30.5
P2P Digital Currency
|
#include "secp256k1.h"
Go to the source code of this file.
Functions | |
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int | secp256k1_schnorr_verify (const secp256k1_context *ctx, const unsigned char *sig64, const unsigned char *msghash32, const secp256k1_pubkey *pubkey) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) |
Verify a signature created by secp256k1_schnorr_sign. More... | |
SECP256K1_API int | secp256k1_schnorr_sign (const secp256k1_context *ctx, unsigned char *sig64, const unsigned char *msghash32, const unsigned char *seckey, secp256k1_nonce_function noncefp, const void *ndata) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3) SECP256K1_ARG_NONNULL(4) |
Create a signature using a custom EC-Schnorr-SHA256 construction. More... | |
SECP256K1_API int secp256k1_schnorr_sign | ( | const secp256k1_context * | ctx, |
unsigned char * | sig64, | ||
const unsigned char * | msghash32, | ||
const unsigned char * | seckey, | ||
secp256k1_nonce_function | noncefp, | ||
const void * | ndata | ||
) |
Create a signature using a custom EC-Schnorr-SHA256 construction.
It produces non-malleable 64-byte signatures which support batch validation, and multiparty signing. Returns: 1: signature created 0: the nonce generation function failed, or the private key was invalid. Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) Out: sig64: pointer to a 64-byte array where the signature will be placed (cannot be NULL) In: msghash32: the 32-byte message hash being signed (cannot be NULL). seckey: pointer to a 32-byte secret key (cannot be NULL) noncefp: pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used ndata: pointer to arbitrary data used by the nonce generation function (can be NULL)
Definition at line 33 of file main_impl.h.
SECP256K1_API SECP256K1_WARN_UNUSED_RESULT int secp256k1_schnorr_verify | ( | const secp256k1_context * | ctx, |
const unsigned char * | sig64, | ||
const unsigned char * | msghash32, | ||
const secp256k1_pubkey * | pubkey | ||
) |
Verify a signature created by secp256k1_schnorr_sign.
Returns: 1: correct signature 0: incorrect signature Args: ctx: a secp256k1 context object, initialized for verification. In: sig64: the 64-byte signature being verified (cannot be NULL) msghash32: the 32-byte message hash being verified (cannot be NULL). The verifier must make sure to apply a cryptographic hash function to the message by itself and not accept an msghash32 value directly. Otherwise, it would be easy to create a "valid" signature without knowledge of the secret key. pubkey: the public key to verify with (cannot be NULL)
Definition at line 13 of file main_impl.h.