3#include "mbedtls/entropy.h"
4#include "mbedtls/ctr_drbg.h"
5#include "mbedtls/ecdsa.h"
7#define CURVE MBEDTLS_ECP_DP_SECP256K1
33mbedtls_ecdsa_context *gen_keys();
50 unsigned char *dest,
size_t dest_len,
51 unsigned char *hash,
size_t hash_len,
52 mbedtls_ecdsa_context *keys
68 unsigned char *sig,
size_t sig_len,
69 unsigned char *hash,
size_t hash_len,
70 mbedtls_ecdsa_context *key_pair
80void build_ctx_from_public(mbedtls_ecdsa_context *ctx, mbedtls_ecp_point *pub_key);
92int hash_sha256(
unsigned char *output_hash,
unsigned char *input_data,
size_t input_sz);
100void hash_pub_key(
unsigned char *dest, mbedtls_ecdsa_context *key_pair);
119void dump_buf(
char *prefix,
const char *title,
const unsigned char *buf,
size_t len);
124extern mbedtls_entropy_context *entropy;
125extern mbedtls_ctr_drbg_context *ctr_drbg;