mbedtls_ecp_muladd is only for short Weierstrass curves
Document that mbedtls_ecp_muladd and mbedtls_ecp_muladd_restartable are only implemented on short Weierstrass curves. Exclude these functions at build time if no short Weierstrass curve is included in the build. Before, these functions failed to compile in such a configuration. Signed-off-by: Gilles Peskine <gilles.peskine@arm.com>
This commit is contained in:
parent
799e57612a
commit
9b99a8942f
2 changed files with 36 additions and 0 deletions
|
@ -2781,6 +2781,7 @@ cleanup:
|
|||
}
|
||||
#endif /* ECP_SHORTWEIERSTRASS */
|
||||
|
||||
#if defined(MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED)
|
||||
/*
|
||||
* R = m * P with shortcuts for m == 1 and m == -1
|
||||
* NOT constant-time - ONLY for short Weierstrass!
|
||||
|
@ -2926,6 +2927,7 @@ int mbedtls_ecp_muladd( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
|
|||
ECP_VALIDATE_RET( Q != NULL );
|
||||
return( mbedtls_ecp_muladd_restartable( grp, R, m, P, n, Q, NULL ) );
|
||||
}
|
||||
#endif /* MBEDTLS_ECP_SHORT_WEIERSTRASS_ENABLED */
|
||||
|
||||
#if defined(ECP_MONTGOMERY)
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue