2015-06-26 11:54:07 +09:30
|
|
|
#ifndef LIGHTNING_BITCOIN_PRIVKEY_H
|
|
|
|
#define LIGHTNING_BITCOIN_PRIVKEY_H
|
2016-01-22 06:38:08 +10:30
|
|
|
#include "config.h"
|
2015-06-26 11:54:07 +09:30
|
|
|
#include <ccan/short_types/short_types.h>
|
2018-07-04 15:00:02 +09:30
|
|
|
#include <ccan/structeq/structeq.h>
|
2015-06-26 11:54:07 +09:30
|
|
|
|
2017-05-06 11:49:44 +09:30
|
|
|
/* General 256-bit secret, which must be private. Used in various places. */
|
|
|
|
struct secret {
|
|
|
|
u8 data[32];
|
|
|
|
};
|
2018-08-17 13:46:34 +09:30
|
|
|
|
|
|
|
/* 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 11:49:44 +09:30
|
|
|
|
2015-06-26 11:54:07 +09:30
|
|
|
/* This is a private key. Keep it secret. */
|
|
|
|
struct privkey {
|
2017-05-06 11:49:44 +09:30
|
|
|
struct secret secret;
|
2015-06-26 11:54:07 +09:30
|
|
|
};
|
|
|
|
#endif /* LIGHTNING_BITCOIN_PRIVKEY_H */
|