mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
3b4a06f52b
common/onion is going to need to use this for the case where it finds a blinding seed inside the TLV. But how it does ecdh is daemon-specific. We already had this problem for devtools/gossipwith, which supplied a special hsm_do_ecdh(). This just makes it more general. So we create a generic ecdh() interface, with a specific implementation which subdaemons and lightningd can use. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
14 lines
424 B
C
14 lines
424 B
C
#ifndef LIGHTNING_COMMON_ECDH_H
|
|
#define LIGHTNING_COMMON_ECDH_H
|
|
#include "config.h"
|
|
|
|
struct pubkey;
|
|
struct secret;
|
|
|
|
/* This function is implemented differently in various daemons and tools:
|
|
* subdaemons need to talk to the HSM via hsm_fd, lightningd needs to use
|
|
* its HSM interface, and tools can implement this directly. */
|
|
void ecdh(const struct pubkey *point, struct secret *ss);
|
|
|
|
#endif /* LIGHTNING_COMMON_ECDH_H */
|