Botan
2.19.1
Crypto and TLS for C++11
|
#include <dlies.h>
Public Member Functions | |
DLIES_Encryptor (const DH_PrivateKey &own_priv_key, RandomNumberGenerator &rng, KDF *kdf, MessageAuthenticationCode *mac, size_t mac_key_len=20) | |
DLIES_Encryptor (const DH_PrivateKey &own_priv_key, RandomNumberGenerator &rng, KDF *kdf, Cipher_Mode *cipher, size_t cipher_key_len, MessageAuthenticationCode *mac, size_t mac_key_len=20) | |
std::vector< uint8_t > | encrypt (const uint8_t in[], size_t length, RandomNumberGenerator &rng) const |
template<typename Alloc > | |
std::vector< uint8_t > | encrypt (const std::vector< uint8_t, Alloc > &in, RandomNumberGenerator &rng) const |
void | set_initialization_vector (const InitializationVector &iv) |
Set the initialization vector for the data encryption method. More... | |
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, | ||
KDF * | kdf, | ||
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 14 of file dlies.cpp.
Botan::DLIES_Encryptor::DLIES_Encryptor | ( | const DH_PrivateKey & | own_priv_key, |
RandomNumberGenerator & | rng, | ||
KDF * | kdf, | ||
Cipher_Mode * | cipher, | ||
size_t | cipher_key_len, | ||
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 23 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 40 of file pubkey.h.
Referenced by Botan::TLS::Client_Key_Exchange::Client_Key_Exchange(), and Botan::KeyPair::encryption_consistency_check().
|
inlineinherited |
|
inline |
|
inline |