diff options
Diffstat (limited to 'src/bip324.h')
-rw-r--r-- | src/bip324.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bip324.h b/src/bip324.h index 1738356ee5..8d025c2ee3 100644 --- a/src/bip324.h +++ b/src/bip324.h @@ -52,8 +52,12 @@ public: /** Retrieve our public key. */ const EllSwiftPubKey& GetOurPubKey() const noexcept { return m_our_pubkey; } - /** Initialize when the other side's public key is received. Can only be called once. */ - void Initialize(const EllSwiftPubKey& their_pubkey, bool initiator) noexcept; + /** Initialize when the other side's public key is received. Can only be called once. + * + * 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. + */ + void Initialize(const EllSwiftPubKey& their_pubkey, bool initiator, bool self_decrypt = false) noexcept; /** Determine whether this cipher is fully initialized. */ explicit operator bool() const noexcept { return m_send_l_cipher.has_value(); } |