core-lightning/common/blinding.h
Rusty Russell dc18f3cd7b BOLTs: update which renames blinding terminology.
No code changes, just catching up with the BOLT changes which rework our
blinded path terminology (for the better!).

Another patch will sweep the rest of our internal names, this tries only to
make things compile and fix up the BOLT quotes.

1. Inside payload: current_blinding_point -> current_path_key
2. Inside update_add_htlc TLV: blinding_point -> blinded_path
3. Inside blinded_path: blinding -> first_path_key
4. Inside onion_message: blinding -> path_key.
5. Inside encrypted_data_tlv: next_blinding_override -> next_path_key_override

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-10-16 07:14:32 +10:30

26 lines
637 B
C

#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) */
bool blinding_next_path_key(const struct pubkey *pk,
const struct sha256 *h,
struct pubkey *next);
/* e(i+1) = H(E(i) || ss(i)) * e(i) */
bool blinding_next_path_privkey(const struct privkey *e,
const struct sha256 *h,
struct privkey *next);
#endif /* LIGHTNING_COMMON_BLINDING_H */