6#ifndef CRYPTOPP_EPRECOMP_H
7#define CRYPTOPP_EPRECOMP_H
14NAMESPACE_BEGIN(CryptoPP)
35 virtual Element
ConvertIn(
const Element &v)
const {
return v;}
40 virtual Element
ConvertOut(
const Element &v)
const {
return v;}
137 {
return !m_bases.empty();}
151 unsigned int m_windowSize;
153 std::vector<Element> m_bases;
158#ifdef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
159#include "eprecomp.cpp"
Classes for performing mathematics over different fields.
DL_FixedBasePrecomputation interface.
virtual const Element & GetBase(const DL_GroupPrecomputation< Element > &group) const =0
Get the base element.
virtual void Save(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation) const =0
Save precomputation for later use.
virtual void SetBase(const DL_GroupPrecomputation< Element > &group, const Element &base)=0
Set the base element.
virtual void Precompute(const DL_GroupPrecomputation< Element > &group, unsigned int maxExpBits, unsigned int storage)=0
Perform precomputation.
virtual Element Exponentiate(const DL_GroupPrecomputation< Element > &group, const Integer &exponent) const =0
Exponentiates an element.
virtual Element CascadeExponentiate(const DL_GroupPrecomputation< Element > &pc1, const Integer &exponent1, const DL_FixedBasePrecomputation< Element > &pc2, const Integer &exponent2) const =0
Exponentiates an element.
virtual bool IsInitialized() const =0
Determines whether this object is initialized.
virtual void Load(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation)=0
Retrieve previously saved precomputation.
DL_FixedBasePrecomputation adapter class.
void Load(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation)
Retrieve previously saved precomputation.
bool IsInitialized() const
Determines whether this object is initialized.
void SetBase(const DL_GroupPrecomputation< Element > &group, const Element &base)
Set the base element.
void Precompute(const DL_GroupPrecomputation< Element > &group, unsigned int maxExpBits, unsigned int storage)
Perform precomputation.
Element CascadeExponentiate(const DL_GroupPrecomputation< Element > &pc1, const Integer &exponent1, const DL_FixedBasePrecomputation< Element > &pc2, const Integer &exponent2) const
Exponentiates an element.
void Save(const DL_GroupPrecomputation< Element > &group, BufferedTransformation &storedPrecomputation) const
Save precomputation for later use.
const Element & GetBase(const DL_GroupPrecomputation< Element > &group) const
Get the base element.
Element Exponentiate(const DL_GroupPrecomputation< Element > &group, const Integer &exponent) const
Exponentiates an element.
DL_GroupPrecomputation interface.
virtual Element ConvertIn(const Element &v) const
Converts an element between representations.
virtual Element BERDecodeElement(BufferedTransformation &bt) const =0
Decodes element in DER format.
virtual void DEREncodeElement(BufferedTransformation &bt, const Element &P) const =0
Encodes element in DER format.
virtual const AbstractGroup< Element > & GetGroup() const =0
Retrieves AbstractGroup interface.
virtual Element ConvertOut(const Element &v) const
Converts an element between representations.
virtual bool NeedConversions() const
Determines if elements needs conversion.
Multiple precision integer with arithmetic operations.
Abstract base classes that provide a uniform interface to this library.
Multiple precision integer with arithmetic operations.