4#ifndef CRYPTOPP_BENCH_H
5#define CRYPTOPP_BENCH_H
29 SharedKeyStream=(1<<4),
31 SharedKeyBlock=(1<<5),
33 SharedKeyOther=(1<<6),
36 PublicKeyAgreement=(1<<7),
38 PublicKeyEncryption=(1<<8),
40 PublicKeySignature=(1<<9),
42 PublicKeyOther=(1<<10),
45 PublicKeyAgreementEC=(1<<11),
47 PublicKeyEncryptionEC=(1<<12),
49 PublicKeySignatureEC=(1<<13),
51 PublicKeyOtherEC=(1<<14),
53 Unkeyed=UnkeyedRNG|UnkeyedHash|UnkeyedOther,
54 SharedKey=SharedKeyMAC|SharedKeyStream|SharedKeyBlock|SharedKeyOther,
55 PublicKey=PublicKeyAgreement|PublicKeyEncryption|PublicKeySignature|PublicKeyOther,
56 PublicKeyEC=PublicKeyAgreementEC|PublicKeyEncryptionEC|PublicKeySignatureEC|PublicKeyOtherEC,
58 All=Unkeyed|SharedKey|
PublicKey|PublicKeyEC,
60 TestFirst=(0), TestLast=(1<<15)
63extern const double CLOCK_TICKS_PER_SECOND;
64extern double g_allocatedTime;
66extern double g_logTotal;
67extern unsigned int g_logCount;
68extern const byte defaultKey[];
71extern time_t g_testBegin;
72extern time_t g_testEnd;
75void BenchmarkWithCommand(
int argc,
const char*
const argv[]);
77void Benchmark(Test::TestClass suites,
double t,
double hertz);
79void BenchmarkUnkeyedAlgorithms(
double t,
double hertz);
81void BenchmarkSharedKeyedAlgorithms(
double t,
double hertz);
83void BenchmarkPublicKeyAlgorithms(
double t,
double hertz);
85void BenchmarkEllipticCurveAlgorithms(
double t,
double hertz);
88extern void OutputResultKeying(
double iterations,
double timeTaken);
89extern void OutputResultBytes(
const char *name,
const char *provider,
double length,
double timeTaken);
90extern void OutputResultOperations(
const char *name,
const char *provider,
const char *operation,
bool pc,
unsigned long iterations,
double timeTaken);
Interface for authenticated encryption modes of operation.
Interface for retrieving values given their names.
Interface for public keys.
Interface for random number generators.
Interface for algorithms that take byte strings as keys.
Abstract base classes that provide a uniform interface to this library.
Crypto++ library namespace.
Namespace containing testing and benchmark classes.