Version
master
Description
RFE: expose the C defines WOLF_CRYPTO_CB_RSA_PAD as a autotools/configure or cmake knob.
HSMs today may disable RSA raw operations and users are recommended to use RSA with padding mechanisms instead of managing padding in software. wc_pkcs11.c has support for OAEP/PKCS15/PSS mechanisms based on WOLF_CRYPTO_CB_RSA_PAD. This flag seems to be defined only with WOLFSSL_RENESAS_TSIP.
#if defined(WOLFSSL_RENESAS_TSIP)
#define TSIP_TLS_HMAC_KEY_INDEX_WORDSIZE 64
#define TSIP_TLS_MASTERSECRET_SIZE 80 /* 20 words */
#define TSIP_TLS_ENCPUBKEY_SZ_BY_CERTVRFY 560 /* in byte */
#ifdef WOLF_CRYPTO_CB
/* make sure RSA padding callbacks are enabled */
#define WOLF_CRYPTO_CB_RSA_PAD
#endif
#endif /* WOLFSSL_RENESAS_TSIP */
While this flag can be turned on with EXTRA_CFLAGS it seems more ergonomic to allow it to be turned on at configure time. Currently Debian does not have this flag turned on (given that it is quite obscure). This means that wc_pkcs11.c may not be using optimal mechanisms.
Version
master
Description
RFE: expose the C defines
WOLF_CRYPTO_CB_RSA_PADas a autotools/configure or cmake knob.HSMs today may disable RSA raw operations and users are recommended to use RSA with padding mechanisms instead of managing padding in software.
wc_pkcs11.chas support for OAEP/PKCS15/PSS mechanisms based onWOLF_CRYPTO_CB_RSA_PAD. This flag seems to be defined only withWOLFSSL_RENESAS_TSIP.While this flag can be turned on with
EXTRA_CFLAGSit seems more ergonomic to allow it to be turned on at configure time. Currently Debian does not have this flag turned on (given that it is quite obscure). This means thatwc_pkcs11.cmay not be using optimal mechanisms.