Re: [cryptopp-users] When using ECIES to decrypt, cryptopp takes longer to calculate than Bouncy Castle
make static dynamic make install PREFIX=output 在 2020年7月21日星期二 UTC+8下午9:25:20,Jeffrey Walton写道: > > On Tue, Jul 21, 2020 at 9:11 AM 苇杭 > > wrote: > > > > g++ -I../cryptopp/cryptopp/output/include -O2 -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a > > payload ecies Used Time:9229.839844 ms > > > > g++ -I../cryptopp/cryptopp/output/include -O3 -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a > > payload ecies Used Time:9365.958984 ms > > > > g++ -I../cryptopp/cryptopp/output/include -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a > > payload ecies Used Time:9894.942383 ms > > How did you build the library? > > Jeff > > > 在 2020年7月21日星期二 UTC+8下午12:50:00,Jeffrey Walton写道: > >> > >> On Monday, July 20, 2020 at 10:14:45 PM UTC-4, 苇杭 wrote: > >>> > >>> g++ -I../cryptopp/cryptopp/output/include -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a > >> > >> Use -O2 or -O3. > >> > -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/c81712ee-1628-4f3e-8f10-62a77c9bdf5eo%40googlegroups.com.
Re: [cryptopp-users] When using ECIES to decrypt, cryptopp takes longer to calculate than Bouncy Castle
On Tue, Jul 21, 2020 at 9:11 AM 苇杭 wrote: > > g++ -I../cryptopp/cryptopp/output/include -O2 -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a > payload ecies Used Time:9229.839844 ms > > g++ -I../cryptopp/cryptopp/output/include -O3 -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a > payload ecies Used Time:9365.958984 ms > > g++ -I../cryptopp/cryptopp/output/include -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a > payload ecies Used Time:9894.942383 ms How did you build the library? Jeff > 在 2020年7月21日星期二 UTC+8下午12:50:00,Jeffrey Walton写道: >> >> On Monday, July 20, 2020 at 10:14:45 PM UTC-4, 苇杭 wrote: >>> >>> g++ -I../cryptopp/cryptopp/output/include -o test main.cpp >>> ../cryptopp/cryptopp/output/lib/libcryptopp.a >> >> Use -O2 or -O3. >> -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8mk5VqLEqpc28sC-a0dYMzsT3NQuNh5TcULPDKoEHVMMg%40mail.gmail.com.
Re: [cryptopp-users] When using ECIES to decrypt, cryptopp takes longer to calculate than Bouncy Castle
g++ -I../cryptopp/cryptopp/output/include -O2 -o test main.cpp ../cryptopp/cryptopp/output/lib/libcryptopp.a payload ecies Used Time:9229.839844 ms g++ -I../cryptopp/cryptopp/output/include -O3 -o test main.cpp ../cryptopp/cryptopp/output/lib/libcryptopp.a payload ecies Used Time:9365.958984 ms g++ -I../cryptopp/cryptopp/output/include -o test main.cpp ../cryptopp/cryptopp/output/lib/libcryptopp.a payload ecies Used Time:9894.942383 ms 在 2020年7月21日星期二 UTC+8下午12:50:00,Jeffrey Walton写道: > > > > On Monday, July 20, 2020 at 10:14:45 PM UTC-4, 苇杭 wrote: >> >> g++ -I../cryptopp/cryptopp/output/include -o test main.cpp >> ../cryptopp/cryptopp/output/lib/libcryptopp.a > > > Use -O2 or -O3. > > Jeff > -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/e92ae5da-3a14-4ba2-918f-05bad684f055o%40googlegroups.com.
Re: [cryptopp-users] When using ECIES to decrypt, cryptopp takes longer to calculate than Bouncy Castle
On Monday, July 20, 2020 at 10:14:45 PM UTC-4, 苇杭 wrote: > > g++ -I../cryptopp/cryptopp/output/include -o test main.cpp > ../cryptopp/cryptopp/output/lib/libcryptopp.a Use -O2 or -O3. Jeff -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/7d71bbe0-f1c0-46b2-ab01-28e9b6f65b9do%40googlegroups.com.
Re: [cryptopp-users] When using ECIES to decrypt, cryptopp takes longer to calculate than Bouncy Castle
g++ -I../cryptopp/cryptopp/output/include -o test main.cpp ../cryptopp/cryptopp/output/lib/libcryptopp.a string sPublicKey = "3059301306072A8648CE3D020106082A8648CE3D03010703420004BD8E4960D48F8D0AE1FEEFB69F4E3ED1BAC125F88968C25BCDB19CFEF1A4423EFECDCF348EE59C0EF2AF01DF994951C96A3FBDBF26EC58CC90B003AF7D1522E9"; string sPrivateKey = "3041020100301306072A8648CE3D020106082A8648CE3D030107042730250201010420C9F3A236525B737E0FA48C8375D6379FCF0A26D367EEC5DFBBF330ADE501D0F6"; std::string cipherText; StringSource pubString(sPublicKey, true, new HexDecoder); string msgToEncrypt = "tests"; ECIES::Encryptor encryptor(pubString); size_t uiCipherTextSize = encryptor.CiphertextLength(msgToEncrypt.size()); cipherText.resize(uiCipherTextSize); RandomPool rnds; encryptor.Encrypt(rnds, (byte*)msgToEncrypt.c_str(), msgToEncrypt.size(), (byte*)cipherText.data()); std::string decryptText; StringSource priString(sPrivateKey, true, new HexDecoder); ECIES::Decryptor decryptor(priString); struct timeval tpstart,tpend; float timeuse = 0; int count = 1; gettimeofday(,NULL); while(count--){ size_t uiDecryptTextSize = decryptor.MaxPlaintextLength(cipherText.size()); decryptText.resize(uiDecryptTextSize); RandomPool rndss; decryptor.Decrypt(rndss, (byte*)cipherText.c_str(), cipherText.size(), (byte*)decryptText.data()); } gettimeofday(,NULL); timeuse=100*(tpend.tv_sec-tpstart.tv_sec)+tpend.tv_usec-tpstart.tv_usec; printf("ecies used:%f ms\n", timeuse/1000); 在 2020年7月21日星期二 UTC+8上午1:00:36,Jeffrey Walton写道: > > On Sun, Jul 19, 2020 at 10:27 PM 苇杭 > > wrote: > > > > I tested ecies decrypt api 1 times, Cryptopp(c++) takes about 10s, > Bouncy Castle(java) takes about 3s, eciespy(python) takes about 3s > > I tested RSA decrypt api 1 times, Cryptopp takes about 10s, Bouncy > Castle takes about 10s > > > > Does the decrypt api of ecies can be optimized? > > Please show your code and how you compiled it. > -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/a9b66591-7a09-4945-9842-4e6e1df7a471o%40googlegroups.com.
Re: [cryptopp-users] When using ECIES to decrypt, cryptopp takes longer to calculate than Bouncy Castle
On Sun, Jul 19, 2020 at 10:27 PM 苇杭 wrote: > > I tested ecies decrypt api 1 times, Cryptopp(c++) takes about 10s, Bouncy > Castle(java) takes about 3s, eciespy(python) takes about 3s > I tested RSA decrypt api 1 times, Cryptopp takes about 10s, Bouncy Castle > takes about 10s > > Does the decrypt api of ecies can be optimized? Please show your code and how you compiled it. -- You received this message because you are subscribed to "Crypto++ Users". More information about Crypto++ and this group is available at http://www.cryptopp.com and http://groups.google.com/forum/#!forum/cryptopp-users. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/CAH8yC8kj3088OYyhb-AjG%2B8BaBpLddBnanUEpUfR3BN9OvgkVw%40mail.gmail.com.