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

Function BenchMarkKeyGen

src/cryptopp/bench2.cpp:132–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void BenchMarkKeyGen(const char *name, SimpleKeyAgreementDomain &d, double timeTotal, bool pc=false)
133{
134 SecByteBlock priv(d.PrivateKeyLength()), pub(d.PublicKeyLength());
135
136 const clock_t start = clock();
137 unsigned int i;
138 double timeTaken;
139 for (timeTaken=(double)0, i=0; timeTaken < timeTotal; timeTaken = double(clock() - start) / CLOCK_TICKS_PER_SECOND, i++)
140 d.GenerateKeyPair(GlobalRNG(), priv, pub);
141
142 OutputResultOperations(name, "Key-Pair Generation", pc, i, timeTaken);
143
144 if (!pc && d.GetMaterial().SupportsPrecomputation())
145 {
146 d.AccessMaterial().Precompute(16);
147 BenchMarkKeyGen(name, d, timeTotal, true);
148 }
149}
150
151void BenchMarkKeyGen(const char *name, AuthenticatedKeyAgreementDomain &d, double timeTotal, bool pc=false)
152{

Callers 2

BenchMarkKeyAgreementFunction · 0.85
BenchmarkAll2Function · 0.85

Calls 9

OutputResultOperationsFunction · 0.85
PrivateKeyLengthMethod · 0.80
PublicKeyLengthMethod · 0.80
GenerateKeyPairMethod · 0.80
PrecomputeMethod · 0.45

Tested by

no test coverage detected