Botan 3.7.1
Crypto and TLS for C&
|
#include <ecies.h>
Public Member Functions | |
SymmetricKey | derive_secret (std::span< const uint8_t > eph_public_key_bin, const EC_AffinePoint &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) | |
ECIES secret derivation according to ISO 18033-2
TODO(Botan4) hide this
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 125 of file ecies.cpp.
SymmetricKey Botan::ECIES_KA_Operation::derive_secret | ( | std::span< const uint8_t > | eph_public_key_bin, |
const EC_AffinePoint & | 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 173 of file ecies.cpp.
References Botan::OctetString::begin(), BOTAN_ARG_CHECK, Botan::ECIES_KA_Params::compression_type(), Botan::KDF::create_or_throw(), Botan::PK_Key_Agreement::derive_key(), Botan::ECIES_KA_Params::domain(), Botan::OctetString::end(), Botan::EC_Scalar::from_bigint(), Botan::EC_Group::get_cofactor(), Botan::EC_Group::get_order_bytes(), Botan::EC_Group::has_cofactor(), Botan::EC_AffinePoint::is_identity(), Botan::ECIES_KA_Params::kdf_spec(), Botan::ECIES_KA_Params::old_cofactor_mode(), Botan::ECIES_KA_Params::secret_length(), Botan::EC_AffinePoint::serialize(), and Botan::ECIES_KA_Params::single_hash_mode().