#include <chacha_poly_aead.h>
|
| ChaCha20Poly1305AEAD (const uint8_t *K_1, size_t K_1_len, const uint8_t *K_2, size_t K_2_len) |
|
| ChaCha20Poly1305AEAD (const ChaCha20Poly1305AEAD &)=delete |
|
bool | Crypt (uint64_t seqnr_payload, uint64_t seqnr_aad, int aad_pos, uint8_t *dest, size_t dest_len, const uint8_t *src, size_t src_len, bool is_encrypt) |
| Encrypts/decrypts a packet.
|
|
bool | GetLength (uint32_t *len24_out, uint64_t seqnr_aad, int aad_pos, const uint8_t *ciphertext) |
| decrypts the 3 bytes AAD data and decodes it into a uint32_t field
|
|
Definition at line 117 of file chacha_poly_aead.h.
◆ ChaCha20Poly1305AEAD() [1/2]
◆ ChaCha20Poly1305AEAD() [2/2]
◆ Crypt()
Encrypts/decrypts a packet.
- seqnr_payload, the message sequence number.
- seqnr_aad, the messages AAD sequence number which allows reuse of the AAD keystream.
- aad_pos, position to use in the AAD keystream to encrypt the AAD.
- dest, output buffer, must be of a size equal or larger than CHACHA20_POLY1305_AEAD_AAD_LEN + payload (+ POLY1305_TAG_LEN in encryption) bytes.
- destlen, length of the destination buffer src, the AAD+payload to encrypt or the AAD+payload+MAC to decrypt.
- src_len, the length of the source buffer.
- is_encrypt, set to true if we encrypt (creates and appends the MAC instead of verifying it).
Definition at line 43 of file chacha_poly_aead.cpp.
◆ GetLength()
decrypts the 3 bytes AAD data and decodes it into a uint32_t field
Definition at line 121 of file chacha_poly_aead.cpp.
◆ m_aad_keystream_buffer
◆ m_cached_aad_seqnr
uint64_t ChaCha20Poly1305AEAD::m_cached_aad_seqnr |
|
private |
◆ m_chacha_header
ChaCha20 ChaCha20Poly1305AEAD::m_chacha_header |
|
private |
◆ m_chacha_main
ChaCha20 ChaCha20Poly1305AEAD::m_chacha_main |
|
private |
The documentation for this class was generated from the following files: