Botan 3.9.0
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) |
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 129 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 178 of file ecies.cpp.
References Botan::OctetString::begin(), BOTAN_ARG_CHECK, Botan::KDF::create_or_throw(), Botan::OctetString::end(), Botan::EC_Scalar::from_bigint(), and Botan::EC_AffinePoint::is_identity().