diff options
author | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-26 14:19:43 +0000 |
---|---|---|
committer | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-11-26 14:19:43 +0000 |
commit | 7aff1e4cb053394db57c2814d5fe1e6493e0cc75 (patch) | |
tree | c8585e44049b37e4da152495c954242204c2c38d /cryptopp/crypto/eprecomp.h | |
parent | 6f3d69266933ef120d229e0daf2da164b77214d0 (diff) |
Project folders rename part 2
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@214 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'cryptopp/crypto/eprecomp.h')
-rw-r--r-- | cryptopp/crypto/eprecomp.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/cryptopp/crypto/eprecomp.h b/cryptopp/crypto/eprecomp.h deleted file mode 100644 index ade6c34..0000000 --- a/cryptopp/crypto/eprecomp.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef CRYPTOPP_EPRECOMP_H
-#define CRYPTOPP_EPRECOMP_H
-
-#include "integer.h"
-#include "algebra.h"
-#include <vector>
-
-NAMESPACE_BEGIN(CryptoPP)
-
-template <class T>
-class DL_GroupPrecomputation
-{
-public:
- typedef T Element;
-
- virtual bool NeedConversions() const {return false;}
- virtual Element ConvertIn(const Element &v) const {return v;}
- virtual Element ConvertOut(const Element &v) const {return v;}
- virtual const AbstractGroup<Element> & GetGroup() const =0;
- virtual Element BERDecodeElement(BufferedTransformation &bt) const =0;
- virtual void DEREncodeElement(BufferedTransformation &bt, const Element &P) const =0;
-};
-
-template <class T>
-class DL_FixedBasePrecomputation
-{
-public:
- typedef T Element;
-
- virtual bool IsInitialized() const =0;
- virtual void SetBase(const DL_GroupPrecomputation<Element> &group, const Element &base) =0;
- virtual const Element & GetBase(const DL_GroupPrecomputation<Element> &group) const =0;
- virtual void Precompute(const DL_GroupPrecomputation<Element> &group, unsigned int maxExpBits, unsigned int storage) =0;
- virtual void Load(const DL_GroupPrecomputation<Element> &group, BufferedTransformation &storedPrecomputation) =0;
- virtual void Save(const DL_GroupPrecomputation<Element> &group, BufferedTransformation &storedPrecomputation) const =0;
- virtual Element Exponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent) const =0;
- virtual Element CascadeExponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent, const DL_FixedBasePrecomputation<Element> &pc2, const Integer &exponent2) const =0;
-};
-
-template <class T>
-class DL_FixedBasePrecomputationImpl : public DL_FixedBasePrecomputation<T>
-{
-public:
- typedef T Element;
-
- // DL_FixedBasePrecomputation
- bool IsInitialized() const
- {return !m_bases.empty();}
- void SetBase(const DL_GroupPrecomputation<Element> &group, const Element &base);
- const Element & GetBase(const DL_GroupPrecomputation<Element> &group) const
- {return group.NeedConversions() ? m_base : m_bases[0];}
- void Precompute(const DL_GroupPrecomputation<Element> &group, unsigned int maxExpBits, unsigned int storage);
- void Load(const DL_GroupPrecomputation<Element> &group, BufferedTransformation &storedPrecomputation);
- void Save(const DL_GroupPrecomputation<Element> &group, BufferedTransformation &storedPrecomputation) const;
- Element Exponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent) const;
- Element CascadeExponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent, const DL_FixedBasePrecomputation<Element> &pc2, const Integer &exponent2) const;
-
-private:
- void PrepareCascade(const DL_GroupPrecomputation<Element> &group, std::vector<BaseAndExponent<Element> > &eb, const Integer &exponent) const;
-
- Element m_base;
- unsigned int m_windowSize;
- Integer m_exponentBase; // what base to represent the exponent in
- std::vector<Element> m_bases; // precalculated bases
-};
-
-NAMESPACE_END
-
-#ifdef CRYPTOPP_MANUALLY_INSTANTIATE_TEMPLATES
-#include "eprecomp.cpp"
-#endif
-
-#endif
|