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)
63 extern const double CLOCK_TICKS_PER_SECOND;
64 extern double g_allocatedTime;
65 extern double g_hertz;
66 extern double g_logTotal;
67 extern unsigned int g_logCount;
68 extern const byte defaultKey[];
71 extern time_t g_testBegin;
72 extern time_t g_testEnd;
75 void BenchmarkWithCommand(
int argc,
const char*
const argv[]);
77 void Benchmark(Test::TestClass suites,
double t,
double hertz);
79 void BenchmarkUnkeyedAlgorithms(
double t,
double hertz);
81 void BenchmarkSharedKeyedAlgorithms(
double t,
double hertz);
83 void BenchmarkPublicKeyAlgorithms(
double t,
double hertz);
85 void BenchmarkEllipticCurveAlgorithms(
double t,
double hertz);
88 extern void OutputResultKeying(
double iterations,
double timeTaken);
89 extern void OutputResultBytes(
const char *name,
const char *provider,
double length,
double timeTaken);
90 extern 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.