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

Function sphinx_create_shared_secret

common/sphinx.c:372–380  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370}
371
372bool sphinx_create_shared_secret(struct secret *privkey,
373 const struct pubkey *pubkey,
374 const struct secret *secret)
375{
376 if (secp256k1_ecdh(secp256k1_ctx, privkey->data, &pubkey->pubkey,
377 secret->data, NULL, NULL) != 1)
378 return false;
379 return true;
380}
381
382bool onion_shared_secret(
383 struct secret *secret,

Callers 4

onion_shared_secretFunction · 0.85
generate_hop_paramsFunction · 0.85
sphinx_prefillFunction · 0.85
decompressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected