core-lightning/lightningd/hsm/client.h
Rusty Russell b99c5620ef struct secret: use everywhere.
We alternated between using a sha256 and using a privkey, but there are
numerous places where we have a random 32 bytes which are neither.

This fixes many of them (plus, struct privkey is now defined in terms of
struct secret).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-05-09 11:43:35 +09:30

18 lines
462 B
C

/* API to ask the HSM for things. */
#ifndef LIGHTNING_LIGHTNINGD_HSM_H
#define LIGHTNING_LIGHTNINGD_HSM_H
#include "config.h"
#include <ccan/endian/endian.h>
#include <ccan/short_types/short_types.h>
#include <stdbool.h>
struct pubkey;
struct secret;
/* Setup communication to the HSM */
void hsm_setup(int fd);
/* Do ECDH using this node id secret. */
bool hsm_do_ecdh(struct secret *ss, const struct pubkey *point);
#endif /* LIGHTNING_LIGHTNINGD_HSM_H */