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

Function subkey_from_hmac

common/hmac.c:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void subkey_from_hmac(const char *prefix,
38 const struct secret *base,
39 struct secret *key)
40{
41 struct hmac h;
42 hmac(base->data, sizeof(base->data), prefix, strlen(prefix), &h);
43 BUILD_ASSERT(sizeof(h.bytes) == sizeof(key->data));
44 memcpy(key->data, h.bytes, sizeof(key->data));
45}
46
47void towire_hmac(u8 **pptr, const struct hmac *hmac)
48{

Callers 14

generate_header_paddingFunction · 0.70
generate_prefillFunction · 0.70
generate_key_setFunction · 0.70
create_onionpacketFunction · 0.70
create_onionreplyFunction · 0.70
wrap_onionreplyFunction · 0.70
unwrap_onionreplyFunction · 0.70
blind_nodeFunction · 0.70
enctlv_from_encmsg_rawFunction · 0.70
unblind_onionFunction · 0.70
decrypt_encmsg_rawFunction · 0.70

Calls 1

hmacFunction · 0.70

Tested by

no test coverage detected