[#BIP324Cipher] = BIP324Cipher :mrdocs: The BIP324 packet cipher, encapsulating its key derivation, stream cipher, and AEAD. == Synopsis Declared in `<bip324.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class BIP324Cipher; ---- == Member Functions [cols="1,4"] |=== | Name| Description | xref:BIP324Cipher/2constructor-09.adoc[`BIP324Cipher`] [.small]#[constructor]# | Constructors | xref:BIP324Cipher/Decrypt.adoc[`Decrypt`] | Decrypt a packet. Only after Initialize(). | xref:BIP324Cipher/DecryptLength.adoc[`DecryptLength`] | Decrypt the length of a packet. Only after Initialize(). | xref:BIP324Cipher/Encrypt.adoc[`Encrypt`] | Encrypt a packet. Only after Initialize(). | xref:BIP324Cipher/GetOurPubKey.adoc[`GetOurPubKey`] | Retrieve our public key. | xref:BIP324Cipher/GetReceiveGarbageTerminator.adoc[`GetReceiveGarbageTerminator`] | Get the expected Garbage Terminator to receive. Only after Initialize(). | xref:BIP324Cipher/GetSendGarbageTerminator.adoc[`GetSendGarbageTerminator`] | Get the Garbage Terminator to send. Only after Initialize(). | xref:BIP324Cipher/GetSessionID.adoc[`GetSessionID`] | Get the Session ID. Only after Initialize(). | xref:BIP324Cipher/Initialize.adoc[`Initialize`] | Initialize when the other side's public key is received. Can only be called once. | xref:BIP324Cipher/2conversion.adoc[`operator bool`] | Determine whether this cipher is fully initialized. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:BIP324Cipher/EXPANSION.adoc[`EXPANSION`] | Total ciphertext expansion added to each packet. | xref:BIP324Cipher/GARBAGE_TERMINATOR_LEN.adoc[`GARBAGE_TERMINATOR_LEN`] | Length in bytes of a garbage terminator. | xref:BIP324Cipher/HEADER_LEN.adoc[`HEADER_LEN`] | Length in bytes of the per‐packet header. | xref:BIP324Cipher/IGNORE_BIT.adoc[`IGNORE_BIT`] | Header bit signalling that a packet should be ignored by the receiver. | xref:BIP324Cipher/LENGTH_LEN.adoc[`LENGTH_LEN`] | Length in bytes of the encrypted packet‐length field. | xref:BIP324Cipher/REKEY_INTERVAL.adoc[`REKEY_INTERVAL`] | Number of packets between automatic key rotations. | xref:BIP324Cipher/SESSION_ID_LEN.adoc[`SESSION_ID_LEN`] | Length in bytes of the derived session ID. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#