forked from trezor/trezor-firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zkp_bip340.h
22 lines (19 loc) · 1013 Bytes
/
zkp_bip340.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef __ZKP_BIP340_H__
#define __ZKP_BIP340_H__
#include <stdint.h>
int zkp_bip340_get_public_key(const uint8_t *private_key_bytes,
uint8_t *public_key_bytes);
int zkp_bip340_sign_digest(const uint8_t *private_key_bytes,
const uint8_t *digest, uint8_t *signature_bytes,
uint8_t *auxiliary_data);
int zkp_bip340_verify_digest(const uint8_t *public_key_bytes,
const uint8_t *signature_bytes,
const uint8_t *digest);
int zkp_bip340_verify_publickey(const uint8_t *public_key_bytes);
int zkp_bip340_tweak_public_key(const uint8_t *internal_public_key,
const uint8_t *root_hash,
uint8_t *output_public_key);
int zkp_bip340_tweak_private_key(const uint8_t *internal_private_key,
const uint8_t *root_hash,
uint8_t *output_private_key);
#endif