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

Function decrypt_encmsg

common/blindedpath.c:186–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static struct tlv_encrypted_data_tlv *decrypt_encmsg(const tal_t *ctx,
187 const struct pubkey *blinding,
188 const struct secret *ss,
189 const u8 *enctlv)
190{
191 const u8 *cursor = decrypt_encmsg_raw(tmpctx, blinding, ss, enctlv);
192 size_t maxlen = tal_bytelen(cursor);
193
194 /* BOLT-onion-message #4:
195 *
196 * - if the `enctlv` is not a valid TLV...
197 * - MUST drop the message.
198 */
199 return fromwire_tlv_encrypted_data_tlv(ctx, &cursor, &maxlen);
200}
201
202bool decrypt_enctlv(const struct pubkey *blinding,
203 const struct secret *ss,

Callers 2

decrypt_enctlvFunction · 0.85
decrypt_final_enctlvFunction · 0.85

Calls 2

decrypt_encmsg_rawFunction · 0.85
tal_bytelenFunction · 0.85

Tested by

no test coverage detected