|
libbtc
bitcoinclibrary
|
Go to the source code of this file.
Functions | |
| LIBBTC_API void | ecc_start (void) |
| init static ecc context More... | |
| LIBBTC_API void | ecc_stop (void) |
| destroys the static ecc context More... | |
| LIBBTC_API void | ecc_get_pubkey (const uint8_t *private_key, uint8_t *public_key, size_t *public_key_len, btc_bool compressed) |
| get public key from given private key More... | |
| LIBBTC_API btc_bool | ecc_private_key_tweak_add (uint8_t *private_key, const uint8_t *tweak) |
| ec mul tweak on given private key More... | |
| LIBBTC_API btc_bool | ecc_public_key_tweak_add (uint8_t *public_key_inout, const uint8_t *tweak) |
| ec mul tweak on given public key More... | |
| LIBBTC_API btc_bool | ecc_verify_privatekey (const uint8_t *private_key) |
| verifies a given 32byte key More... | |
| LIBBTC_API btc_bool | ecc_verify_pubkey (const uint8_t *public_key, btc_bool compressed) |
| verifies a given public key (compressed[33] or uncompressed[65] bytes) More... | |
| LIBBTC_API btc_bool | ecc_sign (const uint8_t *private_key, const uint8_t *hash, unsigned char *sigder, size_t *outlen) |
| LIBBTC_API btc_bool | ecc_verify_sig (const uint8_t *public_key, btc_bool compressed, const uint8_t *hash, unsigned char *sigder, size_t siglen) |
| LIBBTC_API void ecc_get_pubkey | ( | const uint8_t * | private_key, |
| uint8_t * | public_key, | ||
| size_t * | public_key_len, | ||
| btc_bool | compressed | ||
| ) |
get public key from given private key
Definition at line 36 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
Referenced by btc_hdnode_fill_public_key(), and btc_pubkey_from_key().
| LIBBTC_API btc_bool ecc_private_key_tweak_add | ( | uint8_t * | private_key, |
| const uint8_t * | tweak | ||
| ) |
ec mul tweak on given private key
Definition at line 54 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
Referenced by btc_hdnode_private_ckd().
| LIBBTC_API btc_bool ecc_public_key_tweak_add | ( | uint8_t * | public_key_inout, |
| const uint8_t * | tweak | ||
| ) |
ec mul tweak on given public key
Definition at line 60 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
Referenced by btc_hdnode_public_ckd().
| LIBBTC_API btc_bool ecc_sign | ( | const uint8_t * | private_key, |
| const uint8_t * | hash, | ||
| unsigned char * | sigder, | ||
| size_t * | outlen | ||
| ) |
Definition at line 99 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
Referenced by btc_key_sign_hash().
| LIBBTC_API void ecc_start | ( | void | ) |
init static ecc context
Definition at line 13 of file ecc_libsecp256k1.c.
References random_bytes(), and secp256k1_ctx.
| LIBBTC_API void ecc_stop | ( | void | ) |
destroys the static ecc context
Definition at line 25 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
| LIBBTC_API btc_bool ecc_verify_privatekey | ( | const uint8_t * | private_key | ) |
verifies a given 32byte key
Definition at line 79 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
Referenced by btc_hdnode_from_seed(), btc_hdnode_private_ckd(), btc_privkey_gen(), and btc_privkey_is_valid().
| LIBBTC_API btc_bool ecc_verify_pubkey | ( | const uint8_t * | public_key, |
| btc_bool | compressed | ||
| ) |
verifies a given public key (compressed[33] or uncompressed[65] bytes)
Definition at line 85 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
Referenced by btc_pubkey_is_valid().
| LIBBTC_API btc_bool ecc_verify_sig | ( | const uint8_t * | public_key, |
| btc_bool | compressed, | ||
| const uint8_t * | hash, | ||
| unsigned char * | sigder, | ||
| size_t | siglen | ||
| ) |
Definition at line 113 of file ecc_libsecp256k1.c.
References secp256k1_ctx.
Referenced by btc_pubkey_verify_sig().
1.8.10