Botan 3.6.1
Crypto and TLS for C&
|
#include <ecies.h>
Public Member Functions | |
SymmetricKey | derive_secret (const std::vector< uint8_t > &eph_public_key_bin, const EC_Point &other_public_key_point) const |
ECIES_KA_Operation (const PK_Key_Agreement_Key &private_key, const ECIES_KA_Params &ecies_params, bool for_encryption, RandomNumberGenerator &rng) | |
Botan::ECIES_KA_Operation::ECIES_KA_Operation | ( | const PK_Key_Agreement_Key & | private_key, |
const ECIES_KA_Params & | ecies_params, | ||
bool | for_encryption, | ||
RandomNumberGenerator & | rng ) |
private_key | the (ephemeral) private key which is used to derive the secret |
ecies_params | settings for ecies |
for_encryption | disable cofactor mode if the secret will be used for encryption (according to ISO 18033 cofactor mode is only used during decryption) |
rng | the RNG to use |
Definition at line 121 of file ecies.cpp.
SymmetricKey Botan::ECIES_KA_Operation::derive_secret | ( | const std::vector< uint8_t > & | eph_public_key_bin, |
const EC_Point & | other_public_key_point ) const |
Performs a key agreement with the provided keys and derives the secret from the result
eph_public_key_bin | the encoded (ephemeral) public key which belongs to the used (ephemeral) private key |
other_public_key_point | public key point of the other party |
ECIES secret derivation according to ISO 18033-2
Definition at line 130 of file ecies.cpp.
References Botan::OctetString::begin(), Botan::ECIES_KA_Params::compression_type(), Botan::KDF::create_or_throw(), Botan::PK_Key_Agreement::derive_key(), Botan::ECIES_KA_Params::domain(), Botan::EC_Point::encode(), Botan::OctetString::end(), Botan::EC_Group::get_cofactor(), Botan::EC_Group::get_order_bytes(), Botan::EC_Point::is_zero(), Botan::ECIES_KA_Params::kdf_spec(), Botan::ECIES_KA_Params::old_cofactor_mode(), Botan::ECIES_KA_Params::secret_length(), and Botan::ECIES_KA_Params::single_hash_mode().