40 std::unique_ptr<KDF> kdf,
41 std::unique_ptr<MessageAuthenticationCode> mac,
42 size_t mac_key_len = 20);
59 std::unique_ptr<KDF> kdf,
60 std::unique_ptr<Cipher_Mode> cipher,
61 size_t cipher_key_len,
62 std::unique_ptr<MessageAuthenticationCode> mac,
63 size_t mac_key_len = 20);
66 inline void set_other_key(
const std::vector<uint8_t>& other_pub_key) { m_other_pub_key = other_pub_key; }
78 std::vector<uint8_t> m_other_pub_key;
79 std::vector<uint8_t> m_own_pub_key;
81 std::unique_ptr<KDF> m_kdf;
82 std::unique_ptr<Cipher_Mode> m_cipher;
83 const size_t m_cipher_key_len;
84 std::unique_ptr<MessageAuthenticationCode> m_mac;
85 const size_t m_mac_keylen;
107 std::unique_ptr<KDF> kdf,
108 std::unique_ptr<MessageAuthenticationCode> mac,
109 size_t mac_key_len = 20);
126 std::unique_ptr<KDF> kdf,
127 std::unique_ptr<Cipher_Mode> cipher,
128 size_t cipher_key_len,
129 std::unique_ptr<MessageAuthenticationCode> mac,
130 size_t mac_key_len = 20);
138 size_t plaintext_length(
size_t ctext_len)
const override;
140 const size_t m_pub_key_size;
142 std::unique_ptr<KDF> m_kdf;
143 std::unique_ptr<Cipher_Mode> m_cipher;
144 const size_t m_cipher_key_len;
145 std::unique_ptr<MessageAuthenticationCode> m_mac;
146 const size_t m_mac_keylen;