| 398 | } |
| 399 | |
| 400 | bool 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 | |
| 410 | bool onion_shared_secret( |
| 411 | struct secret *secret, |
no outgoing calls
no test coverage detected