aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-08-31 03:44:50 +0000
committerlloyd <[email protected]>2008-08-31 03:44:50 +0000
commit4602c3cbed029bbdda399b40ff3b1e9675fa2ff4 (patch)
tree0eed9e8649d752eb11b0f9fdbfe93e560a2f13a5
parentfcf22c70fd3c7eea182459d55e4289f9f72ec8ab (diff)
Inline some methods of Timer
Randomly generate the RW keys as well, removing all need for the keys/ dir
-rw-r--r--checks/clock.cpp4
-rw-r--r--checks/keys/rsa1024.pem16
-rw-r--r--checks/keys/rsa1536.pem22
-rw-r--r--checks/keys/rsa2048.pem28
-rw-r--r--checks/keys/rsa3072.pem40
-rw-r--r--checks/keys/rsa4096.pem52
-rw-r--r--checks/keys/rsa512.pem10
-rw-r--r--checks/keys/rw1024.pem16
-rw-r--r--checks/keys/rw512.pem10
-rw-r--r--checks/pk_bench.cpp50
-rw-r--r--checks/timer.cpp26
-rw-r--r--checks/timer.h10
12 files changed, 26 insertions, 258 deletions
diff --git a/checks/clock.cpp b/checks/clock.cpp
index ed417b21f..73f2c0e39 100644
--- a/checks/clock.cpp
+++ b/checks/clock.cpp
@@ -10,10 +10,10 @@ using namespace Botan;
benchmarks and such take forever.
*/
-#define USE_CLOCK 1
+#define USE_CLOCK 0
#define USE_TIMES 0
#define USE_POSIX_GETTIME 0
-#define USE_RDTSC 0
+#define USE_RDTSC 1
/* If using USE_RDTSC, set to your CPU's Mhz */
#define CPU_MHZ 2400
diff --git a/checks/keys/rsa1024.pem b/checks/keys/rsa1024.pem
deleted file mode 100644
index 6ab9326ca..000000000
--- a/checks/keys/rsa1024.pem
+++ /dev/null
@@ -1,16 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMWoYknxc2v0eCy6
-IPlkssAFbBG0zS7yMVYimlny6zJ0WcpUuMR9gYp6oeP3/dYQOW072VPqH4YtaEnE
-rE+df5Elecx/EGugLqHRlOKHWVAYSu9QRsPiu29nyM/jJ2LE1nNFggu8+t8su59p
-CbkzL5sClgkwYanfBQAKt49+5JwlAgMBAAECgYA88ySD6qmN44/fMvISFWQtZD6j
-4x3WWSavifIQxKCUKV66zo8/P/hfLFuZgZJLnSsoLOliP/LCnGPpQ3VjA40fOD80
-l71satQmrmIJR7TOJeTh/EQ5glDh8exfcmrZqvIbStghRPveSmHt2boz13mCJLGo
-DnIt9YpHQW5wtiCuTQJBAP0GAzRowQatvKomrEtr0kz0kZ6l7rmUWNbjx1jtYG1j
-mqPTsLw2z8rsNQetAoC/bp+cPrz0GgszqVzG7rvdV+8CQQDH+6LLn7JMYDTJ4jnp
-NQCArIucstyNQoxaHacnZxeWeRAhCTgJ9feQUqysoewe1+AZgY2LLUF+j8YIEu4a
-Z5krAkAvbvce1hyJofxicYmPQhFUt+ysrzLHu5XEA0OV2jpfh3KwD7lsL2JZClsO
-q1JyzHByn5nrVl+jhfXUHL8YnPAlAkEAvC1IjpqCx+NvSNia7Zp2Ep5J8PVNG48X
-SmTEuQsE4w6f4rYuCRFuFlv1J6xl5s/zi4ygh+nZyyG2kjpd2nLJaQJAKkYVTfeL
-VxZZZKAU5rDvMsnVccTbtLdQQVXxYLpDdr7gtM2znbZWiQ67Ep/DIFetxlwMwSJS
-QBNFkdn1Ut01Rg==
------END PRIVATE KEY-----
diff --git a/checks/keys/rsa1536.pem b/checks/keys/rsa1536.pem
deleted file mode 100644
index 4475a3d9d..000000000
--- a/checks/keys/rsa1536.pem
+++ /dev/null
@@ -1,22 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIDlAIBADANBgkqhkiG9w0BAQEFAASCA34wggN6AgEAAoHBAKuFaCy1yWWztcvs
-D5tRWSPVRHDx2MGM97Z8STLs77GCV9JBf6kEAYheU+CNrxstVXHw/g3gnFxR285C
-WW89uabpk10jhWJQgctupTyQePkzISfoQqguSMSNO0rIpFqk6+vy1n/l8muJwu7/
-9jchnPUhfN6W4ABy1kJVRO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yNhUedZV7RZB/J7z83Dig2eMi
-sfKBD62jWWFSfxg0sZCb2v3Y1rd5xgaU42OAukXPx4b9KMgxCu5iMEMvugmW6H0i
-93ktEB6kwXGq44lWdi4+2y3MiRm6Amn5zeaz2V9tnsk9ItEY/Mg3su5ZkNboTLGB
-00Fvz/qaIwKBgQDKKPZsz9hf5seli63NJ4y2/JJwp8foYEZ2tBz59H0BSVTqAJrW
-EsXQfa0hjU3k6i+ZGkaZPUzsuGZy3DA5aUUQIqHeTyP/U3gSrpP/IPdlCEnqwVG4
-YxjEh5xnB6jQZPHpwKtJaF6cfS5Mmh9kjh8FJ8hGBNLWOEdewwczCOnXEwKBgGyx
-YTj/eUTtccRRNpUHMzI5K+7W4Yk3rYA0M/BeCt/De4vuRH3AUE/KqY1h2h5LdVZ5
-NI/HuqreUWn0kOS1yNkmA1jI/NrcOBfJLY4l7uctpm5bVAiNEH9LNJSrliOX1Irc
-ECb1DmJPlnbV9s2nku0bdd8Pv0C66xuU7Ka8aGCtAoGAW3YzomBT17iRaoVIj33l
-MBELk/0vNaePxuhYq3G5Sg/4LZ0giPKNbjgnCNP7yDOEhLcWSW5RFFuIS8Vs0ZKk
-TWqQrV68YzTFk46vhKXdB+1NRJ0DcO+n3cKajAXBPESJStHw7K8TCyvEt7rId0W9
-xLAaxucFT6SRHKC+klTALu8=
------END PRIVATE KEY-----
diff --git a/checks/keys/rsa3072.pem b/checks/keys/rsa3072.pem
deleted file mode 100644
index 1101062bc..000000000
--- a/checks/keys/rsa3072.pem
+++ /dev/null
@@ -1,40 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQCwE5Upn2qTRbJ5
-sZXt0cpMy03dYlGJom6unGAKMdmoQL0/3tycep8rei+bJre06qQz3+jWom2AujWu
-TmA+RcT41Q0gBaEMW0pmIBp2TcINdqvwTslo3sjAvdCh408FH6GwSko4BBBGDkxK
-Avl5uVAKxIJfb0bcD1c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QIuU0ao70CBqKdmAbm1MQkmhUxODOG81jemSb6AhHPJ1ueNN2LWAY+cvQonYGB
-oPL/+MMli/3s/RTU8y9rh4dw
------END PRIVATE KEY-----
diff --git a/checks/keys/rsa4096.pem b/checks/keys/rsa4096.pem
deleted file mode 100644
index ec6855e01..000000000
--- a/checks/keys/rsa4096.pem
+++ /dev/null
@@ -1,52 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCuo+I8il3o5RmO
-b9bWyFWBQuyXDRPOeoNvtpPHGmG7zZs1n2++jpXzaF1aKqJQSlWf2bUh2k73xpA1
-4rcW2yhIOE6wQP01k9HrvFjvqzebxtKrykFC+Y1h4K/Yoj4CvHIKTS3gwTwe6Wzo
-ke4MBNbIprk5s/hBjlN2ZJLdbekEvRQ+MQFjQayGWF9rnFYUXmEzuWuCM46et3En
-FUyoPuaYNks2miBr3TyFGovSwxNpighv5l+oliVueb5k9oKhXJKa4cBmieQfJ3Wg
-h9VxcnJfMCYnp17zbMfWQH4QSf0dYhAnGRISakviNzcaZrqoMyLrQG0fZ4NWlJK8
-g4QqwAiTfIj3rag64LNH4S4QNolixitHUPqYvjXjmCqMwh/0fyCCOQUXJcpMYobg
-Olf7KX6n2/3xbVRm3QSc0XtdtnvyE/LLfWbIWWHUDzUSVxqK/DFaOxz0pWnOfdGf
-VMNjOHotePnqVTBV92ipc5LIbgsds8wDofLkd6d3OSO2ur8ZITvOVSTx2rxdshkx
-RagewBGIQnAy2fTIlHeMiQOwca5gWqtF8j5TX5djcnTZGmbggy2uj/Z0mqX8JYXY
-XAxfklR8BAopaAm0yCiHyfDOBHw2ZRfIj7VrypYodoREVhDoALU6O6fSJBM2GTSO
-sPt4EvBPRgCoLgcgsyUQ7rAeFAh21QIDAQABAoICABQD1k7n8MFbWGV5rd6p0Rri
-Z6kcJ5P3eI7aFu+vt1nFw68Omcj2IHtoD6Lg1f9rtYp/cgHyOjCtgiO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OuS0xT+O8YC45uBZ2r+S4/A+Bka1MyAFx+fp
-v/NbkXicsC4s9pGOgsPS4xVp3ShXC41jzPVWuMXibPPuCYvp7BydVDSGMEdfqkRf
-XA0HCqlp4k3PHJhfpOBeoSLelstIYpdPUT4vEOovudNSTOlCMSlbBr4x4U+mixsi
-rPGe/QYtoKHpuZLZUkqkWc2+cGYD7/aNRT0EzYMhnwaM0T9rCSTJkDrM6/q7WKsl
-isKJKuWLCOKvGIWKQS326uF2r4vnyw==
------END PRIVATE KEY-----
diff --git a/checks/keys/rsa512.pem b/checks/keys/rsa512.pem
deleted file mode 100644
index e359f492c..000000000
--- a/checks/keys/rsa512.pem
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIBVQIBADANBgkqhkiG9w0BAQEFAASCAT8wggE7AgEAAkEA0yKodbN10WvQ6Hjv
-6WQE8QLJt0bxI5kYPv3i21aZhhZpvl4fqnJkDPTd7tTS6RtI9inJ58bLjs4yOcJE
-41196QIDAQABAkAOIUmo5uPBqjeG92EG+5yhDJC3ZVYKDdrjjFY8W6VWpdYsR5an
-UpEP5l29QIsPOH+BjGnG7NfURUjAdGaenr0pAiEA90/j88/FvfUXpQqIdnbnzC0g
-xQl1i3ZXrKtz391YHQcCIQDajW0K4blZuKRGzjgH8ZW8ZzdJFJAgZTWsj4Xl1uXB
-jwIhAO4/cWtsqqOv3EJrXkE5lV6Vzu7iiPF8ZUP7u9pa4sq7AiBmdU7dfxzp1woM
-t7jE4JkWDj144U8AIPKcx1w6eBiWOQIhAJ438klFZuGDVbDUllF9AeO1KpVT4btp
-2K7pByk+bP79
------END PRIVATE KEY-----
diff --git a/checks/keys/rw1024.pem b/checks/keys/rw1024.pem
deleted file mode 100644
index 8272014bf..000000000
--- a/checks/keys/rw1024.pem
+++ /dev/null
@@ -1,16 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIICdQIBADAOBgorBgEEAYHFKgEBBQAEggJeMIICWgIBAAKBgQC28nMTDzUzMD+c
-YqWG1FoW3FDMJxyr2RLMufrpAr2pKkBDHuzHBzzcFV2T8/0zuFFDlD5A3waqXV0E
-3uYXGpv4AiiXPiIs75cQIkEsKfcaKR+TkkTIhfiZ1nvFcrDuwBKvaQzt24326xRI
-DdOi8L2+vJQSQSjsAdG4SgAGC17BRQIBAgKBgANEVFcyjqoOk2vvedAfOHdD7yg3
-jjntBOg6LZ+W5/VOeAEy1oON1/Gk8/Ttf/M1k7yipa7faUMKz2AWRBvXVRIc3wMO
-73jMy+s54NkFj/6fXxpI/OdSNEEnVq84G7IRXSuOj6JpZ6PNbDnpNWlE8t2bM3uN
-vEcZtHV9XvhqpBZ/AkEA45gV+4e6y8z3ebxm6grpeE/JXg2glOm+3pn7Rfc+IHgw
-OK4EiFOaLOmCtPGA/HGFjy5XWeYeLFpfr6Q1ujpiowJBAM3H1f44BVcuo/9VTAhs
-fdQCCjzkjfWgmlzrdeaqvNM4+ADzYkSOh85+GlUzGt8rvzois+YTQDX9pS2VeP0/
-cvcCQDjmBX7h7rLzPd5vGbqCul4T8leDaCU6b7emftF9z4geDA4rgSIU5os6YK08
-YD8cYWPLldZ5h4sWl+vpDW6OmKkCQQCaVeB+qgQBYvr/f/kGUV5fAYetq2p4OHPF
-sJhtAA2earoAtomzauXa3pO/5lQnYM9rmgbsjnAofjviMBq975Y5AkAXYycCq+zk
-1z1CYY9D7/hTagRK3tRYweFh9zR6PdwN6NfnWYktFOONzHz2eupU73A3dG+TbTDy
-HeFDKOXf54Ar
------END PRIVATE KEY-----
diff --git a/checks/keys/rw512.pem b/checks/keys/rw512.pem
deleted file mode 100644
index 05e900c61..000000000
--- a/checks/keys/rw512.pem
+++ /dev/null
@@ -1,10 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIBVAIBADAOBgorBgEEAYHFKgEBBQAEggE9MIIBOQIBAAJBALIxGscaieOzc3oN
-cq5T0xOxYRm9WcSUeydWU6fFE2GbKEUkmYmMiaoAUnNd0GJU0aiiSChgfT5dbJ/M
-I7fm2uUCAQICQBZGI1jjUTx2bm9BrlXKemJ2LCM3qziSj2TqynT4omwzLzgEMH57
-pRyVwg5hJfWaPt2Fl1m9IM2w+0m/P/WnwgICIQDyFiSihzJ0O76bGisyDKMe9KEn
-RWVHrN9cUjmV4lqZCwIhALxu3nMOfOyJk6bmKW6o37vH1GYVEi8j9jX/mI4oTjHP
-AiEAtZCbeeVl1yzO9FOgZYl6Vzd43XQL9cGnhT2rMGnD8sgCIC8bt5zDnzsiZOm5
-iluqN+7x9RmFRIvI/Y1/5iOKE4x0AiEAqgdTQJW1OyOYKkA62QcUyP5gexP/n0X8
-prrrIxjkekA=
------END PRIVATE KEY-----
diff --git a/checks/pk_bench.cpp b/checks/pk_bench.cpp
index efeaef0fb..127174f61 100644
--- a/checks/pk_bench.cpp
+++ b/checks/pk_bench.cpp
@@ -110,19 +110,22 @@ void benchmark_rsa(RandomNumberGenerator& rng,
}
}
-void benchmark_dsa(RandomNumberGenerator& rng,
- double seconds,
- Benchmark_Report& report)
+template<typename PRIV_KEY_TYPE>
+void benchmark_dsa_nr(RandomNumberGenerator& rng,
+ double seconds,
+ Benchmark_Report& report)
{
- struct dsa_groups { int psize; int qsize; };
+ struct group_info { int psize; int qsize; };
- const dsa_groups keylen[] = { { 512, 160 },
+ const group_info keylen[] = { { 512, 160 },
{ 768, 160 },
{ 1024, 160 },
{ 2048, 256 },
{ 3072, 256 },
{ 0, 0 } };
+ const std::string algo_name = PRIV_KEY_TYPE().algo_name();
+
for(size_t j = 0; keylen[j].psize; j++)
{
const std::string len_str = to_string(keylen[j].psize);
@@ -141,7 +144,7 @@ void benchmark_dsa(RandomNumberGenerator& rng,
groupgen_timer.stop();
keygen_timer.start();
- DSA_PrivateKey key(rng, group);
+ PRIV_KEY_TYPE key(rng, group);
keygen_timer.stop();
const std::string padding = "EMSA1(SHA-" + to_string(keylen[j].qsize) + ")";
@@ -151,7 +154,7 @@ void benchmark_dsa(RandomNumberGenerator& rng,
SecureVector<byte> message, signature;
- for(u32bit i = 0; i != 1000; ++i)
+ for(u32bit i = 0; i != 100; ++i)
{
if(private_op_timer.seconds() < seconds || signature.size() == 0)
{
@@ -170,12 +173,12 @@ void benchmark_dsa(RandomNumberGenerator& rng,
public_op_timer.stop();
if(!verified)
- std::cerr << "Signature verification failure in DSA benchmark\n";
+ std::cerr << "Signature verification failure in " << algo_name << " benchmark\n";
}
}
}
- const std::string nm = "DSA-" + to_string(keylen[j].psize);
+ const std::string nm = algo_name + "-" + to_string(keylen[j].psize);
report.report(nm, groupgen_timer);
report.report(nm, keygen_timer);
report.report(nm, public_op_timer);
@@ -223,7 +226,7 @@ void bench_pk(RandomNumberGenerator& rng,
if(algo == "All" || algo == "DSA")
{
- benchmark_dsa(rng, seconds, report);
+ benchmark_dsa_nr<DSA_PrivateKey>(rng, seconds, report);
}
if(algo == "All" || algo == "DH")
@@ -263,39 +266,24 @@ void bench_pk(RandomNumberGenerator& rng,
if(algo == "All" || algo == "NR")
{
- const u32bit keylen[] = { 512, 768, 1024, 0 };
-
- for(size_t j = 0; keylen[j]; j++)
- {
- const std::string len_str = to_string(keylen[j]);
-
- NR_PrivateKey key(rng, "dsa/jce/" + len_str);
-
- bench_ver(get_pk_signer(key, "EMSA1(SHA-1)"),
- get_pk_verifier(key, "EMSA1(SHA-1)"),
- rng, "NR-" + len_str, seconds, html);
-
- bench_sig(get_pk_signer(key, "EMSA1(SHA-1)"),
- rng, "NR-" + len_str, seconds, html);
- }
+ benchmark_dsa_nr<NR_PrivateKey>(rng, seconds, report);
}
if(algo == "All" || algo == "RW")
{
- const u32bit keylen[] = { 512, 1024, 0 };
+ const u32bit keylen[] = { 1024, 2048, 4096, 0 };
for(size_t j = 0; keylen[j]; j++)
{
RW_PrivateKey key(rng, keylen[j]);
const std::string len_str = to_string(keylen[j]);
- bench_ver(get_pk_signer(*key, "EMSA2(SHA-1)"),
- get_pk_verifier(*key, "EMSA2(SHA-1)"),
+
+ bench_ver(get_pk_signer(key, "EMSA2(SHA-1)"),
+ get_pk_verifier(key, "EMSA2(SHA-1)"),
rng, "RW-" + len_str, seconds, html);
- bench_sig(get_pk_signer(*key, "EMSA2(SHA-1)"),
+ bench_sig(get_pk_signer(key, "EMSA2(SHA-1)"),
rng, "RW-" + len_str, seconds, html);
-
- delete key;
}
}
}
diff --git a/checks/timer.cpp b/checks/timer.cpp
index 8b7a6d9be..4abd8a05f 100644
--- a/checks/timer.cpp
+++ b/checks/timer.cpp
@@ -36,32 +36,6 @@ void Timer::stop()
}
}
-u64bit Timer::value()
- {
- stop();
- return time_used;
- }
-
-double Timer::seconds()
- {
- return milliseconds() / 1000.0;
- }
-
-double Timer::milliseconds()
- {
- return value() / 1000000.0;
- }
-
-double Timer::ms_per_event()
- {
- return milliseconds() / events();
- }
-
-double Timer::seconds_per_event()
- {
- return seconds() / events();
- }
-
std::ostream& operator<<(std::ostream& out, Timer& timer)
{
//out << timer.value() << " ";
diff --git a/checks/timer.h b/checks/timer.h
index 80aeec9e6..47bd7696e 100644
--- a/checks/timer.h
+++ b/checks/timer.h
@@ -20,12 +20,12 @@ class Timer
void stop();
- u64bit value();
- double seconds();
- double milliseconds();
+ u64bit value() { stop(); return time_used; }
+ double seconds() { return milliseconds() / 1000.0; }
+ double milliseconds() { return value() / 1000000.0; }
- double ms_per_event();
- double seconds_per_event();
+ double ms_per_event() { return milliseconds() / events(); }
+ double seconds_per_event() { return seconds() / events(); }
u32bit events() const { return event_count; }
std::string get_name() const { return name; }