lightningd/hsm_control.c: Implement getsharedsecret.

ChangeLog-Added: New `getsharedsecret` command, which lets you compute a shared secret with this node knowing only a public point. This implements the BOLT standard of hashing the ECDH point, and is incompatible with ECIES.
This commit is contained in:
ZmnSCPxj jxPCSnmZ
2020-02-04 13:53:17 +08:00
committed by Rusty Russell
parent 1b0807444b
commit d9b2482415
10 changed files with 284 additions and 2 deletions

View File

@@ -61,4 +61,7 @@ static const errcode_t INVOICE_HINTS_GAVE_NO_ROUTES = 902;
static const errcode_t INVOICE_EXPIRED_DURING_WAIT = 903;
static const errcode_t INVOICE_WAIT_TIMED_OUT = 904;
/* Errors from HSM crypto operations. */
static const errcode_t HSM_ECDH_FAILED = 800;
#endif /* LIGHTNING_COMMON_JSONRPC_ERRORS_H */