| 370 | } |
| 371 | |
| 372 | bool 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 | |
| 382 | bool onion_shared_secret( |
| 383 | struct secret *secret, |
no outgoing calls
no test coverage detected