Topic: STM32L4a6 Brainpool Curve

Hi,
I am using the wolfcrypt benchmark to compare the performance of secp256r1, curve25519 and brainpool. Just for speed, not for size.

I am using the wolfSSL Cube Configuration file.
I obtain the fastest operations for secp256r1 with WOLF_CONF_MATH 4, ie. with WOLFSSL_SP and WOLFSSL_SP_ARM_CORTEX_M_ASM defined. With this configuration the benchmark fails for the brainpool curve, with  Error Code -234 Key size error.
The fastest configuration combination for brainpool I tested was WOLF_CONF_MATH 5, ie. with WOLFSSL_SP and WOLFSSL_SP_MATH_ALL defined. But brainpool is in this configuration more than 10 times slower, than secp256r1 in the fast configuration with  WOLFSSL_SP and WOLFSSL_SP_ARM_CORTEX_M_ASM defined.

Am I configuring something wrong or is this the expected behavior and brainpool curves do not work with WOLFSSL_SP_ARM_CORTEX_M_ASM?


Cheers,
Jakob

Share

Re: STM32L4a6 Brainpool Curve

Hi Jakob,

My name is Anthony and I am a member of the wolfSSL team. As of yet we do not have support for assembly optimizations foir brainpool curves so yes, you are seeing expected behaviour.

That said, can you let us know a bit more about yourself and your project?  What are your goals?  Are you interested in seeing Brainpool assembly optimizations?

If you desire privacy, you can send this information to our confidential support address:  support@wolfssl.com.

Warm regards, Anthony

Share

Re: STM32L4a6 Brainpool Curve

Hi,

To be a bit more specific, make sure you have the following macros defined:

WOLFSSL_CUSTOM_CURVES
HAVE_ECC_BRAINPOOL

Warm regards, Anthony

Share

Re: STM32L4a6 Brainpool Curve

Thanks for the reply.

In my case it is for a study project.
So my goal was just a comparison on the target platform.

The BSI (Federal office for information security) in Germany recommends Brainpool Curves for asymmetric crypto. Thus an optimized Brainpool implementation might be interesting for new projects that need to comply with BSI recommendations and seek comparable speeds as with secp256r1 or curve25519/ed25519.

Kind regards
Jakob

Share