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

Function secret_eq_consttime

bitcoin/privkey.c:18–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16REGISTER_TYPE_TO_HEXSTR(secret);
17
18bool secret_eq_consttime(const struct secret *a, const struct secret *b)
19{
20 u8 result = 0;
21 for (size_t i = 0; i < sizeof(a->data); i++)
22 result |= a->data[i] ^ b->data[i];
23 return result == 0;
24}
25
26void towire_privkey(u8 **pptr, const struct privkey *privkey)
27{

Callers 11

secret_eq_strFunction · 0.85
secret_eq_strFunction · 0.85
const_time_testFunction · 0.85
handle_onionmsg_to_usFunction · 0.85
invoice_check_paymentFunction · 0.85
mainFunction · 0.85
test_final_decryptFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by 7

secret_eq_strFunction · 0.68
secret_eq_strFunction · 0.68
const_time_testFunction · 0.68
mainFunction · 0.68
test_final_decryptFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68