| 385 | } |
| 386 | |
| 387 | static bool blind_group_element(struct pubkey *blindedelement, |
| 388 | const struct pubkey *pubkey, |
| 389 | const u8 blind[BLINDING_FACTOR_SIZE]) |
| 390 | { |
| 391 | /* tweak_mul is inplace so copy first. */ |
| 392 | if (pubkey != blindedelement) |
| 393 | *blindedelement = *pubkey; |
| 394 | if (secp256k1_ec_pubkey_tweak_mul(secp256k1_ctx, |
| 395 | &blindedelement->pubkey, blind) != 1) |
| 396 | return false; |
| 397 | return true; |
| 398 | } |
| 399 | |
| 400 | bool sphinx_create_shared_secret(struct secret *privkey, |
| 401 | const struct pubkey *pubkey, |
no outgoing calls
no test coverage detected