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

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

#include <pubkey.h>

+ Inheritance diagram for DL_PrivateKey< T >:

Public Types

typedef T Element
 

Public Member Functions

void MakePublicKey (DL_PublicKey< T > &pub) const
 Initializes a public key from this key.
 
bool GetVoidValue (const char *name, const std::type_info &valueType, void *pValue) const
 Get a named value.
 
void AssignFrom (const NameValuePairs &source)
 Initialize or reinitialize this key.
 
virtual const IntegerGetPrivateExponent () const =0
 Retrieves the private exponent.
 
virtual void SetPrivateExponent (const Integer &x)=0
 Sets the private exponent.
 
- Public Member Functions inherited from DL_Key< T >
virtual const DL_GroupParameters< T > & GetAbstractGroupParameters () const =0
 Retrieves abstract group parameters.
 
virtual DL_GroupParameters< T > & AccessAbstractGroupParameters ()=0
 Retrieves abstract group parameters.
 

Detailed Description

template<class T>
class DL_PrivateKey< T >

Interface for Discrete Log (DL) private keys.

Definition at line 1135 of file pubkey.h.

Member Typedef Documentation

◆ Element

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

Definition at line 1140 of file pubkey.h.

Constructor & Destructor Documentation

◆ ~DL_PrivateKey()

template<class T >
DL_PrivateKey< T >::~DL_PrivateKey ( )
virtual

Definition at line 1189 of file pubkey.h.

Member Function Documentation

◆ MakePublicKey()

template<class T >
void DL_PrivateKey< T >::MakePublicKey ( DL_PublicKey< T > & pub) const
inline

Initializes a public key from this key.

Parameters
pubreference to a public key

Definition at line 1146 of file pubkey.h.

◆ GetVoidValue()

template<class T >
bool DL_PrivateKey< 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 1162 of file pubkey.h.

◆ AssignFrom()

template<class T >
void DL_PrivateKey< T >::AssignFrom ( const NameValuePairs & source)
inline

Initialize or reinitialize this key.

Parameters
sourceNameValuePairs to assign

Definition at line 1170 of file pubkey.h.

◆ GetPrivateExponent()

template<class T >
virtual const Integer & DL_PrivateKey< T >::GetPrivateExponent ( ) const
pure virtual

Retrieves the private exponent.

Returns
the private exponent

Must be overridden in derived classes.

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

◆ SetPrivateExponent()

template<class T >
virtual void DL_PrivateKey< T >::SetPrivateExponent ( const Integer & x)
pure virtual

Sets the private exponent.

Parameters
xthe private exponent

Must be overridden in derived classes.

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


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