![]() |
ndn-lite
|
Functions | |
static void | bits2int (tc_uECC_word_t *native, const uint8_t *bits, unsigned bits_size, tc_uECC_Curve curve) |
int | tc_uECC_sign_with_k (const uint8_t *private_key, const uint8_t *message_hash, unsigned hash_size, tc_uECC_word_t *k, uint8_t *signature, tc_uECC_Curve curve) |
int | tc_uECC_sign (const uint8_t *private_key, const uint8_t *message_hash, unsigned hash_size, uint8_t *signature, tc_uECC_Curve curve) |
Generate an ECDSA signature for a given hash value. More... | |
static bitcount_t | smax (bitcount_t a, bitcount_t b) |
int | tc_uECC_verify (const uint8_t *public_key, const uint8_t *message_hash, unsigned hash_size, const uint8_t *signature, tc_uECC_Curve curve) |
Variables | |
static tc_uECC_RNG_Function | g_rng_function = 0 |
|
static |
|
static |
int tc_uECC_sign | ( | const uint8_t * | p_private_key, |
const uint8_t * | p_message_hash, | ||
unsigned | p_hash_size, | ||
uint8_t * | p_signature, | ||
tc_uECC_Curve | curve | ||
) |
Generate an ECDSA signature for a given hash value.
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). |
int tc_uECC_sign_with_k | ( | const uint8_t * | private_key, |
const uint8_t * | message_hash, | ||
unsigned | hash_size, | ||
tc_uECC_word_t * | k, | ||
uint8_t * | signature, | ||
tc_uECC_Curve | curve | ||
) |
int tc_uECC_verify | ( | const uint8_t * | public_key, |
const uint8_t * | message_hash, | ||
unsigned | hash_size, | ||
const uint8_t * | signature, | ||
tc_uECC_Curve | curve | ||
) |
|
static |