|
libbtc
bitcoinclibrary
|
Go to the source code of this file.
Data Structures | |
| struct | btc_key_ |
| struct | btc_pubkey_ |
Typedefs | |
| typedef struct btc_key_ | btc_key |
| typedef struct btc_pubkey_ | btc_pubkey |
Functions | |
| LIBBTC_API void | btc_privkey_init (btc_key *privkey) |
| LIBBTC_API btc_bool | btc_privkey_is_valid (btc_key *privkey) |
| LIBBTC_API void | btc_privkey_cleanse (btc_key *privkey) |
| LIBBTC_API void | btc_privkey_gen (btc_key *privkey) |
| LIBBTC_API btc_bool | btc_privkey_verify_pubkey (btc_key *privkey, btc_pubkey *pubkey) |
| LIBBTC_API void | btc_pubkey_init (btc_pubkey *pubkey) |
| LIBBTC_API btc_bool | btc_pubkey_is_valid (btc_pubkey *pubkey) |
| LIBBTC_API void | btc_pubkey_cleanse (btc_pubkey *pubkey) |
| LIBBTC_API void | btc_pubkey_from_key (btc_key *privkey, btc_pubkey *pubkey_inout) |
| LIBBTC_API void | btc_pubkey_get_hash160 (const btc_pubkey *pubkey, uint8_t *hash160) |
| LIBBTC_API btc_bool | btc_key_sign_hash (const btc_key *privkey, const uint8_t *hash, unsigned char *sigout, size_t *outlen) |
| LIBBTC_API btc_bool | btc_pubkey_verify_sig (const btc_pubkey *pubkey, const uint8_t *hash, unsigned char *sigder, int len) |
| typedef struct btc_pubkey_ btc_pubkey |
| LIBBTC_API btc_bool btc_key_sign_hash | ( | const btc_key * | privkey, |
| const uint8_t * | hash, | ||
| unsigned char * | sigout, | ||
| size_t * | outlen | ||
| ) |
Definition at line 130 of file ecc_key.c.
References ecc_sign(), and btc_key_::privkey.
Referenced by btc_privkey_verify_pubkey().
| LIBBTC_API void btc_privkey_cleanse | ( | btc_key * | privkey | ) |
| LIBBTC_API void btc_privkey_gen | ( | btc_key * | privkey | ) |
Definition at line 60 of file ecc_key.c.
References BTC_ECKEY_PKEY_LENGTH, ecc_verify_privatekey(), btc_key_::privkey, and random_bytes().
| LIBBTC_API void btc_privkey_init | ( | btc_key * | privkey | ) |
| LIBBTC_API btc_bool btc_privkey_is_valid | ( | btc_key * | privkey | ) |
Definition at line 48 of file ecc_key.c.
References ecc_verify_privatekey(), and btc_key_::privkey.
| LIBBTC_API btc_bool btc_privkey_verify_pubkey | ( | btc_key * | privkey, |
| btc_pubkey * | pubkey | ||
| ) |
Definition at line 71 of file ecc_key.c.
References btc_hash(), btc_key_sign_hash(), btc_pubkey_verify_sig(), and random_bytes().
| LIBBTC_API void btc_pubkey_cleanse | ( | btc_pubkey * | pubkey | ) |
Definition at line 103 of file ecc_key.c.
References BTC_ECKEY_UNCOMPRESSED_LENGTH, and btc_pubkey_::pubkey.
| LIBBTC_API void btc_pubkey_from_key | ( | btc_key * | privkey, |
| btc_pubkey * | pubkey_inout | ||
| ) |
Definition at line 118 of file ecc_key.c.
References BTC_ECKEY_COMPRESSED_LENGTH, btc_pubkey_::compressed, ecc_get_pubkey(), btc_key_::privkey, and btc_pubkey_::pubkey.
| LIBBTC_API void btc_pubkey_get_hash160 | ( | const btc_pubkey * | pubkey, |
| uint8_t * | hash160 | ||
| ) |
Definition at line 112 of file ecc_key.c.
References BTC_ECKEY_COMPRESSED_LENGTH, BTC_ECKEY_UNCOMPRESSED_LENGTH, btc_pubkey_::compressed, btc_pubkey_::pubkey, and ripemd160().
Referenced by btc_tx_add_p2pkh_out().
| LIBBTC_API void btc_pubkey_init | ( | btc_pubkey * | pubkey | ) |
Definition at line 87 of file ecc_key.c.
References BTC_ECKEY_UNCOMPRESSED_LENGTH, btc_pubkey_::compressed, and btc_pubkey_::pubkey.
| LIBBTC_API btc_bool btc_pubkey_is_valid | ( | btc_pubkey * | pubkey | ) |
Definition at line 97 of file ecc_key.c.
References btc_pubkey_::compressed, ecc_verify_pubkey(), and btc_pubkey_::pubkey.
| LIBBTC_API btc_bool btc_pubkey_verify_sig | ( | const btc_pubkey * | pubkey, |
| const uint8_t * | hash, | ||
| unsigned char * | sigder, | ||
| int | len | ||
| ) |
Definition at line 136 of file ecc_key.c.
References btc_pubkey_::compressed, ecc_verify_sig(), and btc_pubkey_::pubkey.
Referenced by btc_privkey_verify_pubkey().
1.8.10