| 357 | } |
| 358 | |
| 359 | static bool blind_group_element(struct pubkey *blindedelement, |
| 360 | const struct pubkey *pubkey, |
| 361 | const u8 blind[BLINDING_FACTOR_SIZE]) |
| 362 | { |
| 363 | /* tweak_mul is inplace so copy first. */ |
| 364 | if (pubkey != blindedelement) |
| 365 | *blindedelement = *pubkey; |
| 366 | if (secp256k1_ec_pubkey_tweak_mul(secp256k1_ctx, |
| 367 | &blindedelement->pubkey, blind) != 1) |
| 368 | return false; |
| 369 | return true; |
| 370 | } |
| 371 | |
| 372 | bool sphinx_create_shared_secret(struct secret *privkey, |
| 373 | const struct pubkey *pubkey, |
no outgoing calls
no test coverage detected