73 uint8_t rnddata[32], hash[32];
77 unsigned char sig[74];
120 if (pubkey_inout == NULL || privkey == NULL)
btc_bool btc_pubkey_verify_sig(const btc_pubkey *pubkey, const uint8_t *hash, unsigned char *sigder, int len)
void ecc_get_pubkey(const uint8_t *private_key, uint8_t *public_key, size_t *in_outlen, btc_bool compressed)
get public key from given private key
btc_bool btc_privkey_is_valid(btc_key *privkey)
btc_bool btc_privkey_verify_pubkey(btc_key *privkey, btc_pubkey *pubkey)
#define BTC_ECKEY_PKEY_LENGTH
void btc_privkey_init(btc_key *privkey)
btc_bool random_bytes(uint8_t *buf, uint32_t len, const uint8_t update_seed)
#define BTC_ECKEY_COMPRESSED_LENGTH
void btc_pubkey_cleanse(btc_pubkey *pubkey)
void btc_privkey_gen(btc_key *privkey)
btc_bool ecc_verify_pubkey(const uint8_t *public_key, btc_bool compressed)
verifies a given public key (compressed[33] or uncompressed[65] bytes)
#define BTC_ECKEY_UNCOMPRESSED_LENGTH
void btc_pubkey_init(btc_pubkey *pubkey)
void btc_privkey_cleanse(btc_key *privkey)
void ripemd160(const uint8_t *msg, uint32_t msg_len, uint8_t *hash)
btc_bool btc_pubkey_is_valid(btc_pubkey *pubkey)
btc_bool ecc_sign(const uint8_t *private_key, const uint8_t *hash, unsigned char *sigder, size_t *outlen)
void btc_pubkey_from_key(btc_key *privkey, btc_pubkey *pubkey_inout)
btc_bool btc_key_sign_hash(const btc_key *privkey, const uint8_t *hash, unsigned char *sigout, size_t *outlen)
void btc_pubkey_get_hash160(const btc_pubkey *pubkey, uint8_t *hash160)
void btc_hash(const unsigned char *datain, size_t length, uint256 hashout)
uint8_t pubkey[BTC_ECKEY_UNCOMPRESSED_LENGTH]
btc_bool ecc_verify_privatekey(const uint8_t *private_key)
verifies a given 32byte key
uint8_t privkey[BTC_ECKEY_PKEY_LENGTH]
btc_bool ecc_verify_sig(const uint8_t *public_key, btc_bool compressed, const uint8_t *hash, unsigned char *sigder, size_t siglen)