[#CKey-ComputeBIP324ECDHSecret]
= xref:CKey.adoc[CKey]::ComputeBIP324ECDHSecret
:relfileprefix: ../
:mrdocs:

Compute a BIP324&hyphen;style ECDH shared secret&period;

== Synopsis

Declared in `&lt;key&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:ECDHSecret.adoc[ECDHSecret]
ComputeBIP324ECDHSecret(
    xref:EllSwiftPubKey.adoc[EllSwiftPubKey] const& their&lowbar;ellswift,
    xref:EllSwiftPubKey.adoc[EllSwiftPubKey] const& our&lowbar;ellswift,
    bool initiating) const;
----

== Description

* their&lowbar;ellswift&colon; EllSwiftPubKey that was received from the other side&period;
* our&lowbar;ellswift&colon; EllSwiftPubKey that was sent to the other side (must have been generated from &ast;this using EllSwiftCreate())&period;
* initiating&colon; whether we are the initiating party (true) or responding party (false)&period;

== Return Value

The derived BIP324 shared secret&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *their&lowbar;ellswift*
| The ellswift&hyphen;encoded public key received from the other side&period;
| *our&lowbar;ellswift*
| The ellswift&hyphen;encoded public key sent to the other side&period;
| *initiating*
| Whether we are the initiating party (true) or responding party (false)&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
