2015-10-06 03:33:03 +02:00
|
|
|
#ifndef ONION_KEY_H
|
|
|
|
#define ONION_KEY_H
|
|
|
|
#include <ccan/endian/endian.h>
|
2015-10-06 03:33:53 +02:00
|
|
|
#include "bitcoin/privkey.h"
|
2015-10-06 03:33:03 +02:00
|
|
|
|
|
|
|
struct seckey {
|
|
|
|
union {
|
2015-10-06 03:33:53 +02:00
|
|
|
struct privkey k;
|
2015-10-06 03:33:03 +02:00
|
|
|
unsigned char u8[32];
|
|
|
|
beint64_t be64[4];
|
|
|
|
} u;
|
|
|
|
};
|
|
|
|
|
2015-10-06 15:49:52 +02:00
|
|
|
/* First byte is 0x02 or 0x03 indicating even or odd y */
|
|
|
|
struct compressed_pubkey {
|
|
|
|
unsigned char u8[33];
|
|
|
|
};
|
|
|
|
|
2015-10-06 03:33:03 +02:00
|
|
|
/* Prepend 0x02 to get pubkey for libsecp256k1 */
|
|
|
|
struct onion_pubkey {
|
|
|
|
unsigned char u8[32];
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* ONION_KEY_H */
|