onion_key: allowing both odd and even pubkeys

output compressed public keys; accept compressed pubkey in test_onion
This commit is contained in:
Anthony Towns
2015-10-06 23:49:52 +10:00
parent 2042e1cdb7
commit 9ffac49c6f
3 changed files with 14 additions and 5 deletions

View File

@@ -11,6 +11,11 @@ struct seckey {
} u;
};
/* First byte is 0x02 or 0x03 indicating even or odd y */
struct compressed_pubkey {
unsigned char u8[33];
};
/* Prepend 0x02 to get pubkey for libsecp256k1 */
struct onion_pubkey {
unsigned char u8[32];