From 59b358d256e1594d02923e95f081445d6eff2f6e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 30 Jan 2020 08:03:05 +0100 Subject: [PATCH] src/types.h: cleanup EC_PUBKEY_SIZE abit. --- src/types.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/types.h b/src/types.h index eba5182..806b61f 100644 --- a/src/types.h +++ b/src/types.h @@ -25,6 +25,12 @@ #define TYPES_H #define EC_PRIVKEY_SIZE 32 -#define EC_PUBKEY_SIZE 33 /* Compressed: 32 bytes + 1 prefix */ + +/* + * Compressed format! + * z||x, where byte z specifies which (of the 2) solutions of the quadratic equation y is. + * Each cordinate is 32 bytes. + */ +#define EC_PUBKEY_SIZE (32 + 1) #endif /* TYPES_H */