aztec-nr - noir_aztec::keys::ecdh_shared_secret

Function derive_ecdh_shared_secret_using_aztec_address

pub fn derive_ecdh_shared_secret_using_aztec_address(
    ephemeral_secret: EmbeddedCurveScalar,
    recipient_address: AztecAddress,
) -> EmbeddedCurvePoint

Computes a standard ecdh shared secret using the address public key of the given address: [ephemeral_secret] * recipient_address_public_key = shared_secret. The intention is that the creator of a shared secret would call this function, given the address of their intended recipient.