Skip to content

[RFE] Expose WOLF_CRYPTO_CB_RSA_PAD as a configure knob #10271

@space88man

Description

@space88man

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions