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

Function encrypt_tlv_encrypted_data

common/blindedpath.c:111–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111u8 *encrypt_tlv_encrypted_data(const tal_t *ctx,
112 const struct privkey *path_privkey,
113 const struct pubkey *node,
114 const struct tlv_encrypted_data_tlv *tlv,
115 struct privkey *next_path_privkey,
116 struct pubkey *node_alias)
117{
118 struct privkey unused;
119 u8 *tlv_wire = tal_arr(NULL, u8, 0);
120 towire_tlv_encrypted_data_tlv(&tlv_wire, tlv);
121
122 /* last hop doesn't care about next path_key */
123 if (!next_path_privkey)
124 next_path_privkey = &unused;
125 return enctlv_from_encmsg_raw(ctx, path_privkey, node, take(tlv_wire),
126 next_path_privkey, node_alias);
127}
128
129bool unblind_onion(const struct pubkey *path_key,
130 void (*ecdh)(const struct pubkey *point, struct secret *ss),

Callers 4

add_stub_blindedpathFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 1

enctlv_from_encmsg_rawFunction · 0.85

Tested by 2

mainFunction · 0.68
mainFunction · 0.68