Topic: Build config for high performance aes cbc decryption in armv7 device

Hello,

I am working with aes cbc decryption on armv7 device and I want high performance decryption. I am currently using a particular configuration which is working on armv7 devices but I want best decryption performance possible using wolfcrypt on armv7 devices. What build configurations to be used while building wolfcrypt.

Currently I am using android ndk tool chain for building my wolfcrypt library.

  export NDK=/home/android-ndk-r23b
  export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
  export TARGET=armv7a-linux-androideabi
  export API=31
  export AR=$TOOLCHAIN/bin/llvm-ar
  export CC=$TOOLCHAIN/bin/$TARGET$API-clang
  export AS=$CC
  export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
  export LD=$TOOLCHAIN/bin/ld
  export RANLIB=$TOOLCHAIN/bin/llvm-ranlib
  export STRIP=$TOOLCHAIN/bin/llvm-strip

./configure --host $TARGET \
                --enable-keygen \
                --disable-crypttests --enable-fast-rsa \
                --disable-aesgcm --disable-dh --disable-des3 \
                --enable-cryptonly \
                --disable-examples --enable-debug

Share

Re: Build config for high performance aes cbc decryption in armv7 device

Hi abdulwazeed1,

We do not currently support any optimizations for ARMv7. Would you like to open a feature request? Please send an email to support@wolfssl.com

Thanks,
Eric @ wolfSSL Support

Re: Build config for high performance aes cbc decryption in armv7 device

My colleague reminded me that this should be clarified!

The library does not support optimization for AES CBC… We do support optimization for all asymmetric math operations.

Re: Build config for high performance aes cbc decryption in armv7 device

embhorn wrote:

Hi abdulwazeed1,

We do not currently support any optimizations for ARMv7. Would you like to open a feature request? Please send an email to support@wolfssl.com

Thanks,
Eric @ wolfSSL Support



Hi,
Thank you for responding, does that mean its not possible to get hardware level acceleration in armv7 devices for aes cbc decryption using wolfcrypt.

Also can you suggest any tips, best practices or parallelization techniques to improve decryption performance with the current wolfcrypt release (5.2.0). is there any way I can improve performance, at software level.

Currently my application is showing 25-30% cpu usage without decryption and with decryption it shows 60-70% cpu usage, is this normal?

Share

Re: Build config for high performance aes cbc decryption in armv7 device

It is possible to optimize, but we have not yet implemented the needed support on this platform. You are welcome to formally request this feature.

Also can you suggest any tips, best practices or parallelization techniques to improve decryption performance with the current wolfcrypt release (5.2.0). is there any way I can improve performance, at software level.

We have several math library optimizations that you can try. Here is an example config:
https://github.com/wolfSSL/wolfssl/blob … template.h
I recommend testing with WOLFSSL_SP_MATH and WOLFSSL_SP_MATH_ALL

]Currently my application is showing 25-30% cpu usage without decryption and with decryption it shows 60-70% cpu usage, is this normal?

Without HW acceleration enabled, this sounds plausible.