mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
Increased length of addresses
This commit is contained in:
parent
506167e3f2
commit
a5653dafe7
10
ecdsa.h
10
ecdsa.h
@ -48,10 +48,16 @@ typedef struct {
|
|||||||
|
|
||||||
} ecdsa_curve;
|
} ecdsa_curve;
|
||||||
|
|
||||||
|
// 4 byte prefix + 40 byte data (segwit)
|
||||||
#define MAX_ADDR_RAW_SIZE (4 + 40)
|
#define MAX_ADDR_RAW_SIZE (4 + 40)
|
||||||
|
// bottle neck is segwit bech32:
|
||||||
|
// 4 human readable prefix + 1 separator + 64 data + 6 checksum + 1 NUL
|
||||||
|
// the standard says 83 characters in hrp, but currently all coins use only 2
|
||||||
|
#define MAX_ADDR_SIZE (4+1+64+6+1)
|
||||||
|
// 4 byte prefix + 32 byte privkey + 1 byte compressed marker
|
||||||
#define MAX_WIF_RAW_SIZE (4 + 32 + 1)
|
#define MAX_WIF_RAW_SIZE (4 + 32 + 1)
|
||||||
#define MAX_ADDR_SIZE (54)
|
// (4+32+1 + 4 [checksum]) * 8 / log2(58) plus NUL.
|
||||||
#define MAX_WIF_SIZE (58)
|
#define MAX_WIF_SIZE (57)
|
||||||
|
|
||||||
void point_copy(const curve_point *cp1, curve_point *cp2);
|
void point_copy(const curve_point *cp1, curve_point *cp2);
|
||||||
void point_add(const ecdsa_curve *curve, const curve_point *cp1, curve_point *cp2);
|
void point_add(const ecdsa_curve *curve, const curve_point *cp1, curve_point *cp2);
|
||||||
|
Loading…
Reference in New Issue
Block a user