MCPcopy Create free account
hub / github.com/ElementsProject/lightning / blinding_hash_e_and_ss

Function blinding_hash_e_and_ss

common/blinding.c:7–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include <common/utils.h>
6
7void blinding_hash_e_and_ss(const struct pubkey *e,
8 const struct secret *ss,
9 struct sha256 *sha)
10{
11 u8 der[PUBKEY_CMPR_LEN];
12 struct sha256_ctx shactx;
13
14 pubkey_to_der(der, e);
15 sha256_init(&shactx);
16 sha256_update(&shactx, der, sizeof(der));
17 sha256_update(&shactx, ss->data, sizeof(ss->data));
18 sha256_done(&shactx, sha);
19}
20
21/* E(i+1) = H(E(i) || ss(i)) * E(i) */
22bool blinding_next_pubkey(const struct pubkey *pk,

Callers 3

blind_nodeFunction · 0.70
decrypt_enctlvFunction · 0.70
peer_accepted_htlcFunction · 0.50

Calls 4

sha256_initFunction · 0.85
sha256_updateFunction · 0.85
sha256_doneFunction · 0.85
pubkey_to_derFunction · 0.50

Tested by

no test coverage detected