2015-06-26 04:24:07 +02:00
|
|
|
#ifndef LIGHTNING_BITCOIN_PRIVKEY_H
|
|
|
|
#define LIGHTNING_BITCOIN_PRIVKEY_H
|
2016-01-21 21:08:08 +01:00
|
|
|
#include "config.h"
|
2015-06-26 04:24:07 +02:00
|
|
|
#include <ccan/short_types/short_types.h>
|
2018-07-04 07:30:02 +02:00
|
|
|
#include <ccan/structeq/structeq.h>
|
2015-06-26 04:24:07 +02:00
|
|
|
|
2017-05-06 04:19:44 +02:00
|
|
|
/* General 256-bit secret, which must be private. Used in various places. */
|
|
|
|
struct secret {
|
|
|
|
u8 data[32];
|
|
|
|
};
|
2018-08-17 06:16:34 +02:00
|
|
|
|
|
|
|
/* You probably shouldn't compare secrets in non-const time! */
|
|
|
|
bool secret_eq_consttime(const struct secret *a, const struct secret *b);
|
2017-05-06 04:19:44 +02:00
|
|
|
|
2015-06-26 04:24:07 +02:00
|
|
|
/* This is a private key. Keep it secret. */
|
|
|
|
struct privkey {
|
2017-05-06 04:19:44 +02:00
|
|
|
struct secret secret;
|
2015-06-26 04:24:07 +02:00
|
|
|
};
|
|
|
|
#endif /* LIGHTNING_BITCOIN_PRIVKEY_H */
|