Crypto++ 8.1 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...

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. More...
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 Integer & | GetPrivateExponent () const =0
| Retrieves the private exponent. More...
virtual void | SetPrivateExponent (const Integer &x)=0
| Sets the private exponent. 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_PrivateKey< T >

Interface for Discrete Log (DL) private keys.

Definition at line 1105 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

  pub | reference to a public key

Definition at line 1116 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

  name | the name of the object or value to retrieve
  valueType | reference to a variable that receives the value
  pValue | void 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 1132 of file pubkey.h.

## ◆ AssignFrom()

template<class T>

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

Initialize or reinitialize this key.

Parameters

  source | NameValuePairs to assign

Definition at line 1140 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

  x | the 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:

- pubkey.h