Skip to content

Commit 6c962c7

Browse files
ccli8cmonr
authored andcommitted
Remove mbedtls_internal_ecp_mul in ECP alter.
MbedTLS doesn't support point multiplication for MBEDTLS_ECP_INTERNAL_ALT acceleration configuration.
1 parent d53641b commit 6c962c7

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/ecp/ecp_internal_alt.c

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -336,47 +336,6 @@ int mbedtls_internal_ecp_double_jac( const mbedtls_ecp_group *grp,
336336
return ret;
337337
}
338338
#endif
339-
340-
/**
341-
* \brief Point multiplication R = m*P, Jacobian coordinates.
342-
*
343-
* \param grp Pointer to the group representing the curve.
344-
*
345-
* \param R Pointer to a point structure to hold the result.
346-
*
347-
* \param m Pointer to MPI by which to multiply P
348-
*
349-
* \param P Pointer to the point that has to be multiplied by m, given with
350-
* Jacobian coordinates.
351-
*
352-
* \return 0 if successful.
353-
*
354-
* \note Currently mbedTLS doesn't open R = m*P API like this.
355-
* It is expected because ECC accelerator can improve it by 30~40 times.
356-
*/
357-
int mbedtls_internal_ecp_mul_jac(mbedtls_ecp_group *grp,
358-
mbedtls_ecp_point *R,
359-
const mbedtls_mpi *m,
360-
const mbedtls_ecp_point *P)
361-
{
362-
int ret;
363-
mbedtls_ecp_point P_;
364-
365-
mbedtls_ecp_point_init(&P_);
366-
367-
/* P_ = normalized P */
368-
MBEDTLS_MPI_CHK(mbedtls_ecp_copy(&P_, P));
369-
MBEDTLS_MPI_CHK(mbedtls_internal_ecp_normalize_jac(grp, &P_));
370-
371-
/* Run ECC point multiplication: R = m*P */
372-
MBEDTLS_MPI_CHK(internal_run_eccop(grp, R, m, &P_, NULL, NULL, ECCOP_POINT_MUL));
373-
374-
cleanup:
375-
376-
mbedtls_ecp_point_free(&P_);
377-
378-
return ret;
379-
}
380339

381340
#if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT)
382341
/**

0 commit comments

Comments
 (0)