Topic: ECDSA secp256r1 Verification on 16-bit Microcontroller

Hello,
I'm evaluating the use of wolfCrypt for ECDSA signature verification using the secp256r1 curve on a 16-bit microcontroller. My goal is to achieve this using only configuration options, without implementing custom math routines.
I've selected the Integer Heap Math backend (USE_INTEGER_HEAP_MATH), as it appears to be the most compatible option for my platform. However, I'm encountering issues with the optimized ECC verification helper function ecc_verify_hash_sp, which is automatically enabled via HAVE_ECC_VERIFY_HELPER when no hardware ECC macros are defined.
This function seems to lack an implementation suitable for my platform, and disabling HAVE_ECC_VERIFY_HELPER leads to compilation errors due to undeclared variables like sigRS.
Could you please advise:

Whether ECDSA secp256r1 verification is feasible on 16-bit platforms using only configuration (without custom math)?
If so, what is the recommended way to configure the library to bypass ecc_verify_hash_sp and ensure compatibility?

Thank you!

Share

Re: ECDSA secp256r1 Verification on 16-bit Microcontroller

Hello apf58,

While wolfSSL does not officially support 16-bit out of the box we have had success porting to and running on some 16-bit platforms. We have the basic start of support for 16-bit with the define WC_16BIT_CPU.
You will want to override wolfSSL's types, for example:

/* type definitions for 16-bit micro */
    #define WOLFSSL_TYPES
    typedef unsigned long word32;
    typedef unsigned char byte;
    typedef unsigned int word16;
    /* end types defines */

We also have a PIC24 proof of concept port which you can find and reference from here: https://github.com/wolfSSL/wolfssl/comp … g?expand=1

Again wolfSSL does not officially support 16-bit platforms, we would be happy to add this support officially if you are interested in funding this effort.  You can contact us at support [AT] wolfssl [DOT] com if you'd like to set this up.

Are you able to share any more information on your project?  Are you working on a personal or commercial project?

Thanks,
Kareem

Share