Security Scol plugin
Public Types | Public Member Functions | List of all members
DL_FixedBasePrecomputationImpl< T > Class Template Reference

DL_FixedBasePrecomputation adapter class. More...

#include <eprecomp.h>

Inheritance diagram for DL_FixedBasePrecomputationImpl< T >:
DL_FixedBasePrecomputation< T >

Public Types

typedef T Element
 
- Public Types inherited from DL_FixedBasePrecomputation< T >
typedef T Element
 

Public Member Functions

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

Detailed Description

template<class T>
class DL_FixedBasePrecomputationImpl< T >

DL_FixedBasePrecomputation adapter class.

Template Parameters
TField element

Definition at line 126 of file eprecomp.h.

Member Typedef Documentation

◆ Element

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

Definition at line 129 of file eprecomp.h.

Constructor & Destructor Documentation

◆ ~DL_FixedBasePrecomputationImpl()

template<class T >
virtual DL_FixedBasePrecomputationImpl< T >::~DL_FixedBasePrecomputationImpl ( )
inlinevirtual

Definition at line 131 of file eprecomp.h.

◆ DL_FixedBasePrecomputationImpl()

Definition at line 133 of file eprecomp.h.

Member Function Documentation

◆ CascadeExponentiate()

template<class T >
T DL_FixedBasePrecomputationImpl< T >::CascadeExponentiate ( const DL_GroupPrecomputation< Element > &  pc1,
const Integer exponent1,
const DL_FixedBasePrecomputation< Element > &  pc2,
const Integer exponent2 
) const
virtual

Exponentiates an element.

Parameters
pc1the first the group precomputation
exponent1the first exponent
pc2the second the group precomputation
exponent2the first exponent2
Returns
the public element raised to the exponent

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

Implements DL_FixedBasePrecomputation< T >.

Definition at line 101 of file eprecomp.cpp.

◆ Exponentiate()

template<class T >
T DL_FixedBasePrecomputationImpl< T >::Exponentiate ( const DL_GroupPrecomputation< Element > &  group,
const Integer exponent 
) const
virtual

Exponentiates an element.

Parameters
groupthe group
exponentthe exponent
Returns
the result of the exponentiation

Implements DL_FixedBasePrecomputation< T >.

Definition at line 92 of file eprecomp.cpp.

◆ GetBase()

template<class T >
const Element & DL_FixedBasePrecomputationImpl< T >::GetBase ( const DL_GroupPrecomputation< Element > &  group) const
inlinevirtual

Get the base element.

Parameters
groupthe group
Returns
base element in the group

Implements DL_FixedBasePrecomputation< T >.

Definition at line 139 of file eprecomp.h.

◆ IsInitialized()

template<class T >
bool DL_FixedBasePrecomputationImpl< T >::IsInitialized ( ) const
inlinevirtual

Determines whether this object is initialized.

Returns
true if this object is initialized, false otherwise

Implements DL_FixedBasePrecomputation< T >.

Definition at line 136 of file eprecomp.h.

◆ Load()

template<class T >
void DL_FixedBasePrecomputationImpl< T >::Load ( const DL_GroupPrecomputation< Element > &  group,
BufferedTransformation storedPrecomputation 
)
virtual

Retrieve previously saved precomputation.

Parameters
groupthe group
storedPrecomputationBufferedTransformation with the saved precomputation
Exceptions
NotImplemented
See also
SupportsPrecomputation(), Precompute()

Implements DL_FixedBasePrecomputation< T >.

Definition at line 44 of file eprecomp.cpp.

◆ Precompute()

template<class T >
void DL_FixedBasePrecomputationImpl< T >::Precompute ( const DL_GroupPrecomputation< Element > &  group,
unsigned int  maxExpBits,
unsigned int  storage 
)
virtual

Perform precomputation.

Parameters
groupthe group
maxExpBitsused to calculate the exponent base
storagethe 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()

Implements DL_FixedBasePrecomputation< T >.

Definition at line 28 of file eprecomp.cpp.

◆ Save()

template<class T >
void DL_FixedBasePrecomputationImpl< T >::Save ( const DL_GroupPrecomputation< Element > &  group,
BufferedTransformation storedPrecomputation 
) const
virtual

Save precomputation for later use.

Parameters
groupthe group
storedPrecomputationBufferedTransformation to write the precomputation
Exceptions
NotImplemented
See also
SupportsPrecomputation(), Precompute()

Implements DL_FixedBasePrecomputation< T >.

Definition at line 59 of file eprecomp.cpp.

◆ SetBase()

template<class T >
void DL_FixedBasePrecomputationImpl< T >::SetBase ( const DL_GroupPrecomputation< Element > &  group,
const Element &  base 
)
virtual

Set the base element.

Parameters
groupthe group
baseelement in the group

Implements DL_FixedBasePrecomputation< T >.

Definition at line 14 of file eprecomp.cpp.


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