Botan 3.9.0
Crypto and TLS for C&
Botan::ECIES_KA_Params Class Reference

#include <ecies.h>

Inheritance diagram for Botan::ECIES_KA_Params:
Botan::ECIES_System_Params

Public Member Functions

bool check_mode () const
bool cofactor_mode () const
EC_Point_Format compression_type () const
const EC_Groupdomain () const
 ECIES_KA_Params (const EC_Group &group, std::string_view kdf_spec, size_t length, EC_Point_Format point_format, ECIES_Flags flags)
 ECIES_KA_Params (const EC_Group &group, std::string_view kdf_spec, size_t length, EC_Point_Format point_format=EC_Point_Format::Uncompressed, bool single_hash_mode=true)
 ECIES_KA_Params (const ECIES_KA_Params &)=default
 ECIES_KA_Params (ECIES_KA_Params &&)=default
const EC_Groupgroup () const
const std::string & kdf () const
const std::string & kdf_spec () const
bool old_cofactor_mode () const
ECIES_KA_Paramsoperator= (const ECIES_KA_Params &)=delete
ECIES_KA_Paramsoperator= (ECIES_KA_Params &&)=delete
EC_Point_Format point_format () const
size_t secret_length () const
bool single_hash_mode () const
virtual ~ECIES_KA_Params ()=default

Detailed Description

Parameters for ECIES secret derivation

Definition at line 77 of file ecies.h.

Constructor & Destructor Documentation

◆ ECIES_KA_Params() [1/4]

Botan::ECIES_KA_Params::ECIES_KA_Params ( const EC_Group & group,
std::string_view kdf_spec,
size_t length,
EC_Point_Format point_format = EC_Point_Format::Uncompressed,
bool single_hash_mode = true )
Parameters
groupec domain parameters of the involved ec keys
kdf_specname of the key derivation function
lengthlength of the secret to be derived
point_formatformat of encoded keys (affects the secret derivation if single_hash_mode is used)
single_hash_modeprefix the KDF input with the ephemeral public key (recommended)

Definition at line 226 of file ecies.cpp.

227 :
228 m_group(group),
229 m_kdf(kdf),
230 m_length(length),
231 m_point_format(point_format),
232 m_single_hash_mode(single_hash_mode),
233 m_check_mode(true),
234 m_cofactor_mode(false),
235 m_old_cofactor_mode(false) {}
bool single_hash_mode() const
Definition ecies.h:123
const EC_Group & group() const
Definition ecies.h:119
const std::string & kdf() const
Definition ecies.h:136
EC_Point_Format point_format() const
Definition ecies.h:134

References group(), kdf(), point_format(), and single_hash_mode().

Referenced by ECIES_KA_Params(), ECIES_KA_Params(), Botan::ECIES_System_Params::ECIES_System_Params(), Botan::ECIES_System_Params::ECIES_System_Params(), operator=(), and operator=().

◆ ECIES_KA_Params() [2/4]

Botan::ECIES_KA_Params::ECIES_KA_Params ( const EC_Group & group,
std::string_view kdf_spec,
size_t length,
EC_Point_Format point_format,
ECIES_Flags flags )
Parameters
groupec domain parameters of the involved ec keys
kdf_specname of the key derivation function
lengthlength of the secret to be derived
point_formatformat of encoded keys (affects the secret derivation if single_hash_mode is used)
flagsoptions, see documentation of ECIES_Flags

This constructor makes sense only if you are using the CofactorMode or OldCofactorMode flags. Support for cofactors in EC_Group is deprecated and will be removed in Botan4.

TODO(Botan4) remove this constructor when cofactor support is removed

Definition at line 215 of file ecies.cpp.

