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