2020-04-03 05:16:56 +02:00
|
|
|
#ifndef LIGHTNING_COMMON_BLINDING_H
|
|
|
|
#define LIGHTNING_COMMON_BLINDING_H
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
struct privkey;
|
|
|
|
struct pubkey;
|
|
|
|
struct secret;
|
|
|
|
struct sha256;
|
|
|
|
|
|
|
|
/* H(E(i) || ss(i)) */
|
|
|
|
void blinding_hash_e_and_ss(const struct pubkey *e,
|
|
|
|
const struct secret *ss,
|
|
|
|
struct sha256 *sha);
|
|
|
|
|
|
|
|
/* E(i+1) = H(E(i) || ss(i)) * E(i) */
|
2024-10-14 18:03:49 +02:00
|
|
|
bool blinding_next_path_key(const struct pubkey *pk,
|
|
|
|
const struct sha256 *h,
|
|
|
|
struct pubkey *next);
|
2020-04-03 05:16:56 +02:00
|
|
|
|
|
|
|
/* e(i+1) = H(E(i) || ss(i)) * e(i) */
|
2024-10-14 18:03:49 +02:00
|
|
|
bool blinding_next_path_privkey(const struct privkey *e,
|
|
|
|
const struct sha256 *h,
|
|
|
|
struct privkey *next);
|
2020-04-03 05:16:56 +02:00
|
|
|
|
|
|
|
#endif /* LIGHTNING_COMMON_BLINDING_H */
|