Botan 3.8.1
Crypto and TLS for C&
|
#include <dlies.h>
Public Member Functions | |
DLIES_Encryptor (const DH_PrivateKey &own_priv_key, RandomNumberGenerator &rng, std::unique_ptr< KDF > kdf, std::unique_ptr< Cipher_Mode > cipher, size_t cipher_key_len, std::unique_ptr< MessageAuthenticationCode > mac, size_t mac_key_len=20) | |
DLIES_Encryptor (const DH_PrivateKey &own_priv_key, RandomNumberGenerator &rng, std::unique_ptr< KDF > kdf, std::unique_ptr< MessageAuthenticationCode > mac, size_t mac_key_len=20) | |
std::vector< uint8_t > | encrypt (const uint8_t in[], size_t length, RandomNumberGenerator &rng) const |
std::vector< uint8_t > | encrypt (std::span< const uint8_t > in, RandomNumberGenerator &rng) const |
void | set_initialization_vector (const InitializationVector &iv) |
Set the initialization vector for the data encryption method. | |
void | set_other_key (const std::vector< uint8_t > &other_pub_key) |
Botan::DLIES_Encryptor::DLIES_Encryptor | ( | const DH_PrivateKey & | own_priv_key, |
RandomNumberGenerator & | rng, | ||
std::unique_ptr< KDF > | kdf, | ||
std::unique_ptr< MessageAuthenticationCode > | mac, | ||
size_t | mac_key_len = 20 ) |
Stream mode: use KDF to provide a stream of bytes to xor with the message
own_priv_key | own (ephemeral) DH private key |
rng | the RNG to use |
kdf | the KDF that should be used |
mac | the MAC function that should be used |
mac_key_len | key length of the MAC function. Default = 20 bytes |
output = (ephemeral) public key + ciphertext + tag
Definition at line 17 of file dlies.cpp.
References DLIES_Encryptor().
Referenced by DLIES_Encryptor().
Botan::DLIES_Encryptor::DLIES_Encryptor | ( | const DH_PrivateKey & | own_priv_key, |
RandomNumberGenerator & | rng, | ||
std::unique_ptr< KDF > | kdf, | ||
std::unique_ptr< Cipher_Mode > | cipher, | ||
size_t | cipher_key_len, | ||
std::unique_ptr< MessageAuthenticationCode > | mac, | ||
size_t | mac_key_len = 20 ) |
Block cipher mode
own_priv_key | own (ephemeral) DH private key |
rng | the RNG to use |
kdf | the KDF that should be used |
cipher | the block cipher that should be used |
cipher_key_len | the key length of the block cipher |
mac | the MAC function that should be used |
mac_key_len | key length of the MAC function. Default = 20 bytes |
output = (ephemeral) public key + ciphertext + tag
Definition at line 24 of file dlies.cpp.
References BOTAN_ASSERT_NONNULL.
|
inlineinherited |
Encrypt a message.
in | the message as a byte array |
length | the length of the above byte array |
rng | the random number source to use |
Definition at line 37 of file pubkey.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), and Botan::KeyPair::encryption_consistency_check().
|
inlineinherited |
|
inline |
|
inline |