summaryrefslogtreecommitdiff
path: root/bench.h
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2019-08-07 04:20:37 -0400
committerJeffrey Walton <noloader@gmail.com>2019-08-07 04:20:37 -0400
commit1a5155fd96a6c5c04c11c29f39e94a29290bfe83 (patch)
tree5b7e32f67dfb0fe4ba1a14b9be4b546d3f5b373f /bench.h
parentf3dd3d25592ceb688d2b32475f72118222869516 (diff)
downloadcryptopp-git-1a5155fd96a6c5c04c11c29f39e94a29290bfe83.tar.gz
Split public key benchmarks into integers and elliptic curves
Diffstat (limited to 'bench.h')
-rw-r--r--bench.h48
1 files changed, 42 insertions, 6 deletions
diff --git a/bench.h b/bench.h
index 34c446ef..31a0d69a 100644
--- a/bench.h
+++ b/bench.h
@@ -16,14 +16,48 @@ NAMESPACE_BEGIN(Test)
// More granular control over benchmarks
enum TestClass {
- UnkeyedRNG=(1<<0),UnkeyedHash=(1<<1),UnkeyedOther=(1<<2),
- SharedKeyMAC=(1<<3),SharedKeyStream=(1<<4),SharedKeyBlock=(1<<5),SharedKeyOther=(1<<6),
- PublicKeyAgreement=(1<<7),PublicKeyEncryption=(1<<8),PublicKeySignature=(1<<9),PublicKeyOther=(1<<10),
+ /// \brief Random number generators
+ UnkeyedRNG=(1<<0),
+ /// \brief Message digests
+ UnkeyedHash=(1<<1),
+ /// \brief Other unkeyed algorithms
+ UnkeyedOther=(1<<2),
+
+ /// \brief Message authentication codes
+ SharedKeyMAC=(1<<3),
+ /// \brief Stream ciphers
+ SharedKeyStream=(1<<4),
+ /// \brief Block ciphers ciphers
+ SharedKeyBlock=(1<<5),
+ /// \brief Other shared key algorithms
+ SharedKeyOther=(1<<6),
+
+ /// \brief Key agreement algorithms over integers
+ PublicKeyAgreement=(1<<7),
+ /// \brief Encryption algorithms over integers
+ PublicKeyEncryption=(1<<8),
+ /// \brief Signature algorithms over integers
+ PublicKeySignature=(1<<9),
+ /// \brief Other public key algorithms over integers
+ PublicKeyOther=(1<<10),
+
+ /// \brief Key agreement algorithms over EC
+ PublicKeyAgreementEC=(1<<11),
+ /// \brief Encryption algorithms over EC
+ PublicKeyEncryptionEC=(1<<12),
+ /// \brief Signature algorithms over EC
+ PublicKeySignatureEC=(1<<13),
+ /// \brief Other public key algorithms over EC
+ PublicKeyOtherEC=(1<<14),
+
Unkeyed=UnkeyedRNG|UnkeyedHash|UnkeyedOther,
SharedKey=SharedKeyMAC|SharedKeyStream|SharedKeyBlock|SharedKeyOther,
PublicKey=PublicKeyAgreement|PublicKeyEncryption|PublicKeySignature|PublicKeyOther,
- All=Unkeyed|SharedKey|PublicKey,
- TestFirst=(0), TestLast=(1<<11)
+ PublicKeyEC=PublicKeyAgreementEC|PublicKeyEncryptionEC|PublicKeySignatureEC|PublicKeyOtherEC,
+
+ All=Unkeyed|SharedKey|PublicKey|PublicKeyEC,
+
+ TestFirst=(0), TestLast=(1<<15)
};
extern const double CLOCK_TICKS_PER_SECOND;
@@ -45,8 +79,10 @@ void Benchmark(Test::TestClass suites, double t, double hertz);
void Benchmark1(double t, double hertz);
// Shared key systems
void Benchmark2(double t, double hertz);
-// Public key systems
+// Public key systems over integers
void Benchmark3(double t, double hertz);
+// Public key systems over elliptic curves
+void Benchmark4(double t, double hertz);
// These are defined in bench1.cpp
extern void OutputResultKeying(double iterations, double timeTaken);