uECC_sign() function
Generate an ECDSA signature for a given hash value. @warning A cryptographically-secure PRNG function must be set (using uECC_set_rng()) before calling uECC_sign().
Arguments
p_private_key
IN -- Your private key.
p_message_hash
IN -- The hash of the message to sign.
p_hash_size
IN -- The size of p_message_hash in bytes.
p_signature
OUT -- Will be filled in with the signature value. Must be at least 2 * curve size long (for secp256r1, signature must be 64 bytes long).
Return value
returns TC_CRYPTO_SUCCESS (1) if the signature generated successfully returns TC_CRYPTO_FAIL (0) if an error occurred.
Notes
Usage: Compute a hash of the data you wish to sign (SHA-2 is recommended) and pass it in to this function along with your private key. side-channel countermeasure: algorithm strengthened against timing attack.