diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 47c719640..9040bb71b 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -561,6 +561,21 @@ */ #define MBEDTLS_ECP_NIST_OPTIM +/** + * \def MBEDTLS_ECP_EARLY_RETURN + * + * Enable "non-blocking" ECC operations that can return early and be resumed. + * + * This enables \c mbedtls_ecp_set_max_ops() and allows various ECC functions + * to return \c MBEDTLS_ERR_ECP_IN_PROGRESS when needed. + * + * TODO: depending on other choices, this might need to be disabled by default + * in order to avoid changing the ABI. Revisit that later. + * + * Comment this macro to disable non-blocking ECC computations. + */ +#define MBEDTLS_ECP_EARLY_RETURN + /** * \def MBEDTLS_ECDSA_DETERMINISTIC * diff --git a/library/version_features.c b/library/version_features.c index 5cbe8aca3..2668eaed5 100644 --- a/library/version_features.c +++ b/library/version_features.c @@ -276,6 +276,9 @@ static const char *features[] = { #if defined(MBEDTLS_ECP_NIST_OPTIM) "MBEDTLS_ECP_NIST_OPTIM", #endif /* MBEDTLS_ECP_NIST_OPTIM */ +#if defined(MBEDTLS_ECP_EARLY_RETURN) + "MBEDTLS_ECP_EARLY_RETURN", +#endif /* MBEDTLS_ECP_EARLY_RETURN */ #if defined(MBEDTLS_ECDSA_DETERMINISTIC) "MBEDTLS_ECDSA_DETERMINISTIC", #endif /* MBEDTLS_ECDSA_DETERMINISTIC */