mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-29 22:20:30 +00:00
Merge pull request #7758 from xkqian/bignum_clone_ecp_curves
[Bignum] Bignum clone ecp curves
This commit is contained in:
commit
b52f9cf5eb
@ -39,6 +39,7 @@ set(src_crypto
|
|||||||
ecp.c
|
ecp.c
|
||||||
ecp_new.c
|
ecp_new.c
|
||||||
ecp_curves.c
|
ecp_curves.c
|
||||||
|
ecp_curves_new.c
|
||||||
entropy.c
|
entropy.c
|
||||||
entropy_poll.c
|
entropy_poll.c
|
||||||
error.c
|
error.c
|
||||||
|
@ -104,6 +104,7 @@ OBJS_CRYPTO= \
|
|||||||
ecp.o \
|
ecp.o \
|
||||||
ecp_new.o \
|
ecp_new.o \
|
||||||
ecp_curves.o \
|
ecp_curves.o \
|
||||||
|
ecp_curves_new.o \
|
||||||
entropy.o \
|
entropy.o \
|
||||||
entropy_poll.o \
|
entropy_poll.o \
|
||||||
error.o \
|
error.o \
|
||||||
|
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#if !defined(MBEDTLS_ECP_WITH_MPI_UINT)
|
||||||
|
|
||||||
#if defined(MBEDTLS_ECP_LIGHT)
|
#if defined(MBEDTLS_ECP_LIGHT)
|
||||||
|
|
||||||
#include "mbedtls/ecp.h"
|
#include "mbedtls/ecp.h"
|
||||||
@ -6039,3 +6041,4 @@ int mbedtls_ecp_modulus_setup(mbedtls_mpi_mod_modulus *N,
|
|||||||
#endif /* MBEDTLS_TEST_HOOKS */
|
#endif /* MBEDTLS_TEST_HOOKS */
|
||||||
#endif /* !MBEDTLS_ECP_ALT */
|
#endif /* !MBEDTLS_ECP_ALT */
|
||||||
#endif /* MBEDTLS_ECP_LIGHT */
|
#endif /* MBEDTLS_ECP_LIGHT */
|
||||||
|
#endif /* MBEDTLS_ECP_WITH_MPI_UINT */
|
||||||
|
6044
library/ecp_curves_new.c
Normal file
6044
library/ecp_curves_new.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -2932,9 +2932,9 @@ int mbedtls_ecp_muladd(mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
|
|||||||
|
|
||||||
#if defined(MBEDTLS_ECP_MONTGOMERY_ENABLED)
|
#if defined(MBEDTLS_ECP_MONTGOMERY_ENABLED)
|
||||||
#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
|
#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
|
||||||
#define ECP_MPI_INIT(s, n, p) { s, (n), (mbedtls_mpi_uint *) (p) }
|
#define ECP_MPI_INIT(_p, _n) { .p = (mbedtls_mpi_uint *) (_p), .s = 1, .n = (_n) }
|
||||||
#define ECP_MPI_INIT_ARRAY(x) \
|
#define ECP_MPI_INIT_ARRAY(x) \
|
||||||
ECP_MPI_INIT(1, sizeof(x) / sizeof(mbedtls_mpi_uint), x)
|
ECP_MPI_INIT(x, sizeof(x) / sizeof(mbedtls_mpi_uint))
|
||||||
/*
|
/*
|
||||||
* Constants for the two points other than 0, 1, -1 (mod p) in
|
* Constants for the two points other than 0, 1, -1 (mod p) in
|
||||||
* https://cr.yp.to/ecdh.html#validate
|
* https://cr.yp.to/ecdh.html#validate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user