216 :
217 m_group(group),
218 m_kdf(kdf),
219 m_length(length),
220 m_point_format(point_format),
221 m_single_hash_mode((flags & ECIES_Flags::SingleHashMode) == ECIES_Flags::SingleHashMode),
222 m_check_mode((flags & ECIES_Flags::CheckMode) == ECIES_Flags::CheckMode),
223 m_cofactor_mode((flags & ECIES_Flags::CofactorMode) == ECIES_Flags::CofactorMode),
224 m_old_cofactor_mode((flags & ECIES_Flags::OldCofactorMode) == ECIES_Flags::OldCofactorMode) {}
@ SingleHashMode
if set: prefix the input of the (ecdh) key agreement with the encoded (ephemeral) public key
Definition ecies.h:47

References Botan::CheckMode, Botan::CofactorMode, group(), kdf(), Botan::OldCofactorMode, point_format(), and Botan::SingleHashMode.

◆ ECIES_KA_Params() [3/4]

Botan::ECIES_KA_Params::ECIES_KA_Params ( const ECIES_KA_Params & )
default

References ECIES_KA_Params().

◆ ECIES_KA_Params() [4/4]

Botan::ECIES_KA_Params::ECIES_KA_Params ( ECIES_KA_Params && )
default

References ECIES_KA_Params().

◆ ~ECIES_KA_Params()

virtual Botan::ECIES_KA_Params::~ECIES_KA_Params ( )
virtualdefault

Member Function Documentation

◆ check_mode()

bool Botan::ECIES_KA_Params::check_mode ( ) const
inline

Definition at line 132 of file ecies.h.

132{ return m_check_mode; }

Referenced by Botan::ECIES_System_Params::ECIES_System_Params().

◆ cofactor_mode()

bool Botan::ECIES_KA_Params::cofactor_mode ( ) const
inline

Definition at line 126 of file ecies.h.

126{ return m_cofactor_mode; }

Referenced by Botan::ECIES_System_Params::ECIES_System_Params().

◆ compression_type()

EC_Point_Format Botan::ECIES_KA_Params::compression_type ( ) const
inline

Definition at line 142 of file ecies.h.

142{ return point_format(); }

References compression_type(), and point_format().

Referenced by compression_type().

◆ domain()

const EC_Group & Botan::ECIES_KA_Params::domain ( ) const
inline

Definition at line 140 of file ecies.h.

140{ return group(); }

References domain(), and group().

Referenced by domain().

◆ group()

const EC_Group & Botan::ECIES_KA_Params::group ( ) const
inline

◆ kdf()

const std::string & Botan::ECIES_KA_Params::kdf ( ) const
inline

◆ kdf_spec()

const std::string & Botan::ECIES_KA_Params::kdf_spec ( ) const
inline

Definition at line 138 of file ecies.h.

138{ return kdf(); }

References kdf(), and kdf_spec().

Referenced by kdf_spec().

◆ old_cofactor_mode()

bool Botan::ECIES_KA_Params::old_cofactor_mode ( ) const
inline

Definition at line 129 of file ecies.h.

129{ return m_old_cofactor_mode; }

Referenced by Botan::ECIES_System_Params::ECIES_System_Params().

◆ operator=() [1/2]

ECIES_KA_Params & Botan::ECIES_KA_Params::operator= ( const ECIES_KA_Params & )
delete

References ECIES_KA_Params().

◆ operator=() [2/2]

ECIES_KA_Params & Botan::ECIES_KA_Params::operator= ( ECIES_KA_Params && )
delete

References ECIES_KA_Params().

◆ point_format()

EC_Point_Format Botan::ECIES_KA_Params::point_format ( ) const
inline

◆ secret_length()

size_t Botan::ECIES_KA_Params::secret_length ( ) const
inline

Definition at line 121 of file ecies.h.

121{ return m_length; }

◆ single_hash_mode()

bool Botan::ECIES_KA_Params::single_hash_mode ( ) const
inline

Definition at line 123 of file ecies.h.

123{ return m_single_hash_mode; }

Referenced by ECIES_KA_Params(), and Botan::ECIES_System_Params::ECIES_System_Params().


The documentation for this class was generated from the following files: