secp256k1_ecdsa_sign

Create an ECDSA signature.

extern (C)
int
secp256k1_ecdsa_sign

Return Value

Type: int

1: signature created 0: the nonce generation function failed, or the secret key was invalid. Args: ctx: pointer to a context object, initialized for signing. Out: sig: pointer to an array where the signature will be placed. In: msghash32: the 32-byte message hash being signed. seckey: pointer to a 32-byte secret key. 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). If it is non-NULL and secp256k1_nonce_function_default is used, then ndata must be a pointer to 32-bytes of additional data.

The created signature is always in lower-S form. See secp256k1_ecdsa_signature_normalize for more details.

Meta