From 95d4110e311103e3ca97d504a8d856f402a149af Mon Sep 17 00:00:00 2001 From: ccli8 Date: Tue, 6 Feb 2018 09:58:36 +0800 Subject: [PATCH] [M487] Remove mbedtls_internal_ecp_mul in ECP alter. MbedTLS doesn't support point multiplication for MBEDTLS_ECP_INTERNAL_ALT acceleration configuration. --- .../TARGET_M480/ecp/ecp_internal_alt.c | 41 ------------------- 1 file changed, 41 deletions(-) diff --git a/features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/ecp/ecp_internal_alt.c b/features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/ecp/ecp_internal_alt.c index 2828d8df6c..fe64bc550d 100644 --- a/features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/ecp/ecp_internal_alt.c +++ b/features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/ecp/ecp_internal_alt.c @@ -336,47 +336,6 @@ cleanup: return ret; } #endif - -/** - * \brief Point multiplication R = m*P, Jacobian coordinates. - * - * \param grp Pointer to the group representing the curve. - * - * \param R Pointer to a point structure to hold the result. - * - * \param m Pointer to MPI by which to multiply P - * - * \param P Pointer to the point that has to be multiplied by m, given with - * Jacobian coordinates. - * - * \return 0 if successful. - * - * \note Currently mbedTLS doesn't open R = m*P API like this. - * It is expected because ECC accelerator can improve it by 30~40 times. - */ -int mbedtls_internal_ecp_mul_jac(mbedtls_ecp_group *grp, - mbedtls_ecp_point *R, - const mbedtls_mpi *m, - const mbedtls_ecp_point *P) -{ - int ret; - mbedtls_ecp_point P_; - - mbedtls_ecp_point_init(&P_); - - /* P_ = normalized P */ - MBEDTLS_MPI_CHK(mbedtls_ecp_copy(&P_, P)); - MBEDTLS_MPI_CHK(mbedtls_internal_ecp_normalize_jac(grp, &P_)); - - /* Run ECC point multiplication: R = m*P */ - MBEDTLS_MPI_CHK(internal_run_eccop(grp, R, m, &P_, NULL, NULL, ECCOP_POINT_MUL)); - -cleanup: - - mbedtls_ecp_point_free(&P_); - - return ret; -} #if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT) /**