1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-08-01 10:06:53 +03:00

De-duplicate ecp.c

We duplicated ecp.c in the anticipation of heavy refactoring there. This
work has been suspended and the duplication is not useful anymore but
imposes an overhead.

Signed-off-by: Janos Follath <janos.follath@arm.com>
This commit is contained in:
Janos Follath
2023-07-31 12:54:59 +01:00
parent b388ed737d
commit d8cb3d7fa4
4 changed files with 4 additions and 3650 deletions

View File

@ -37,7 +37,6 @@ set(src_crypto
ecdsa.c ecdsa.c
ecjpake.c ecjpake.c
ecp.c ecp.c
ecp_new.c
ecp_curves.c ecp_curves.c
ecp_curves_new.c ecp_curves_new.c
entropy.c entropy.c

View File

@ -102,7 +102,6 @@ OBJS_CRYPTO= \
ecdsa.o \ ecdsa.o \
ecjpake.o \ ecjpake.o \
ecp.o \ ecp.o \
ecp_new.o \
ecp_curves.o \ ecp_curves.o \
ecp_curves_new.o \ ecp_curves_new.o \
entropy.o \ entropy.o \

View File

@ -43,8 +43,6 @@
#include "common.h" #include "common.h"
#if !defined(MBEDTLS_ECP_WITH_MPI_UINT)
/** /**
* \brief Function level alternative implementation. * \brief Function level alternative implementation.
* *
@ -591,11 +589,14 @@ void mbedtls_ecp_group_free(mbedtls_ecp_group *grp)
} }
if (grp->h != 1) { if (grp->h != 1) {
mbedtls_mpi_free(&grp->P);
mbedtls_mpi_free(&grp->A); mbedtls_mpi_free(&grp->A);
mbedtls_mpi_free(&grp->B); mbedtls_mpi_free(&grp->B);
mbedtls_ecp_point_free(&grp->G); mbedtls_ecp_point_free(&grp->G);
#if !defined(MBEDTLS_ECP_WITH_MPI_UINT)
mbedtls_mpi_free(&grp->N); mbedtls_mpi_free(&grp->N);
mbedtls_mpi_free(&grp->P);
#endif
} }
if (!ecp_group_is_static_comb_table(grp) && grp->T != NULL) { if (!ecp_group_is_static_comb_table(grp) && grp->T != NULL) {
@ -3641,5 +3642,3 @@ cleanup:
#endif /* !MBEDTLS_ECP_ALT */ #endif /* !MBEDTLS_ECP_ALT */
#endif /* MBEDTLS_ECP_LIGHT */ #endif /* MBEDTLS_ECP_LIGHT */
#endif /* !MBEDTLS_ECP_WITH_MPI_UINT */

File diff suppressed because it is too large Load Diff