Crypto++ 8.0 Free C++ class library of cryptographic schemes

Public Types | Public Member Functions | List of all members
DL_FixedBasePrecomputation< T > Class Template Referenceabstract

DL_FixedBasePrecomputation interface. More...

Inheritance diagram for DL_FixedBasePrecomputation< T >:

## Public Types
typedef T | Element

## Public Member Functions
virtual bool | IsInitialized () const =0
| Determines whether this object is initialized. More...
virtual void | SetBase (const DL_GroupPrecomputation< Element > &group, const Element &base)=0
| Set the base element. More...
virtual const Element & | GetBase (const DL_GroupPrecomputation< Element > &group) const =0
| Get the base element. More...
virtual void | Precompute (const DL_GroupPrecomputation< Element > &group, unsigned int maxExpBits, unsigned int storage)=0
| Perform precomputation. More...
virtual void | Load (const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation)=0
| Retrieve previously saved precomputation. More...
virtual void | Save (const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation) const =0
| Save precomputation for later use. More...
virtual Element | Exponentiate (const DL_GroupPrecomputation< Element > &group, const Integer &exponent) const =0
| Exponentiates an element. More...
virtual Element | CascadeExponentiate (const DL_GroupPrecomputation< Element > &pc1, const Integer &exponent1, const DL_FixedBasePrecomputation< Element > &pc2, const Integer &exponent2) const =0
| Exponentiates an element. More...

## Detailed Description

### template<class T>
class DL_FixedBasePrecomputation< T >

DL_FixedBasePrecomputation interface.

Template Parameters

  T | Field element

Definition at line 60 of file eprecomp.h.

## Member Function Documentation

## ◆ IsInitialized()

template<class T>

virtual bool DL_FixedBasePrecomputation< T >::IsInitialized | ( |  | ) | const
| pure virtual

Determines whether this object is initialized.

Returns
  true if this object is initialized, false otherwise

Implemented in DL_BasePrecomputation_LUC, DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

## ◆ SetBase()

template<class T>

virtual void DL_FixedBasePrecomputation< T >::SetBase | ( | const DL_GroupPrecomputation< Element > & | group,
|  | const Element & | base
| ) |  |
| pure virtual

Set the base element.

Parameters

  group | the group
  base | element in the group

Implemented in DL_BasePrecomputation_LUC, DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

## ◆ GetBase()

template<class T>

virtual const Element& DL_FixedBasePrecomputation< T >::GetBase | ( | const DL_GroupPrecomputation< Element > & | group | ) | const
| pure virtual

Get the base element.

Parameters

  group | the group

Returns
  base element in the group

Implemented in DL_BasePrecomputation_LUC, DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

## ◆ Precompute()

template<class T>

virtual void DL_FixedBasePrecomputation< T >::Precompute | ( | const DL_GroupPrecomputation< Element > & | group,
|  | unsigned int | maxExpBits,
|  | unsigned int | storage
| ) |  |
| pure virtual

Perform precomputation.

Parameters

  group | the group
  maxExpBits | used to calculate the exponent base
  storage | the suggested number of objects for the precompute table

The exact semantics of Precompute() varies, but it typically means calculate a table of n objects that can be used later to speed up computation.

If a derived class does not override Precompute(), then the base class throws NotImplemented.

See also
  SupportsPrecomputation(), LoadPrecomputation(), SavePrecomputation()

Implemented in DL_BasePrecomputation_LUC, DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

## ◆ Load()

template<class T>

virtual void DL_FixedBasePrecomputation< T >::Load | ( | const DL_GroupPrecomputation< Element > & | group,
|  | BufferedTransformation & | storedPrecomputation
| ) |  |
| pure virtual

Retrieve previously saved precomputation.

Parameters

  group | the the group
  storedPrecomputation | BufferedTransformation with the saved precomputation

Exceptions

  NotImplemented |

See also
  SupportsPrecomputation(), Precompute()

Implemented in DL_BasePrecomputation_LUC, DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

## ◆ Save()

template<class T>

virtual void DL_FixedBasePrecomputation< T >::Save | ( | const DL_GroupPrecomputation< Element > & | group,
|  | BufferedTransformation & | storedPrecomputation
| ) |  | const
| pure virtual

Save precomputation for later use.

Parameters

  group | the the group
  storedPrecomputation | BufferedTransformation to write the precomputation

Exceptions

  NotImplemented |

See also
  SupportsPrecomputation(), Precompute()

Implemented in DL_BasePrecomputation_LUC, DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

## ◆ Exponentiate()

template<class T>

virtual Element DL_FixedBasePrecomputation< T >::Exponentiate | ( | const DL_GroupPrecomputation< Element > & | group,
|  | const Integer & | exponent
| ) |  | const
| pure virtual

Exponentiates an element.

Parameters

  group | the group
  exponent | the exponent

Returns
  the result of the exponentiation

Implemented in DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

## ◆ CascadeExponentiate()

template<class T>

virtual Element DL_FixedBasePrecomputation< T >::CascadeExponentiate | ( | const DL_GroupPrecomputation< Element > & | pc1,
|  | const Integer & | exponent1,
|  | const DL_FixedBasePrecomputation< Element > & | pc2,
|  | const Integer & | exponent2
| ) |  | const
| pure virtual

Exponentiates an element.

Parameters

  pc1 | the first the group precomputation
  exponent1 | the first exponent
  pc2 | the second the group precomputation
  exponent2 | the first exponent2

Returns
  the public element raised to the exponent

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

Implemented in DL_BasePrecomputation_LUC, DL_FixedBasePrecomputationImpl< T >, DL_FixedBasePrecomputationImpl< typename ModExpPrecomputation ::Element >, and DL_FixedBasePrecomputationImpl< typename EcPrecomputation< EC > ::Element >.

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

- eprecomp.h