mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 23:48:12 +00:00
commit
5ce27a1e1a
6
base58.h
6
base58.h
@ -25,8 +25,14 @@
|
|||||||
#define __BASE58_H__
|
#define __BASE58_H__
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
int base58_encode_check(const uint8_t *data, int len, char *str, int strsize);
|
int base58_encode_check(const uint8_t *data, int len, char *str, int strsize);
|
||||||
int base58_decode_check(const char *str, uint8_t *data, int datalen);
|
int base58_decode_check(const char *str, uint8_t *data, int datalen);
|
||||||
|
|
||||||
|
// Private
|
||||||
|
bool b58tobin(void *bin, size_t *binszp, const char *b58);
|
||||||
|
int b58check(const void *bin, size_t binsz, const char *base58str);
|
||||||
|
bool b58enc(char *b58, size_t *b58sz, const void *data, size_t binsz);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
3
bip32.h
3
bip32.h
@ -55,4 +55,7 @@ void hdnode_serialize_private(const HDNode *node, char *str, int strsize);
|
|||||||
|
|
||||||
int hdnode_deserialize(const char *str, HDNode *node);
|
int hdnode_deserialize(const char *str, HDNode *node);
|
||||||
|
|
||||||
|
// Private
|
||||||
|
void hdnode_serialize(const HDNode *node, uint32_t version, char use_public, char *str, int strsize);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
4
ecdsa.h
4
ecdsa.h
@ -56,4 +56,8 @@ int ecdsa_verify_double(const uint8_t *pub_key, const uint8_t *sig, const uint8_
|
|||||||
int ecdsa_verify_digest(const uint8_t *pub_key, const uint8_t *sig, const uint8_t *digest);
|
int ecdsa_verify_digest(const uint8_t *pub_key, const uint8_t *sig, const uint8_t *digest);
|
||||||
int ecdsa_sig_to_der(const uint8_t *sig, uint8_t *der);
|
int ecdsa_sig_to_der(const uint8_t *sig, uint8_t *der);
|
||||||
|
|
||||||
|
// Private
|
||||||
|
int generate_k_rfc6979(bignum256 *secret, const uint8_t *priv_key, const uint8_t *hash);
|
||||||
|
int generate_k_random(bignum256 *k);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user