Crypto++ 8.7
Free C++ class library of cryptographic schemes
Public Types | Public Member Functions | List of all members
DL_PublicKey< T > Class Template Referenceabstract

Interface for Discrete Log (DL) public keys. More...

#include <pubkey.h>

+ Inheritance diagram for DL_PublicKey< T >:

Public Types

typedef T Element
 

Public Member Functions

bool GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const
 Get a named value. More...
 
void AssignFrom (const NameValuePairs &source)
 Initialize or reinitialize this key. More...
 
virtual const Element & GetPublicElement () const
 Retrieves the public element. More...
 
virtual void SetPublicElement (const Element &y)
 Sets the public element. More...
 
virtual Element ExponentiatePublicElement (const Integer &exponent) const
 Exponentiates this element. More...
 
virtual Element CascadeExponentiateBaseAndPublicElement (const Integer &baseExp, const Integer &publicExp) const
 Exponentiates an element. More...
 
virtual const DL_FixedBasePrecomputation< T > & GetPublicPrecomputation () const =0
 Accesses the public precomputation. More...
 
virtual DL_FixedBasePrecomputation< T > & AccessPublicPrecomputation ()=0
 Accesses the public precomputation. More...
 
- Public Member Functions inherited from DL_Key< T >
virtual const DL_GroupParameters< T > & GetAbstractGroupParameters () const =0
 Retrieves abstract group parameters. More...
 
virtual DL_GroupParameters< T > & AccessAbstractGroupParameters ()=0
 Retrieves abstract group parameters. More...
 

Detailed Description

template<class T>
class DL_PublicKey< T >

Interface for Discrete Log (DL) public keys.

Definition at line 1058 of file pubkey.h.

Member Typedef Documentation

◆ Element

template<class T >
typedef T DL_PublicKey< T >::Element

Definition at line 1063 of file pubkey.h.

Constructor & Destructor Documentation

◆ ~DL_PublicKey()

template<class T >
DL_PublicKey< T >::~DL_PublicKey
virtual

Definition at line 1131 of file pubkey.h.

Member Function Documentation

◆ GetVoidValue()

template<class T >
bool DL_PublicKey< T >::GetVoidValue ( const char *  name,
const std::type_info &  valueType,
void *  pValue 
) const
inline

Get a named value.

Parameters
namethe name of the object or value to retrieve
valueTypereference to a variable that receives the value
pValuevoid pointer to a variable that receives the value
Returns
true if the value was retrieved, false otherwise

GetVoidValue() retrieves the value of name if it exists.

Note
GetVoidValue() is an internal function and should be implemented by derived classes. Users should use one of the other functions instead.
See also
GetValue(), GetValueWithDefault(), GetIntValue(), GetIntValueWithDefault(), GetRequiredParameter() and GetRequiredIntParameter()

Definition at line 1077 of file pubkey.h.

◆ AssignFrom()

template<class T >
void DL_PublicKey< T >::AssignFrom ( const NameValuePairs source)

Initialize or reinitialize this key.

Parameters
sourceNameValuePairs to assign

Definition at line 1192 of file pubkey.h.

◆ GetPublicElement()

template<class T >
virtual const Element & DL_PublicKey< T >::GetPublicElement ( ) const
inlinevirtual

Retrieves the public element.

Returns
the public element

Definition at line 1089 of file pubkey.h.

◆ SetPublicElement()

template<class T >
virtual void DL_PublicKey< T >::SetPublicElement ( const Element &  y)
inlinevirtual

Sets the public element.

Parameters
ythe public element

Definition at line 1093 of file pubkey.h.

◆ ExponentiatePublicElement()

template<class T >
virtual Element DL_PublicKey< T >::ExponentiatePublicElement ( const Integer exponent) const
inlinevirtual

Exponentiates this element.

Parameters
exponentthe exponent to raise the base
Returns
the public element raised to the exponent

Definition at line 1098 of file pubkey.h.

◆ CascadeExponentiateBaseAndPublicElement()

template<class T >
virtual Element DL_PublicKey< T >::CascadeExponentiateBaseAndPublicElement ( const Integer baseExp,
const Integer publicExp 
) const
inlinevirtual

Exponentiates an element.

Parameters
baseExpthe first exponent
publicExpthe second exponent
Returns
the public element raised to the exponent

CascadeExponentiateBaseAndPublicElement raises the public element to the base element and precomputation.

Definition at line 1110 of file pubkey.h.

◆ GetPublicPrecomputation()

template<class T >
virtual const DL_FixedBasePrecomputation< T > & DL_PublicKey< T >::GetPublicPrecomputation ( ) const
pure virtual

Accesses the public precomputation.

GetPublicPrecomputation returns a const reference, while AccessPublicPrecomputation returns a non-const reference. Must be overridden in derived classes.

Implemented in DL_PublicKeyImpl< GP >, and DL_PublicKeyImpl< DL_GroupParameters_EC< EC > >.

◆ AccessPublicPrecomputation()

template<class T >
virtual DL_FixedBasePrecomputation< T > & DL_PublicKey< T >::AccessPublicPrecomputation ( )
pure virtual

Accesses the public precomputation.

GetPublicPrecomputation returns a const reference, while AccessPublicPrecomputation returns a non-const reference. Must be overridden in derived classes.

Implemented in DL_PublicKeyImpl< GP >, and DL_PublicKeyImpl< DL_GroupParameters_EC< EC > >.


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