@@ -273,7 +273,7 @@ void BenchMarkAgreement(const char *name, AuthenticatedKeyAgreementDomain &d, do
273273template <class SCHEME >
274274void BenchMarkCrypto (const char *filename, const char *name, double timeTotal)
275275{
276- FileSource f (filename, true , new HexDecoder);
276+ FileSource f (DataDir ( filename). c_str () , true , new HexDecoder);
277277 typename SCHEME::Decryptor priv (f);
278278 typename SCHEME::Encryptor pub (priv);
279279 BenchMarkEncryption (name, pub, timeTotal);
@@ -283,7 +283,7 @@ void BenchMarkCrypto(const char *filename, const char *name, double timeTotal)
283283template <class SCHEME >
284284void BenchMarkSignature (const char *filename, const char *name, double timeTotal)
285285{
286- FileSource f (filename, true , new HexDecoder);
286+ FileSource f (DataDir ( filename). c_str () , true , new HexDecoder);
287287 typename SCHEME::Signer priv (f);
288288 typename SCHEME::Verifier pub (priv);
289289 BenchMarkSigning (name, priv, timeTotal);
@@ -293,7 +293,7 @@ void BenchMarkSignature(const char *filename, const char *name, double timeTotal
293293template <class D >
294294void BenchMarkKeyAgreement (const char *filename, const char *name, double timeTotal)
295295{
296- FileSource f (filename, true , new HexDecoder);
296+ FileSource f (DataDir ( filename). c_str () , true , new HexDecoder);
297297 D d (f);
298298 BenchMarkKeyGen (name, d, timeTotal);
299299 BenchMarkAgreement (name, d, timeTotal);
@@ -318,63 +318,63 @@ void Benchmark3(double t, double hertz)
318318
319319 std::cout << " \n <TBODY style=\" background: white;\" >" ;
320320 {
321- BenchMarkCrypto<RSAES<OAEP<SHA1> > >(CRYPTOPP_DATA_DIR " TestData/rsa1024.dat" , " RSA 1024" , t);
322- BenchMarkCrypto<LUCES<OAEP<SHA1> > >(CRYPTOPP_DATA_DIR " TestData/luc1024.dat" , " LUC 1024" , t);
323- BenchMarkCrypto<DLIES<> >(CRYPTOPP_DATA_DIR " TestData/dlie1024.dat" , " DLIES 1024" , t);
324- BenchMarkCrypto<LUC_IES<> >(CRYPTOPP_DATA_DIR " TestData/lucc512.dat" , " LUCELG 512" , t);
321+ BenchMarkCrypto<RSAES<OAEP<SHA1> > >(" TestData/rsa1024.dat" , " RSA 1024" , t);
322+ BenchMarkCrypto<LUCES<OAEP<SHA1> > >(" TestData/luc1024.dat" , " LUC 1024" , t);
323+ BenchMarkCrypto<DLIES<> >(" TestData/dlie1024.dat" , " DLIES 1024" , t);
324+ BenchMarkCrypto<LUC_IES<> >(" TestData/lucc512.dat" , " LUCELG 512" , t);
325325 }
326326
327327 std::cout << " \n <TBODY style=\" background: yellow;\" >" ;
328328 {
329- BenchMarkCrypto<RSAES<OAEP<SHA1> > >(CRYPTOPP_DATA_DIR " TestData/rsa2048.dat" , " RSA 2048" , t);
330- BenchMarkCrypto<LUCES<OAEP<SHA1> > >(CRYPTOPP_DATA_DIR " TestData/luc2048.dat" , " LUC 2048" , t);
331- BenchMarkCrypto<DLIES<> >(CRYPTOPP_DATA_DIR " TestData/dlie2048.dat" , " DLIES 2048" , t);
332- BenchMarkCrypto<LUC_IES<> >(CRYPTOPP_DATA_DIR " TestData/lucc1024.dat" , " LUCELG 1024" , t);
329+ BenchMarkCrypto<RSAES<OAEP<SHA1> > >(" TestData/rsa2048.dat" , " RSA 2048" , t);
330+ BenchMarkCrypto<LUCES<OAEP<SHA1> > >(" TestData/luc2048.dat" , " LUC 2048" , t);
331+ BenchMarkCrypto<DLIES<> >(" TestData/dlie2048.dat" , " DLIES 2048" , t);
332+ BenchMarkCrypto<LUC_IES<> >(" TestData/lucc1024.dat" , " LUCELG 1024" , t);
333333 }
334334
335335 std::cout << " \n <TBODY style=\" background: white;\" >" ;
336336 {
337- BenchMarkSignature<RSASS<PSSR, SHA1> >(CRYPTOPP_DATA_DIR " TestData/rsa1024.dat" , " RSA 1024" , t);
338- BenchMarkSignature<RWSS<PSSR, SHA1> >(CRYPTOPP_DATA_DIR " TestData/rw1024.dat" , " RW 1024" , t);
339- BenchMarkSignature<LUCSS<PSSR, SHA1> >(CRYPTOPP_DATA_DIR " TestData/luc1024.dat" , " LUC 1024" , t);
340- BenchMarkSignature<NR<SHA1> >(CRYPTOPP_DATA_DIR " TestData/nr1024.dat" , " NR 1024" , t);
341- BenchMarkSignature<DSA>(CRYPTOPP_DATA_DIR " TestData/dsa1024.dat" , " DSA 1024" , t);
342- BenchMarkSignature<LUC_HMP<SHA1> >(CRYPTOPP_DATA_DIR " TestData/lucs512.dat" , " LUC-HMP 512" , t);
343- BenchMarkSignature<ESIGN<SHA1> >(CRYPTOPP_DATA_DIR " TestData/esig1023.dat" , " ESIGN 1023" , t);
344- BenchMarkSignature<ESIGN<SHA1> >(CRYPTOPP_DATA_DIR " TestData/esig1536.dat" , " ESIGN 1536" , t);
337+ BenchMarkSignature<RSASS<PSSR, SHA1> >(" TestData/rsa1024.dat" , " RSA 1024" , t);
338+ BenchMarkSignature<RWSS<PSSR, SHA1> >(" TestData/rw1024.dat" , " RW 1024" , t);
339+ BenchMarkSignature<LUCSS<PSSR, SHA1> >(" TestData/luc1024.dat" , " LUC 1024" , t);
340+ BenchMarkSignature<NR<SHA1> >(" TestData/nr1024.dat" , " NR 1024" , t);
341+ BenchMarkSignature<DSA>(" TestData/dsa1024.dat" , " DSA 1024" , t);
342+ BenchMarkSignature<LUC_HMP<SHA1> >(" TestData/lucs512.dat" , " LUC-HMP 512" , t);
343+ BenchMarkSignature<ESIGN<SHA1> >(" TestData/esig1023.dat" , " ESIGN 1023" , t);
344+ BenchMarkSignature<ESIGN<SHA1> >(" TestData/esig1536.dat" , " ESIGN 1536" , t);
345345 }
346346
347347 std::cout << " \n <TBODY style=\" background: yellow;\" >" ;
348348 {
349- BenchMarkSignature<RSASS<PSSR, SHA1> >(CRYPTOPP_DATA_DIR " TestData/rsa2048.dat" , " RSA 2048" , t);
350- BenchMarkSignature<RWSS<PSSR, SHA1> >(CRYPTOPP_DATA_DIR " TestData/rw2048.dat" , " RW 2048" , t);
351- BenchMarkSignature<LUCSS<PSSR, SHA1> >(CRYPTOPP_DATA_DIR " TestData/luc2048.dat" , " LUC 2048" , t);
352- BenchMarkSignature<NR<SHA1> >(CRYPTOPP_DATA_DIR " TestData/nr2048.dat" , " NR 2048" , t);
353- BenchMarkSignature<LUC_HMP<SHA1> >(CRYPTOPP_DATA_DIR " TestData/lucs1024.dat" , " LUC-HMP 1024" , t);
354- BenchMarkSignature<ESIGN<SHA1> >(CRYPTOPP_DATA_DIR " TestData/esig2046.dat" , " ESIGN 2046" , t);
349+ BenchMarkSignature<RSASS<PSSR, SHA1> >(" TestData/rsa2048.dat" , " RSA 2048" , t);
350+ BenchMarkSignature<RWSS<PSSR, SHA1> >(" TestData/rw2048.dat" , " RW 2048" , t);
351+ BenchMarkSignature<LUCSS<PSSR, SHA1> >(" TestData/luc2048.dat" , " LUC 2048" , t);
352+ BenchMarkSignature<NR<SHA1> >(" TestData/nr2048.dat" , " NR 2048" , t);
353+ BenchMarkSignature<LUC_HMP<SHA1> >(" TestData/lucs1024.dat" , " LUC-HMP 1024" , t);
354+ BenchMarkSignature<ESIGN<SHA1> >(" TestData/esig2046.dat" , " ESIGN 2046" , t);
355355 }
356356
357357 std::cout << " \n <TBODY style=\" background: white;\" >" ;
358358 {
359- BenchMarkKeyAgreement<XTR_DH>(CRYPTOPP_DATA_DIR " TestData/xtrdh171.dat" , " XTR-DH 171" , t);
360- BenchMarkKeyAgreement<XTR_DH>(CRYPTOPP_DATA_DIR " TestData/xtrdh342.dat" , " XTR-DH 342" , t);
361- BenchMarkKeyAgreement<DH>(CRYPTOPP_DATA_DIR " TestData/dh1024.dat" , " DH 1024" , t);
362- BenchMarkKeyAgreement<DH>(CRYPTOPP_DATA_DIR " TestData/dh2048.dat" , " DH 2048" , t);
363- BenchMarkKeyAgreement<LUC_DH>(CRYPTOPP_DATA_DIR " TestData/lucd512.dat" , " LUCDIF 512" , t);
364- BenchMarkKeyAgreement<LUC_DH>(CRYPTOPP_DATA_DIR " TestData/lucd1024.dat" , " LUCDIF 1024" , t);
365- BenchMarkKeyAgreement<MQV>(CRYPTOPP_DATA_DIR " TestData/mqv1024.dat" , " MQV 1024" , t);
366- BenchMarkKeyAgreement<MQV>(CRYPTOPP_DATA_DIR " TestData/mqv2048.dat" , " MQV 2048" , t);
359+ BenchMarkKeyAgreement<XTR_DH>(" TestData/xtrdh171.dat" , " XTR-DH 171" , t);
360+ BenchMarkKeyAgreement<XTR_DH>(" TestData/xtrdh342.dat" , " XTR-DH 342" , t);
361+ BenchMarkKeyAgreement<DH>(" TestData/dh1024.dat" , " DH 1024" , t);
362+ BenchMarkKeyAgreement<DH>(" TestData/dh2048.dat" , " DH 2048" , t);
363+ BenchMarkKeyAgreement<LUC_DH>(" TestData/lucd512.dat" , " LUCDIF 512" , t);
364+ BenchMarkKeyAgreement<LUC_DH>(" TestData/lucd1024.dat" , " LUCDIF 1024" , t);
365+ BenchMarkKeyAgreement<MQV>(" TestData/mqv1024.dat" , " MQV 1024" , t);
366+ BenchMarkKeyAgreement<MQV>(" TestData/mqv2048.dat" , " MQV 2048" , t);
367367
368368#if 0
369- BenchMarkKeyAgreement<ECHMQV160>(CRYPTOPP_DATA_DIR "TestData/hmqv160.dat", "HMQV P-160", t);
370- BenchMarkKeyAgreement<ECHMQV256>(CRYPTOPP_DATA_DIR "TestData/hmqv256.dat", "HMQV P-256", t);
371- BenchMarkKeyAgreement<ECHMQV384>(CRYPTOPP_DATA_DIR "TestData/hmqv384.dat", "HMQV P-384", t);
372- BenchMarkKeyAgreement<ECHMQV512>(CRYPTOPP_DATA_DIR "TestData/hmqv512.dat", "HMQV P-512", t);
373-
374- BenchMarkKeyAgreement<ECFHMQV160>(CRYPTOPP_DATA_DIR "TestData/fhmqv160.dat", "FHMQV P-160", t);
375- BenchMarkKeyAgreement<ECFHMQV256>(CRYPTOPP_DATA_DIR "TestData/fhmqv256.dat", "FHMQV P-256", t);
376- BenchMarkKeyAgreement<ECFHMQV384>(CRYPTOPP_DATA_DIR "TestData/fhmqv384.dat", "FHMQV P-384", t);
377- BenchMarkKeyAgreement<ECFHMQV512>(CRYPTOPP_DATA_DIR "TestData/fhmqv512.dat", "FHMQV P-512", t);
369+ BenchMarkKeyAgreement<ECHMQV160>("TestData/hmqv160.dat", "HMQV P-160", t);
370+ BenchMarkKeyAgreement<ECHMQV256>("TestData/hmqv256.dat", "HMQV P-256", t);
371+ BenchMarkKeyAgreement<ECHMQV384>("TestData/hmqv384.dat", "HMQV P-384", t);
372+ BenchMarkKeyAgreement<ECHMQV512>("TestData/hmqv512.dat", "HMQV P-512", t);
373+
374+ BenchMarkKeyAgreement<ECFHMQV160>("TestData/fhmqv160.dat", "FHMQV P-160", t);
375+ BenchMarkKeyAgreement<ECFHMQV256>("TestData/fhmqv256.dat", "FHMQV P-256", t);
376+ BenchMarkKeyAgreement<ECFHMQV384>("TestData/fhmqv384.dat", "FHMQV P-384", t);
377+ BenchMarkKeyAgreement<ECFHMQV512>("TestData/fhmqv512.dat", "FHMQV P-512", t);
378378#endif
379379 }
380380
0 commit comments