mirror of https://github.com/ARMmbed/mbed-os.git
[M487] Remove mbedtls_internal_ecp_mul in ECP alter.
MbedTLS doesn't support point multiplication for MBEDTLS_ECP_INTERNAL_ALT acceleration configuration.pull/5812/head
parent
df76e297b4
commit
95d4110e31
|
@ -337,47 +337,6 @@ cleanup:
|
|||
}
|
||||
#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)
|
||||
/**
|
||||
* \brief Normalize jacobian coordinates so that Z == 0 || Z == 1.
|
||||
|
|
Loading…
Reference in New Issue