mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2025-02-17 03:48:38 +00:00
Stub-out HMQV and FHMQV benchmarks
This commit is contained in:
parent
5aca5fb96e
commit
a97e61c1dc
@ -46,7 +46,7 @@ void OutputResultBytes(const char *name, double length, double timeTaken)
|
||||
{
|
||||
// Coverity finding, also see http://stackoverflow.com/a/34509163/608639.
|
||||
StreamState ss(cout);
|
||||
|
||||
|
||||
// Coverity finding
|
||||
if (length < 0.0000000001f) length = 0.000001f;
|
||||
if (timeTaken < 0.0000000001f) timeTaken = 0.000001f;
|
||||
@ -67,7 +67,7 @@ void OutputResultKeying(double iterations, double timeTaken)
|
||||
{
|
||||
// Coverity finding, also see http://stackoverflow.com/a/34509163/608639.
|
||||
StreamState ss(cout);
|
||||
|
||||
|
||||
// Coverity finding
|
||||
if (iterations < 0.0000000001f) iterations = 0.000001f;
|
||||
if (timeTaken < 0.0000000001f) timeTaken = 0.000001f;
|
||||
@ -81,7 +81,7 @@ void OutputResultOperations(const char *name, const char *operation, bool pc, un
|
||||
{
|
||||
// Coverity finding, also see http://stackoverflow.com/a/34509163/608639.
|
||||
StreamState ss(cout);
|
||||
|
||||
|
||||
// Coverity finding
|
||||
if (!iterations) iterations++;
|
||||
if (timeTaken < 0.0000000001f) timeTaken = 0.000001f;
|
||||
@ -215,7 +215,7 @@ void BenchMarkByName2(const char *factoryName, size_t keyLength = 0, const char
|
||||
|
||||
std::string name(factoryName ? factoryName : "");
|
||||
member_ptr<T_FactoryOutput> obj(ObjectFactoryRegistry<T_FactoryOutput>::Registry().CreateObject(name.c_str()));
|
||||
|
||||
|
||||
if (!keyLength)
|
||||
keyLength = obj->DefaultKeyLength();
|
||||
|
||||
|
14
bench2.cpp
14
bench2.cpp
@ -21,6 +21,8 @@
|
||||
#include "asn.h"
|
||||
#include "dh.h"
|
||||
#include "mqv.h"
|
||||
#include "hmqv.h"
|
||||
#include "fhmqv.h"
|
||||
#include "xtrcrypt.h"
|
||||
#include "esign.h"
|
||||
#include "pssr.h"
|
||||
@ -296,6 +298,18 @@ void BenchmarkAll2(double t, double hertz)
|
||||
BenchMarkKeyAgreement<MQV>(CRYPTOPP_DATA_DIR "TestData/mqv1024.dat", "MQV 1024", t);
|
||||
BenchMarkKeyAgreement<MQV>(CRYPTOPP_DATA_DIR "TestData/mqv2048.dat", "MQV 2048", t);
|
||||
|
||||
#if 0
|
||||
BenchMarkKeyAgreement<HMQV160>(CRYPTOPP_DATA_DIR "TestData/hmqv160.dat", "HMQV P-160", t);
|
||||
BenchMarkKeyAgreement<HMQV256>(CRYPTOPP_DATA_DIR "TestData/hmqv256.dat", "HMQV P-256", t);
|
||||
BenchMarkKeyAgreement<HMQV384>(CRYPTOPP_DATA_DIR "TestData/hmqv384.dat", "HMQV P-384", t);
|
||||
BenchMarkKeyAgreement<HMQV512>(CRYPTOPP_DATA_DIR "TestData/hmqv512.dat", "HMQV P-512", t);
|
||||
|
||||
BenchMarkKeyAgreement<FHMQV160>(CRYPTOPP_DATA_DIR "TestData/fhmqv160.dat", "FHMQV P-160", t);
|
||||
BenchMarkKeyAgreement<FHMQV256>(CRYPTOPP_DATA_DIR "TestData/fhmqv256.dat", "FHMQV P-256", t);
|
||||
BenchMarkKeyAgreement<FHMQV384>(CRYPTOPP_DATA_DIR "TestData/fhmqv384.dat", "FHMQV P-384", t);
|
||||
BenchMarkKeyAgreement<FHMQV512>(CRYPTOPP_DATA_DIR "TestData/fhmqv512.dat", "FHMQV P-512", t);
|
||||
#endif
|
||||
|
||||
cout << "\n<TBODY style=\"background: white\">";
|
||||
{
|
||||
ECIES<ECP>::Decryptor cpriv(GlobalRNG(), ASN1::secp256k1());
|
||||
|
Loading…
x
Reference in New Issue
Block a user