Compute a BIP324‐style ECDH shared secret.

Synopsis

Declared in <key.h>

ECDHSecret
ComputeBIP324ECDHSecret(
    EllSwiftPubKey const& their_ellswift,
    EllSwiftPubKey const& our_ellswift,
    bool initiating) const;

Description

  • their_ellswift: EllSwiftPubKey that was received from the other side.

  • our_ellswift: EllSwiftPubKey that was sent to the other side (must have been generated from *this using EllSwiftCreate()).

  • initiating: whether we are the initiating party (true) or responding party (false).

Return Value

The derived BIP324 shared secret.

Parameters

Name

Description

their_ellswift

The ellswift‐encoded public key received from the other side.

our_ellswift

The ellswift‐encoded public key sent to the other side.

initiating

Whether we are the initiating party (true) or responding party (false).

Created with MrDocs