Function lightning::ln::chan_utils::derive_public_key [−][src]
pub fn derive_public_key<T: Signing>(
secp_ctx: &Secp256k1<T>,
per_commitment_point: &PublicKey,
base_point: &PublicKey
) -> Result<PublicKey, SecpError>
Expand description
Derives a per-commitment-transaction public key (eg an htlc key or a delayed_payment key) from the base point and the per_commitment_key. This is the public equivalent of derive_private_key - using only public keys to derive a public key instead of private keys.
Note that this is infallible iff we trust that at least one of the two input keys are randomly generated (ie our own).