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

Function sphinx_create_shared_secret

common/sphinx.c:400–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400bool sphinx_create_shared_secret(struct secret *privkey,
401 const struct pubkey *pubkey,
402 const struct secret *secret)
403{
404 if (secp256k1_ecdh(secp256k1_ctx, privkey->data, &pubkey->pubkey,
405 secret->data, NULL, NULL) != 1)
406 return false;
407 return true;
408}
409
410bool onion_shared_secret(
411 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