From c2a2e61e14dd27ad9a1143b06e404502b364415f Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 13 Sep 2007 15:03:18 +0000 Subject: Cleanup the public key benchmark code: avoid macros, use PEM/PKCS #8 format to store Rabin-Williams keys, inline small functions that are only called once into their caller. Reduces overall length of the file from 458 to 367 lines. Rename all the key files in keys/ to use a .pem suffix since they are all now in PEM format (the RSA keys had been for a long time but were never renamed). --- checks/keys/rsa1024.key | 16 --- checks/keys/rsa1024.pem | 16 +++ checks/keys/rsa1536.key | 22 ---- checks/keys/rsa1536.pem | 22 ++++ checks/keys/rsa2048.key | 28 ----- checks/keys/rsa2048.pem | 28 +++++ checks/keys/rsa3072.key | 40 ------- checks/keys/rsa3072.pem | 40 +++++++ checks/keys/rsa4096.key | 52 --------- checks/keys/rsa4096.pem | 52 +++++++++ checks/keys/rsa512.key | 10 -- checks/keys/rsa512.pem | 10 ++ checks/keys/rw1024.key | 3 - checks/keys/rw1024.pem | 16 +++ checks/keys/rw512.key | 3 - checks/keys/rw512.pem | 10 ++ checks/pk_bench.cpp | 277 ++++++++++++++++-------------------------------- 17 files changed, 287 insertions(+), 358 deletions(-) delete mode 100644 checks/keys/rsa1024.key create mode 100644 checks/keys/rsa1024.pem delete mode 100644 checks/keys/rsa1536.key create mode 100644 checks/keys/rsa1536.pem delete mode 100644 checks/keys/rsa2048.key create mode 100644 checks/keys/rsa2048.pem delete mode 100644 checks/keys/rsa3072.key create mode 100644 checks/keys/rsa3072.pem delete mode 100644 checks/keys/rsa4096.key create mode 100644 checks/keys/rsa4096.pem delete mode 100644 checks/keys/rsa512.key create mode 100644 checks/keys/rsa512.pem delete mode 100644 checks/keys/rw1024.key create mode 100644 checks/keys/rw1024.pem delete mode 100644 checks/keys/rw512.key create mode 100644 checks/keys/rw512.pem (limited to 'checks') diff --git a/checks/keys/rsa1024.key b/checks/keys/rsa1024.key deleted file mode 100644 index 6ab9326ca..000000000 --- a/checks/keys/rsa1024.key +++ /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/rsa1024.pem b/checks/keys/rsa1024.pem new file mode 100644 index 000000000..6ab9326ca --- /dev/null +++ b/checks/keys/rsa1024.pem @@ -0,0 +1,16 @@ +-----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.key b/checks/keys/rsa1536.key deleted file mode 100644 index 4475a3d9d..000000000 --- a/checks/keys/rsa1536.key +++ /dev/null @@ -1,22 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIDlAIBADANBgkqhkiG9w0BAQEFAASCA34wggN6AgEAAoHBAKuFaCy1yWWztcvs -D5tRWSPVRHDx2MGM97Z8STLs77GCV9JBf6kEAYheU+CNrxstVXHw/g3gnFxR285C -WW89uabpk10jhWJQgctupTy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853nwE+k= ------END PRIVATE KEY----- diff --git a/checks/keys/rsa1536.pem b/checks/keys/rsa1536.pem new file mode 100644 index 000000000..4475a3d9d --- /dev/null +++ b/checks/keys/rsa1536.pem @@ -0,0 +1,22 @@ +-----BEGIN PRIVATE KEY----- +MIIDlAIBADANBgkqhkiG9w0BAQEFAASCA34wggN6AgEAAoHBAKuFaCy1yWWztcvs +D5tRWSPVRHDx2MGM97Z8STLs77GCV9JBf6kEAYheU+CNrxstVXHw/g3gnFxR285C +WW89uabpk10jhWJQgctupTyQePkzISfoQqguSMSNO0rIpFqk6+vy1n/l8muJwu7/ +9jchnPUhfN6W4ABy1kJVRO0MSos6ZtsbnjzLQomaQ4sJPOUOrBXTprhWHC387T4X +V6Ud/1dGFSuV+VxcieBibXLCzTpCEFWPfKQeMeDRYb47e170BwIDAQABAoG/dl2a +MUCXu5eeiHEKVCUktEB4+s3rclErTBkjwAEYE2ff3eQANU3jwOKs/59x4qS7p+X8 +wkGUUMws5Co64zRgP3pG4qpLYjgsr4xWe3U4BsFCIEgoYpI4+sB8KnT29uwtbLtF +J+X4f5pqotwn2e1ewwIWryf8xW+MYh/mzuEtLxJgURi7TnK8+VuBgwra3n2SKr1q +haA4T37jQa2m8fx3lNx7IWBAw91xaFMhp8Nz1pwI+zibwZ4PBaS6UnaoYaECYQDU +6XQvhF59ftGJ3CzdLejN8c7xwkkcbd+5viGjfJY61vTXX0FTP4XDDdpcXcuPHbkI +qKNbuqcb+8b4ud/e3wpaglFPZqn8BH8F6yxApGVlVSvygaTzae0KMF7LjkmYzckC +YQDOO5O+v5VJd77Qc8lJaMGlMGEWf5IqaPfDBskPbuGgNbaF8t+1minPGrBgG/AD +z3dpdQlC8kqoJwVNPTzolNHe0yGT8HHzArrCpsaJsolBCB/oeqIbm2uE8oVptHgJ +W08CYBCEO7sj7aCWofKr3d8anKC9TWx7wegurdhe44UnORA/dKbwgMTQfLPw8yuP +KydjCuOdEW8gP65wDbNl1/QWIVt8GIqsUCt4vdHbuIcbObJutQYPAJjRcs4DipcH +5rWv4QJgef4V/Hy5o1bZIdeMFweHnN6MX9GgtcOX496sqpttjeaYDI5JtNP3rVHd +SUzdYnOj8FbR3q8SaHuEkFcMI4x8xPFhaHCQBy7zKNeck7FvrW9P6KY6JFiAdok7 +T/b4FpjTAmB5TzlevCW/gT1JKoBZofGjwJm5tf6dJMpUMZjdlMcpMCF+3qgg5ZL9 +Ko0660+LIwNRI6ZRdLoSF5U9Y0BWy4jpL/jW0LLtNs132PUVhM7jaMok+flCzwri +bmB853nwE+k= +-----END PRIVATE KEY----- diff --git a/checks/keys/rsa2048.key b/checks/keys/rsa2048.key deleted file mode 100644 index 6c23215ee..000000000 --- a/checks/keys/rsa2048.key +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDQQoiJtweVqGrM -T/5KlAYf7ZMcDTfMp5y+4vXsPTBuREEbEfyP//+prb1333XiAvBuR/ybKGu/yofa -Uu99pCkf2Gsop3fdHSoil+a4ehPi2KQa6l0mgJ6+Ibxy2o6O4CKM/NN/WHvBAqgC -YijPSaxKEOy1KvYNaF+3mBdMuPF+Bq7IgheF41e+3auszSF486Nr5pzu1FpMreuJ -SuLN29FngHyIw0aGtVpNGIV9VEFJ/SUrhXy6BDne9ANfDYxDqVLajKKLV5/k1ZV3 -+IYiHB8h6yYXO/nrZCmlNwDfTqxYa9s4xUjw/bcpy7wsnbs2QC4z2ilXPPWeJ75O -tXnmCmQZAgMBAAECggEAAKeqInbcN4LnPgRjxanHrAyFxSiB+SFCyr/JPS66sTiH -5J6deTBWKDVTkL4QpvvRDlz0SUr/G0LVHr6rfqvht25Zrp2ZWoOKK5Y2A1CBvnuZ -2akgCviRMQfCK8Z1nEV1HYrhrYO5VZ92swXU8VmdfmDUbmSwlPRgMqTbK3QBr+KG -M4Z7sldrnwDgmzn+tDY1CUxdHzCDK82+FAvDbwBzXgbl741u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keys/rsa2048.pem new file mode 100644 index 000000000..6c23215ee --- /dev/null +++ b/checks/keys/rsa2048.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDQQoiJtweVqGrM +T/5KlAYf7ZMcDTfMp5y+4vXsPTBuREEbEfyP//+prb1333XiAvBuR/ybKGu/yofa +Uu99pCkf2Gsop3fdHSoil+a4ehPi2KQa6l0mgJ6+Ibxy2o6O4CKM/NN/WHvBAqgC +YijPSaxKEOy1KvYNaF+3mBdMuPF+Bq7IgheF41e+3auszSF486Nr5pzu1FpMreuJ +SuLN29FngHyIw0aGtVpNGIV9VEFJ/SUrhXy6BDne9ANfDYxDqVLajKKLV5/k1ZV3 ++IYiHB8h6yYXO/nrZCmlNwDfTqxYa9s4xUjw/bcpy7wsnbs2QC4z2ilXPPWeJ75O +tXnmCmQZAgMBAAECggEAAKeqInbcN4LnPgRjxanHrAyFxSiB+SFCyr/JPS66sTiH +5J6deTBWKDVTkL4QpvvRDlz0SUr/G0LVHr6rfqvht25Zrp2ZWoOKK5Y2A1CBvnuZ +2akgCviRMQfCK8Z1nEV1HYrhrYO5VZ92swXU8VmdfmDUbmSwlPRgMqTbK3QBr+KG +M4Z7sldrnwDgmzn+tDY1CUxdHzCDK82+FAvDbwBzXgbl741u0D5S082x8fDLfgTG +EeDZLiMVNRFN8xTmcxzLtjreqQirMQJoMWUAEF/9Wumt7lSM4FVu6M4A/o4b1YhA +9pmE5YUQEBUEQZnN2xz7SA4/ltJKNQfKG/pAI4+hrQKBgQD67CsGByIFGynRp+HT +4GDOPMvLKcz8aIGfJrt1ZrfFu9AsFsWpnn+OwiqnBQF13qLGyJOaJPv9kBXaXDPJ +4TmF9ueI47sCdxpLJztMnTduggTkae4UM85K3ueP9rC5ZEVnPVoMsQFWZHtfBBjM +R6NGnG0AJ9aq68QC0t26HaW2kwKBgQDUeV0hQHqyNhUedZV7RZB/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.key b/checks/keys/rsa3072.key deleted file mode 100644 index 1101062bc..000000000 --- a/checks/keys/rsa3072.key +++ /dev/null @@ -1,40 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQCwE5Upn2qTRbJ5 -sZXt0cpMy03dYlGJom6unGAKMdmoQL0/3tycep8rei+bJre06qQz3+jWom2AujWu -TmA+RcT41Q0gBaEMW0pmIBp2TcINdqvwTslo3sjAvdCh408FH6GwSko4BBBGDkxK -Avl5uVAKxIJfb0bcD1cqSRK6+vnl18J9QLtHZZeHxcp2y4znXIChvKE8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L/+MMli/3s/RTU8y9rh4dw ------END PRIVATE KEY----- diff --git a/checks/keys/rsa3072.pem b/checks/keys/rsa3072.pem new file mode 100644 index 000000000..1101062bc --- /dev/null +++ b/checks/keys/rsa3072.pem @@ -0,0 +1,40 @@ +-----BEGIN PRIVATE KEY----- +MIIG/gIBADANBgkqhkiG9w0BAQEFAASCBugwggbkAgEAAoIBgQCwE5Upn2qTRbJ5 +sZXt0cpMy03dYlGJom6unGAKMdmoQL0/3tycep8rei+bJre06qQz3+jWom2AujWu +TmA+RcT41Q0gBaEMW0pmIBp2TcINdqvwTslo3sjAvdCh408FH6GwSko4BBBGDkxK +Avl5uVAKxIJfb0bcD1cqSRK6+vnl18J9QLtHZZeHxcp2y4znXIChvKE8GSdkUnji +xqOuehIDii0+VGz3rZvsvO9Z+r0nhcU0KYbFuKlS/Cwt4kRR18PFWFCXnzVhxgQY +TUJFtCw8BnOwoRfmbk/WbFEPNPAzZSpsL5LefundtVCJ2jv9jKaBZy4ZkBxt7o46 +ZESHyXyf+OhL3wFcyAi/EB/YTFqw3+sp8/KMl28pqKxVazgawK6tg+VsZDJ22gMa +M2j0tkSnqPcfSKSm6fYKxSxv3JtTLu4K/plml1oZuKOkSfFhRHYoHrTc9nvgYt7B +a+btkhXbDktyrJEuH4q58eFjVK5FeGDWjvvo8Csz8800gpf/koMCAwEAAQKCAYBL +pV4kL7Ud6Iew+LatIcCEFaQyRJc7Rmm+4rfwKVKVkpq74gdtwtC3YRsq0QuD0nsR +PlVOQSJCd72wUUPP/TGOphmpdEGoiWABWDGGOgnwttdPusmVIIGnLOWBZ6L/VIOm +tYQFZNmI/4OPGJAN16untJ0+WxRaXszYAeTmKAVM1dFc9n5/QgpD7pn5R6IVlAw/ +cEblBvmBhF0jMKwJvbAXjTm62ZKnJhMjNliuk6bIYBRFQMICGD/Gw0hHvjoT31op +FDixfeynEr3urWqovzvheFta8Vp6pziPJHAVN7i16qyN1aLekfQUBWp4XpGSgg0P +Tds/YH25hp4WR0Syk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iHk +tAfjntDR/OAVtK49phra//LgQ+Lb3kny4GD+h55JOzfqeWM1dmv81g0eH+LDY9Ve +llRGeMlIEcQSb+x74Hr25DM0Pr0iLKhHuZTPGZLuf524XU1vtaJ+fJnyjAHLy05P +5wq9jF63HW0XQcXIapRpAoHAbem3wm1Y/C+HgGU3U0XPX7CnjU/1iV1ddvLVbgo/ +LQEYTU4oYjHlJK/2+LE/kmiZR2g3OCjNUzBOL8WXY5X9cP1+aJ2zDUEo0nD4CeKt +L4b94uXAjV/fy2Spu6y/LuqL2H4+KM0SzTJWAlr69dUhmTVlvJQ7i/XTXrBTaECc ++OQIuU0ao70CBqKdmAbm1MQkmhUxODOG81jemSb6AhHPJ1ueNN2LWAY+cvQonYGB +oPL/+MMli/3s/RTU8y9rh4dw +-----END PRIVATE KEY----- diff --git a/checks/keys/rsa4096.key b/checks/keys/rsa4096.key deleted file mode 100644 index ec6855e01..000000000 --- a/checks/keys/rsa4096.key +++ /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/DFaOxz0pWnO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9 -O6b9J+gLlappNx5uT2L8XYobiYGCutXIkZVQPQksIJY9A6QnwMRkCuDntNR9iJsQ -gdSocIB7ag1HlRIM3ZScm4e5LoSLkK07ft6UUBdjcFpNID6lM1KLRTDMXQ/81cnI -0SX4zi8oWUIZyRJnkaj0rLpCsjjOZqbHGGyX0CaGyLQDXd57VzXGbRdqb7HZjWvQ -TCECggEAA4w9jyVBJvy/RNQQYXHy1+s8hOx2TUIc2Ui1tDHNrIdjIAR9AmXXPezt -VrStFRSUK86S6/Y+JbxM42Nf4UBUOuS0xT+O8YC45uBZ2r+S4/A+Bka1MyAFx+fp -v/NbkXicsC4s9pGOgsPS4xVp3ShXC41jzPVWuMXibPPuCYvp7BydVDSGMEdfqkRf -XA0HCqlp4k3PHJhfpOBeoSLelstIYpdPUT4vEOovudNSTOlCMSlbBr4x4U+mixsi -rPGe/QYtoKHpuZLZUkqkWc2+cGYD7/aNRT0EzYMhnwaM0T9rCSTJkDrM6/q7WKsl -isKJKuWLCOKvGIWKQS326uF2r4vnyw== ------END PRIVATE KEY----- diff --git a/checks/keys/rsa4096.pem b/checks/keys/rsa4096.pem new file mode 100644 index 000000000..ec6855e01 --- /dev/null +++ b/checks/keys/rsa4096.pem @@ -0,0 +1,52 @@ +-----BEGIN PRIVATE KEY----- +MIIJQgIBADANBgkqhkiG9w0BAQEFAASCCSwwggkoAgEAAoICAQCuo+I8il3o5RmO +b9bWyFWBQuyXDRPOeoNvtpPHGmG7zZs1n2++jpXzaF1aKqJQSlWf2bUh2k73xpA1 +4rcW2yhIOE6wQP01k9HrvFjvqzebxtKrykFC+Y1h4K/Yoj4CvHIKTS3gwTwe6Wzo +ke4MBNbIprk5s/hBjlN2ZJLdbekEvRQ+MQFjQayGWF9rnFYUXmEzuWuCM46et3En +FUyoPuaYNks2miBr3TyFGovSwxNpighv5l+oliVueb5k9oKhXJKa4cBmieQfJ3Wg +h9VxcnJfMCYnp17zbMfWQH4QSf0dYhAnGRISakviNzcaZrqoMyLrQG0f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z0g +TRdTwcQXZRfXLySgJZBhabmKJqyEnW9eVm09HiZQ/Mf4qMt6zvMkhd3fDQQyEXSy +0lJUJDwYktFrCJYsKhjw6ocfkcZ4M3tMS/MMJwY/K8J6fR+AwEN8vpveFLb0NEG9 +O6b9J+gLlappNx5uT2L8XYobiYGCutXIkZVQPQksIJY9A6QnwMRkCuDntNR9iJsQ +gdSocIB7ag1HlRIM3ZScm4e5LoSLkK07ft6UUBdjcFpNID6lM1KLRTDMXQ/81cnI +0SX4zi8oWUIZyRJnkaj0rLpCsjjOZqbHGGyX0CaGyLQDXd57VzXGbRdqb7HZjWvQ +TCECggEAA4w9jyVBJvy/RNQQYXHy1+s8hOx2TUIc2Ui1tDHNrIdjIAR9AmXXPezt +VrStFRSUK86S6/Y+JbxM42Nf4UBUOuS0xT+O8YC45uBZ2r+S4/A+Bka1MyAFx+fp +v/NbkXicsC4s9pGOgsPS4xVp3ShXC41jzPVWuMXibPPuCYvp7BydVDSGMEdfqkRf +XA0HCqlp4k3PHJhfpOBeoSLelstIYpdPUT4vEOovudNSTOlCMSlbBr4x4U+mixsi +rPGe/QYtoKHpuZLZUkqkWc2+cGYD7/aNRT0EzYMhnwaM0T9rCSTJkDrM6/q7WKsl +isKJKuWLCOKvGIWKQS326uF2r4vnyw== +-----END PRIVATE KEY----- diff --git a/checks/keys/rsa512.key b/checks/keys/rsa512.key deleted file mode 100644 index e359f492c..000000000 --- a/checks/keys/rsa512.key +++ /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/rsa512.pem b/checks/keys/rsa512.pem new file mode 100644 index 000000000..e359f492c --- /dev/null +++ b/checks/keys/rsa512.pem @@ -0,0 +1,10 @@ +-----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.key b/checks/keys/rw1024.key deleted file mode 100644 index b17e34343..000000000 --- a/checks/keys/rw1024.key +++ /dev/null @@ -1,3 +0,0 @@ -2 -E39815FB87BACBCCF779BC66EA0AE9784FC95E0DA094E9BEDE99FB45F73E20783038AE0488539A2CE982B4F180FC71858F2E5759E61E2C5A5FAFA435BA3A62A3 -CDC7D5FE3805572EA3FF554C086C7DD4020A3CE48DF5A09A5CEB75E6AABCD338F800F362448E87CE7E1A55331ADF2BBF3A22B3E6134035FDA52D9578FD3F72F7 diff --git a/checks/keys/rw1024.pem b/checks/keys/rw1024.pem new file mode 100644 index 000000000..8272014bf --- /dev/null +++ b/checks/keys/rw1024.pem @@ -0,0 +1,16 @@ +-----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.key b/checks/keys/rw512.key deleted file mode 100644 index ea6ba4226..000000000 --- a/checks/keys/rw512.key +++ /dev/null @@ -1,3 +0,0 @@ -2 -F21624A28732743BBE9B1A2B320CA31EF4A127456547ACDF5C523995E25A990B -BC6EDE730E7CEC8993A6E6296EA8DFBBC7D46615122F23F635FF988E284E31CF diff --git a/checks/keys/rw512.pem b/checks/keys/rw512.pem new file mode 100644 index 000000000..05e900c61 --- /dev/null +++ b/checks/keys/rw512.pem @@ -0,0 +1,10 @@ +-----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 f3b4ad04e..097f4e326 100644 --- a/checks/pk_bench.cpp +++ b/checks/pk_bench.cpp @@ -9,6 +9,8 @@ #include #include +#include + using namespace Botan; #include "common.h" @@ -16,88 +18,21 @@ using namespace Botan; #include #include #include - -#define DEBUG 0 +#include #define PRINT_MS_PER_OP 0 /* If 0, print ops / second */ -RSA_PrivateKey* load_rsa_key(const std::string&); -RW_PrivateKey load_rw_key(const std::string&); - -static BigInt to_bigint(const std::string& h) - { - return BigInt::decode((const byte*)h.data(), - h.length(), BigInt::Hexadecimal); - } - void bench_enc(PK_Encryptor*, const std::string&, double, bool); void bench_dec(PK_Encryptor*, PK_Decryptor*, const std::string&, double, bool); void bench_sig(PK_Signer*, const std::string&, double, bool); void bench_ver(PK_Signer*, PK_Verifier*, const std::string&, double, bool); void bench_kas(PK_Key_Agreement*, const std::string&, double, bool); -void bench_rsa(RSA_PrivateKey& key, const std::string keybits, - double seconds, bool html) - { - bench_enc(get_pk_encryptor(key, "Raw"), - "RSA-" + keybits, seconds, html); - bench_dec(get_pk_encryptor(key, "Raw"), - get_pk_decryptor(key, "Raw"), - "RSA-" + keybits, seconds, html); - } - -void bench_dsa(DSA_PrivateKey& key, const std::string keybits, - double seconds, bool html) - { - bench_ver(get_pk_signer(key, "EMSA1(SHA-1)"), - get_pk_verifier(key, "EMSA1(SHA-1)"), - "DSA-" + keybits, seconds, html); - bench_sig(get_pk_signer(key, "EMSA1(SHA-1)"), - "DSA-" + keybits, seconds, html); - } - -void bench_dh(DH_PrivateKey& key, const std::string keybits, - double seconds, bool html) - { - bench_kas(get_pk_kas(key, "Raw"), - "DH-" + keybits, seconds, html); - } - -void bench_rw(RW_PrivateKey& key, const std::string keybits, - double seconds, bool html) - { - bench_ver(get_pk_signer(key, "EMSA2(SHA-1)"), - get_pk_verifier(key, "EMSA2(SHA-1)"), - "RW-" + keybits, seconds, html); - bench_sig(get_pk_signer(key, "EMSA2(SHA-1)"), - "RW-" + keybits, seconds, html); - } - -void bench_nr(NR_PrivateKey& key, const std::string keybits, - double seconds, bool html) - { - bench_ver(get_pk_signer(key, "EMSA1(SHA-1)"), - get_pk_verifier(key, "EMSA1(SHA-1)"), - "NR-" + keybits, seconds, html); - bench_sig(get_pk_signer(key, "EMSA1(SHA-1)"), - "NR-" + keybits, seconds, html); - } - -void bench_elg(ElGamal_PrivateKey& key, const std::string keybits, - double seconds, bool html) - { - bench_enc(get_pk_encryptor(key, "Raw"), - "ELG-" + keybits, seconds, html); - bench_dec(get_pk_encryptor(key, "Raw"), - get_pk_decryptor(key, "Raw"), - "ELG-" + keybits, seconds, html); - } - void bench_pk(const std::string& algo, bool html, double seconds) { /* There is some strangeness going on here. It looks like algorithms - at the end take some kind of pentalty. For example, running the RW tests + at the end take some kind of penalty. For example, running the RW tests first got a result of: RW-1024: 148.14 ms / private operation but running them last output: @@ -120,117 +55,123 @@ void bench_pk(const std::string& algo, bool html, double seconds) ad-hoc format (the RW algorithm has no assigned OID that I know of, so there is no way to encode a RW key into a PKCS #8 structure). */ - try { if(algo == "All" || algo == "RSA") { - #define DO_RSA(NUM_STR, FILENAME) \ - { \ - RSA_PrivateKey* rsa = load_rsa_key(FILENAME); \ - bench_rsa(*rsa, NUM_STR, seconds, html); \ - delete rsa; \ - } + const u32bit keylen[] = { 512, 1024, 1536, 2048, 3072, 4096, 0 }; + + for(size_t j = 0; keylen[j]; j++) + { + const std::string len_str = to_string(keylen[j]); + const std::string file = "checks/keys/rsa" + len_str + ".pem"; + + std::auto_ptr key( + dynamic_cast(PKCS8::load_key(file)) + ); + + if(key.get() == 0) + throw Invalid_Argument(file + " doesn't have an RSA key in it!"); + + bench_enc(get_pk_encryptor(*key, "Raw"), + "RSA-" + len_str, seconds, html); - DO_RSA("512", "checks/keys/rsa512.key") - DO_RSA("1024", "checks/keys/rsa1024.key") - DO_RSA("1536", "checks/keys/rsa1536.key") - DO_RSA("2048", "checks/keys/rsa2048.key") - DO_RSA("3072", "checks/keys/rsa3072.key") - DO_RSA("4096", "checks/keys/rsa4096.key") - #undef DO_RSA + bench_dec(get_pk_encryptor(*key, "Raw"), + get_pk_decryptor(*key, "Raw"), + "RSA-" + len_str, seconds, html); + } } + if(algo == "All" || algo == "DSA") { - #define DO_DSA(NUM_STR, GROUP) \ - { \ - DSA_PrivateKey dsa(GROUP); \ - bench_dsa(dsa, NUM_STR, seconds, html); \ - } + const u32bit keylen[] = { 512, 768, 1024, 0 }; + + for(size_t j = 0; keylen[j]; j++) + { + const std::string len_str = to_string(keylen[j]); - DO_DSA("512", DL_Group("dsa/jce/512")); - DO_DSA("768", DL_Group("dsa/jce/768")); - DO_DSA("1024", DL_Group("dsa/jce/1024")); - //DO_DSA("2048", DL_Group(DL_Group::DSA_Kosherizer, 2048, 256)); - //DO_DSA("3072", DL_Group(DL_Group::DSA_Kosherizer, 3072, 256)); - #undef DO_DSA + DSA_PrivateKey key("dsa/jce/" + len_str); + + bench_ver(get_pk_signer(key, "EMSA1(SHA-1)"), + get_pk_verifier(key, "EMSA1(SHA-1)"), + "DSA-" + len_str, seconds, html); + + bench_sig(get_pk_signer(key, "EMSA1(SHA-1)"), + "DSA-" + len_str, seconds, html); + } } + if(algo == "All" || algo == "DH") { - #define DO_DH(NUM_STR, GROUP) \ - { \ - DH_PrivateKey dh(DL_Group(GROUP)); \ - bench_dh(dh, NUM_STR, seconds, html); \ - } + const u32bit keylen[] = { 768, 1024, 1536, 2048, 3072, 4096, 0 }; - DO_DH("768", "modp/ietf/768"); - DO_DH("1024", "modp/ietf/1024"); - DO_DH("1536", "modp/ietf/1536"); - DO_DH("2048", "modp/ietf/2048"); - DO_DH("3072", "modp/ietf/3072"); - DO_DH("4096", "modp/ietf/4096"); - #undef DO_DH + for(size_t j = 0; keylen[j]; j++) + { + const std::string len_str = to_string(keylen[j]); + + DH_PrivateKey key("modp/ietf/" + len_str); + + bench_kas(get_pk_kas(key, "Raw"), "DH-" + len_str, seconds, html); + } } if(algo == "All" || algo == "ELG" || algo == "ElGamal") { - #define DO_ELG(NUM_STR, GROUP) \ - { \ - ElGamal_PrivateKey elg(DL_Group(GROUP)); \ - bench_elg(elg, NUM_STR, seconds, html); \ + const u32bit keylen[] = { 768, 1024, 1536, 2048, 3072, 4096, 0 }; + + for(size_t j = 0; keylen[j]; j++) + { + const std::string len_str = to_string(keylen[j]); + + ElGamal_PrivateKey key("modp/ietf/" + len_str); + + bench_enc(get_pk_encryptor(key, "Raw"), + "ELG-" + len_str, seconds, html); + + bench_dec(get_pk_encryptor(key, "Raw"), + get_pk_decryptor(key, "Raw"), + "ELG-" + len_str, seconds, html); } - DO_ELG("768", "modp/ietf/768"); - DO_ELG("1024", "modp/ietf/1024"); - DO_ELG("1536", "modp/ietf/1536"); - DO_ELG("2048", "modp/ietf/2048"); - DO_ELG("3072", "modp/ietf/3072"); - DO_ELG("4096", "modp/ietf/4096"); - #undef DO_ELG } if(algo == "All" || algo == "NR") { - #define DO_NR(NUM_STR, GROUP) \ - { \ - NR_PrivateKey nr(DL_Group(GROUP)); \ - bench_nr(nr, NUM_STR, seconds, html); \ - } + const u32bit keylen[] = { 512, 768, 1024, 0 }; - DO_NR("512", "dsa/jce/512"); - DO_NR("768", "dsa/jce/768"); - DO_NR("1024", "dsa/jce/1024"); - #undef DO_NR + for(size_t j = 0; keylen[j]; j++) + { + const std::string len_str = to_string(keylen[j]); + + NR_PrivateKey key("dsa/jce/" + len_str); + + bench_ver(get_pk_signer(key, "EMSA1(SHA-1)"), + get_pk_verifier(key, "EMSA1(SHA-1)"), + "NR-" + len_str, seconds, html); + + bench_sig(get_pk_signer(key, "EMSA1(SHA-1)"), + "NR-" + len_str, seconds, html); + } } if(algo == "All" || algo == "RW") { - #define DO_RW(NUM_STR, FILENAME) \ - { \ - RW_PrivateKey rw = load_rw_key(FILENAME); \ - bench_rw(rw, NUM_STR, seconds, html); \ - } + const u32bit keylen[] = { 512, 1024, 0 }; - DO_RW("512", "checks/keys/rw512.key") - DO_RW("1024", "checks/keys/rw1024.key") - #undef DO_RW - } - } - catch(Botan::Exception& e) - { - std::cout << "Exception caught: " << e.what() << std::endl; - return; - } - catch(std::exception& e) - { - std::cout << "Standard library exception caught: " - << e.what() << std::endl; - return; - } - catch(...) - { - std::cout << "Unknown exception caught." << std::endl; - return; - } + for(size_t j = 0; keylen[j]; j++) + { + const std::string len_str = to_string(keylen[j]); + const std::string file = "checks/keys/rw" + len_str + ".pem"; + + RW_PrivateKey* key = dynamic_cast(PKCS8::load_key(file)); + + bench_ver(get_pk_signer(*key, "EMSA2(SHA-1)"), + get_pk_verifier(*key, "EMSA2(SHA-1)"), + "RW-" + len_str, seconds, html); + bench_sig(get_pk_signer(*key, "EMSA2(SHA-1)"), + "RW-" + len_str, seconds, html); + delete key; + } + } } void print_result(bool html, u32bit runs, u64bit clocks_used, @@ -424,35 +365,3 @@ void bench_kas(PK_Key_Agreement* kas, const std::string& algo_name, print_result(html, runs, clocks_used, algo_name, "key agreement"); } - -/************************************************* -* Key loading procedures * -*************************************************/ -RSA_PrivateKey* load_rsa_key(const std::string& file) - { - Private_Key* key = PKCS8::load_key(file); - - RSA_PrivateKey* rsakey = dynamic_cast(key); - - if(rsakey == 0) - throw Invalid_Argument(file + " doesn't have an RSA key in it!"); - - return rsakey; - } - -RW_PrivateKey load_rw_key(const std::string& file) - { - std::ifstream keyfile(file.c_str()); - if(!keyfile) - throw Exception("Couldn't open the RW key file " + file); - - std::string e, p, q; - - std::getline(keyfile, e); - std::getline(keyfile, p); - std::getline(keyfile, q); - - RW_PrivateKey key(to_bigint(p), to_bigint(q), to_bigint(e)); - - return key; - } -- cgit v1.2.3