MCPcopy Create free account
hub / github.com/LUX-Core/lux / Precompute

Method Precompute

src/cryptopp/eprecomp.cpp:28–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28template <class T> void DL_FixedBasePrecomputationImpl<T>::Precompute(const DL_GroupPrecomputation<Element> &group, unsigned int maxExpBits, unsigned int storage)
29{
30 CRYPTOPP_ASSERT(m_bases.size() > 0);
31 CRYPTOPP_ASSERT(storage <= maxExpBits);
32
33 if (storage > 1)
34 {
35 m_windowSize = (maxExpBits+storage-1)/storage;
36 m_exponentBase = Integer::Power2(m_windowSize);
37 }
38
39 m_bases.resize(storage);
40 for (unsigned i=1; i<storage; i++)
41 m_bases[i] = group.GetGroup().ScalarMultiply(m_bases[i-1], m_exponentBase);
42}
43
44template <class T> void DL_FixedBasePrecomputationImpl<T>::Load(const DL_GroupPrecomputation<Element> &group, BufferedTransformation &bt)
45{

Callers 8

ValidateElGamalFunction · 0.45
ValidateNRFunction · 0.45
ValidateECPFunction · 0.45
ValidateEC2NFunction · 0.45
BenchMarkEncryptionFunction · 0.45
BenchMarkSigningFunction · 0.45
BenchMarkVerificationFunction · 0.45
BenchMarkKeyGenFunction · 0.45

Calls 4

GetGroupMethod · 0.80
sizeMethod · 0.45
resizeMethod · 0.45
ScalarMultiplyMethod · 0.45

Tested by

no test coverage detected