BTW, Are there any flags I should be setting when compiling the .a library into my .exe to set the ARM acceleration ?
This is the makefile output: *aarch64-poky-linux-g++ -mcpu=cortex-a53 -march=armv8-a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/opt/fsl-imx-xwayland/5.10-hardknott/sysroots/cortexa53-crypto-poky-linux -o cryptest.exe -O2 -pipe -g -feliminate-unused-debug-types -DCRYPTOPP_ARM_ACLE_AVAILABLE=0 -DCRYPTOPP_DISABLE_ASM -fPIC -pthread -pipe adhoc.o test.o bench1.o bench2.o bench3.o datatest.o dlltest.o fipsalgt.o validat0.o validat1.o validat2.o validat3.o validat4.o validat5.o validat6.o validat7.o validat8.o validat9.o validat10.o regtest1.o regtest2.o regtest3.o regtest4.o ./libcryptopp.a -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now * should I be setting for example: * -mcpu=cortex-a53 -march=armv8-a+crc+crypto* I use the following for compiling the files: "-g", "-c", "-pthread", //Add this ??? "-mcpu=cortex-a53", "-march=armv8-a+crc+crypto" // Right now I use the following for building the executable: "-g", "-pthread", //Add this ??? "-mcpu=cortex-a53", "-march=armv8-a+crc+crypto" // "-L${workspaceFolder}/external-libs/lib/", "-l:libcryptopp.a" On Friday, May 12, 2023 at 11:46:08 AM UTC-4 Dwight Kulkarni wrote: > Hi Jeff, > > The time is taken up all on the one line: > > > StringSource ss(message, true, new StreamTransformationFilter(e, new > StringSink(cipher))); > > > *Do you know what might be the difference versus the .exe test ? > <TR><TD>AES/CFB (128-bit key)<TD>ARMv8<TD>344<TD>4.99<TD>1.135<TD>2044* > > > > Encrypted 1at: 05/12/2023 15:40:55.588 > Encrypted 2at: 05/12/2023 15:40:55.588 > Encrypted 3at: 05/12/2023 15:40:55.588 > returning cipher > Encrypted 4at: 05/12/2023 15:40:56.599 > Encrypted at: 05/12/2023 15:40:56.600 > > > std::string encrypt_aes(std::string message, SecByteBlock key, > SecByteBlock iv) { > try { > cout <<" in encrypt aes " <<endl; > cout << " Encrypted 1at: " << get_curr_datetime_str() << endl; > AlgorithmParameters params = MakeParameters(Name::FeedbackSize(), 1 > /*8-bits*/) > (Name::IV(), ConstByteArrayParameter(iv)); > cout << " Encrypted 2at: " << get_curr_datetime_str() << endl; > CFB_Mode<AES>::Encryption e; > std::string cipher; > cipher.reserve(message.size()+16); > e.SetKey(key, key.size(), params); > cout << " Encrypted 3at: " << get_curr_datetime_str() << endl; > StringSource ss(message, true, new StreamTransformationFilter(e, new > StringSink(cipher))); > cout << " returning cipher " << endl; > cout << " Encrypted 4at: " << get_curr_datetime_str() << endl; > return cipher; > } > catch (CryptoPP::Exception e) { > std::cerr << e.what() << std::endl; > return ""; > } > } > On Friday, May 12, 2023 at 11:17:32 AM UTC-4 Jeffrey Walton wrote: > >> On Fri, May 12, 2023 at 10:48 AM Dwight Kulkarni <dwi...@realtime-7.com> >> wrote: >> > >> > The new library is much faster, but I am still not getting that speed >> in the code. 1 second to encrypt 5 mb versus 3 seconds before. >> > >> > I added the .reserve(...) code also. >> >> Well, you should profile your code to find the bottlenecks. >> >> Jeff >> > -- 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/f83b8164-8d60-4bd3-aa68-ba350cbda0e3n%40googlegroups.com.