Initialize when the other side's public key is received. Can only be called once.
Synopsis
Declared in <bip324.h>
void
Initialize(
EllSwiftPubKey const& their_pubkey,
bool initiator,
bool self_decrypt = false) noexcept;
Description
initiator is set to true if we are the initiator establishing the v2 P2P connection. self_decrypt is only for testing, and swaps encryption/decryption keys, so that encryption and decryption can be tested without knowing the other side's private key.
Parameters
Name |
Description |
their_pubkey |
The other side's ElligatorSwift‐encoded public key. |
initiator |
True if we initiated the v2 P2P connection. |
self_decrypt |
Testing only; swaps the encryption and decryption keys. |
Created with MrDocs