| 90 | } |
| 91 | |
| 92 | template <class T> T DL_FixedBasePrecomputationImpl<T>::Exponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent) const |
| 93 | { |
| 94 | std::vector<BaseAndExponent<Element> > eb; // array of segments of the exponent and precalculated bases |
| 95 | eb.reserve(m_bases.size()); |
| 96 | PrepareCascade(group, eb, exponent); |
| 97 | return group.ConvertOut(GeneralCascadeMultiplication<Element>(group.GetGroup(), eb.begin(), eb.end())); |
| 98 | } |
| 99 | |
| 100 | template <class T> T |
| 101 | DL_FixedBasePrecomputationImpl<T>::CascadeExponentiate(const DL_GroupPrecomputation<Element> &group, const Integer &exponent, |