#include "common.h"
#if !defined(MBEDTLS_ECP_WITH_MPI_UINT)
#if defined(MBEDTLS_ECP_LIGHT)
#include "mbedtls/ecp.h"
#include "mbedtls/platform_util.h"
#include "mbedtls/error.h"
#include "bn_mul.h"
#include "bignum_core.h"
#include "ecp_invasive.h"
#include <string.h>
#if !defined(MBEDTLS_ECP_ALT)
#define ECP_MPI_INIT(_p, _n) …
#define ECP_MPI_INIT_ARRAY(x) …
#define ECP_POINT_INIT_XY_Z0(x, y) …
#define ECP_POINT_INIT_XY_Z1(x, y) …
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
#define ECP_LOAD_GROUP
static const mbedtls_mpi_uint mpi_one[] = …;
#endif
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
static const mbedtls_mpi_uint secp192r1_p[] = …;
static const mbedtls_mpi_uint secp192r1_b[] = …;
static const mbedtls_mpi_uint secp192r1_gx[] = …;
static const mbedtls_mpi_uint secp192r1_gy[] = …;
static const mbedtls_mpi_uint secp192r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp192r1_T_0_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_1_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_2_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_3_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_4_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_5_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_6_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_7_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_8_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_9_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_10_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_11_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_12_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_13_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_14_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp192r1_T_15_X[] = …;
static const mbedtls_mpi_uint secp192r1_T_15_Y[] = …;
static const mbedtls_ecp_point secp192r1_T[16] = …;
#else
#define secp192r1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED)
static const mbedtls_mpi_uint secp224r1_p[] = …;
static const mbedtls_mpi_uint secp224r1_b[] = …;
static const mbedtls_mpi_uint secp224r1_gx[] = …;
static const mbedtls_mpi_uint secp224r1_gy[] = …;
static const mbedtls_mpi_uint secp224r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp224r1_T_0_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_1_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_2_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_3_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_4_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_5_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_6_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_7_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_8_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_9_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_10_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_11_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_12_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_13_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_14_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp224r1_T_15_X[] = …;
static const mbedtls_mpi_uint secp224r1_T_15_Y[] = …;
static const mbedtls_ecp_point secp224r1_T[16] = …;
#else
#define secp224r1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
static const mbedtls_mpi_uint secp256r1_p[] = …;
static const mbedtls_mpi_uint secp256r1_b[] = …;
static const mbedtls_mpi_uint secp256r1_gx[] = …;
static const mbedtls_mpi_uint secp256r1_gy[] = …;
static const mbedtls_mpi_uint secp256r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp256r1_T_0_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_1_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_2_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_3_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_4_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_5_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_6_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_7_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_8_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_9_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_10_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_11_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_12_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_13_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_14_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp256r1_T_15_X[] = …;
static const mbedtls_mpi_uint secp256r1_T_15_Y[] = …;
static const mbedtls_ecp_point secp256r1_T[16] = …;
#else
#define secp256r1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
static const mbedtls_mpi_uint secp384r1_p[] = …;
static const mbedtls_mpi_uint secp384r1_b[] = …;
static const mbedtls_mpi_uint secp384r1_gx[] = …;
static const mbedtls_mpi_uint secp384r1_gy[] = …;
static const mbedtls_mpi_uint secp384r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp384r1_T_0_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_1_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_2_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_3_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_4_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_5_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_6_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_7_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_8_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_9_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_10_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_11_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_12_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_13_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_14_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_15_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_15_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_16_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_16_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_17_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_17_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_18_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_18_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_19_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_19_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_20_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_20_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_21_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_21_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_22_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_22_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_23_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_23_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_24_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_24_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_25_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_25_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_26_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_26_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_27_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_27_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_28_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_28_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_29_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_29_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_30_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_30_Y[] = …;
static const mbedtls_mpi_uint secp384r1_T_31_X[] = …;
static const mbedtls_mpi_uint secp384r1_T_31_Y[] = …;
static const mbedtls_ecp_point secp384r1_T[32] = …;
#else
#define secp384r1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
static const mbedtls_mpi_uint secp521r1_p[] = …;
static const mbedtls_mpi_uint secp521r1_b[] = …;
static const mbedtls_mpi_uint secp521r1_gx[] = …;
static const mbedtls_mpi_uint secp521r1_gy[] = …;
static const mbedtls_mpi_uint secp521r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp521r1_T_0_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_1_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_2_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_3_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_4_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_5_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_6_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_7_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_8_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_9_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_10_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_11_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_12_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_13_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_14_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_15_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_15_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_16_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_16_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_17_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_17_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_18_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_18_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_19_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_19_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_20_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_20_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_21_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_21_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_22_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_22_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_23_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_23_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_24_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_24_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_25_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_25_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_26_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_26_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_27_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_27_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_28_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_28_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_29_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_29_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_30_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_30_Y[] = …;
static const mbedtls_mpi_uint secp521r1_T_31_X[] = …;
static const mbedtls_mpi_uint secp521r1_T_31_Y[] = …;
static const mbedtls_ecp_point secp521r1_T[32] = …;
#else
#define secp521r1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
static const mbedtls_mpi_uint secp192k1_p[] = …;
static const mbedtls_mpi_uint secp192k1_a[] = …;
static const mbedtls_mpi_uint secp192k1_b[] = …;
static const mbedtls_mpi_uint secp192k1_gx[] = …;
static const mbedtls_mpi_uint secp192k1_gy[] = …;
static const mbedtls_mpi_uint secp192k1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp192k1_T_0_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_1_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_2_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_3_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_4_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_5_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_6_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_7_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_8_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_9_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_10_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_11_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_12_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_13_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_14_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp192k1_T_15_X[] = …;
static const mbedtls_mpi_uint secp192k1_T_15_Y[] = …;
static const mbedtls_ecp_point secp192k1_T[16] = …;
#else
#define secp192k1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
static const mbedtls_mpi_uint secp224k1_p[] = …;
static const mbedtls_mpi_uint secp224k1_a[] = …;
static const mbedtls_mpi_uint secp224k1_b[] = …;
static const mbedtls_mpi_uint secp224k1_gx[] = …;
static const mbedtls_mpi_uint secp224k1_gy[] = …;
static const mbedtls_mpi_uint secp224k1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp224k1_T_0_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_1_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_2_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_3_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_4_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_5_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_6_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_7_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_8_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_9_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_10_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_11_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_12_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_13_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_14_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp224k1_T_15_X[] = …;
static const mbedtls_mpi_uint secp224k1_T_15_Y[] = …;
static const mbedtls_ecp_point secp224k1_T[16] = …;
#else
#define secp224k1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
static const mbedtls_mpi_uint secp256k1_p[] = …;
static const mbedtls_mpi_uint secp256k1_a[] = …;
static const mbedtls_mpi_uint secp256k1_b[] = …;
static const mbedtls_mpi_uint secp256k1_gx[] = …;
static const mbedtls_mpi_uint secp256k1_gy[] = …;
static const mbedtls_mpi_uint secp256k1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint secp256k1_T_0_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_0_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_1_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_1_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_2_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_2_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_3_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_3_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_4_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_4_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_5_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_5_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_6_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_6_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_7_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_7_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_8_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_8_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_9_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_9_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_10_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_10_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_11_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_11_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_12_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_12_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_13_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_13_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_14_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_14_Y[] = …;
static const mbedtls_mpi_uint secp256k1_T_15_X[] = …;
static const mbedtls_mpi_uint secp256k1_T_15_Y[] = …;
static const mbedtls_ecp_point secp256k1_T[16] = …;
#else
#define secp256k1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED)
static const mbedtls_mpi_uint brainpoolP256r1_p[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_a[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_b[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_gx[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_gy[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint brainpoolP256r1_T_0_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_0_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_1_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_1_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_2_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_2_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_3_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_3_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_4_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_4_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_5_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_5_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_6_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_6_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_7_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_7_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_8_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_8_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_9_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_9_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_10_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_10_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_11_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_11_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_12_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_12_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_13_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_13_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_14_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_14_Y[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_15_X[] = …;
static const mbedtls_mpi_uint brainpoolP256r1_T_15_Y[] = …;
static const mbedtls_ecp_point brainpoolP256r1_T[16] = …;
#else
#define brainpoolP256r1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED)
static const mbedtls_mpi_uint brainpoolP384r1_p[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_a[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_b[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_gx[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_gy[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint brainpoolP384r1_T_0_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_0_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_1_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_1_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_2_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_2_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_3_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_3_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_4_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_4_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_5_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_5_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_6_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_6_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_7_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_7_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_8_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_8_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_9_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_9_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_10_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_10_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_11_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_11_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_12_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_12_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_13_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_13_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_14_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_14_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_15_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_15_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_16_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_16_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_17_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_17_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_18_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_18_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_19_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_19_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_20_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_20_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_21_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_21_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_22_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_22_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_23_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_23_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_24_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_24_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_25_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_25_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_26_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_26_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_27_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_27_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_28_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_28_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_29_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_29_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_30_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_30_Y[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_31_X[] = …;
static const mbedtls_mpi_uint brainpoolP384r1_T_31_Y[] = …;
static const mbedtls_ecp_point brainpoolP384r1_T[32] = …;
#else
#define brainpoolP384r1_T …
#endif
#endif
#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED)
static const mbedtls_mpi_uint brainpoolP512r1_p[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_a[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_b[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_gx[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_gy[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_n[] = …;
#if MBEDTLS_ECP_FIXED_POINT_OPTIM == 1
static const mbedtls_mpi_uint brainpoolP512r1_T_0_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_0_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_1_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_1_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_2_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_2_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_3_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_3_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_4_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_4_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_5_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_5_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_6_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_6_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_7_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_7_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_8_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_8_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_9_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_9_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_10_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_10_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_11_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_11_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_12_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_12_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_13_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_13_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_14_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_14_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_15_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_15_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_16_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_16_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_17_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_17_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_18_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_18_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_19_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_19_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_20_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_20_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_21_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_21_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_22_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_22_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_23_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_23_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_24_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_24_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_25_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_25_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_26_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_26_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_27_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_27_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_28_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_28_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_29_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_29_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_30_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_30_Y[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_31_X[] = …;
static const mbedtls_mpi_uint brainpoolP512r1_T_31_Y[] = …;
static const mbedtls_ecp_point brainpoolP512r1_T[32] = …;
#else
#define brainpoolP512r1_T …
#endif
#endif
#if defined(ECP_LOAD_GROUP)
static inline void ecp_mpi_load(mbedtls_mpi *X, const mbedtls_mpi_uint *p, size_t len)
{ … }
static inline void ecp_mpi_set1(mbedtls_mpi *X)
{ … }
static int ecp_group_load(mbedtls_ecp_group *grp,
const mbedtls_mpi_uint *p, size_t plen,
const mbedtls_mpi_uint *a, size_t alen,
const mbedtls_mpi_uint *b, size_t blen,
const mbedtls_mpi_uint *gx, size_t gxlen,
const mbedtls_mpi_uint *gy, size_t gylen,
const mbedtls_mpi_uint *n, size_t nlen,
const mbedtls_ecp_point *T)
{ … }
#endif
#if defined(MBEDTLS_ECP_NIST_OPTIM)
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
static int ecp_mod_p192(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED)
static int ecp_mod_p224(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
static int ecp_mod_p256(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
static int ecp_mod_p384(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
static int ecp_mod_p521(mbedtls_mpi *);
#endif
#define NIST_MODP(P) …
#else
#define NIST_MODP …
#endif
#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
static int ecp_mod_p255(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
static int ecp_mod_p448(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
static int ecp_mod_p192k1(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
static int ecp_mod_p224k1(mbedtls_mpi *);
#endif
#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
static int ecp_mod_p256k1(mbedtls_mpi *);
#endif
#if defined(ECP_LOAD_GROUP)
#define LOAD_GROUP_A(G) …
#define LOAD_GROUP(G) …
#endif
#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
static const mbedtls_mpi_sint curve25519_a24 = …;
static const unsigned char curve25519_part_of_n[] = …;
static int ecp_use_curve25519(mbedtls_ecp_group *grp)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
static const mbedtls_mpi_sint curve448_a24 = …;
static const unsigned char curve448_part_of_n[] = …;
static int ecp_use_curve448(mbedtls_ecp_group *grp)
{ … }
#endif
int mbedtls_ecp_group_load(mbedtls_ecp_group *grp, mbedtls_ecp_group_id id)
{ … }
#if defined(MBEDTLS_ECP_NIST_OPTIM)
#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED)
static inline void add64(mbedtls_mpi_uint *dst, mbedtls_mpi_uint *src, mbedtls_mpi_uint *carry)
{ … }
static inline void carry64(mbedtls_mpi_uint *dst, mbedtls_mpi_uint *carry)
{ … }
#define WIDTH …
#define A …
#define ADD(i) …
#define NEXT …
#define LAST …
static int ecp_mod_p192(mbedtls_mpi *N)
{ … }
#undef WIDTH
#undef A
#undef ADD
#undef NEXT
#undef LAST
#endif
#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
#define LOAD32 …
#if defined(MBEDTLS_HAVE_INT32)
#define MAX32 …
#define A …
#define STORE32 …
#else
#define MAX32 …
#define A …
#define STORE32 …
#endif
static inline void add32(uint32_t *dst, uint32_t src, signed char *carry)
{ … }
static inline void sub32(uint32_t *dst, uint32_t src, signed char *carry)
{ … }
#define ADD(j) …
#define SUB(j) …
#define INIT …
#define NEXT … \
#define LAST …
static void mbedtls_ecp_fix_negative(mbedtls_mpi *N, signed char c, size_t bits)
{ … }
#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED)
static int ecp_mod_p224(mbedtls_mpi *N)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED)
static int ecp_mod_p256(mbedtls_mpi *N)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED)
static int ecp_mod_p384(mbedtls_mpi *N)
{ … }
#endif
#undef A
#undef LOAD32
#undef STORE32
#undef MAX32
#undef INIT
#undef NEXT
#undef LAST
#endif
#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED)
#define P521_WIDTH …
#define P521_MASK …
static int ecp_mod_p521(mbedtls_mpi *N)
{ … }
#undef P521_WIDTH
#undef P521_MASK
#endif
#endif
#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED)
#define P255_WIDTH …
static int ecp_mod_p255(mbedtls_mpi *N)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_CURVE448_ENABLED)
#define P448_WIDTH …
#define DIV_ROUND_UP(X, Y) …
#define P224_SIZE …
#define P224_WIDTH_MIN …
#define P224_WIDTH_MAX …
#define P224_UNUSED_BITS …
static int ecp_mod_p448(mbedtls_mpi *N)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) || \
defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
#define P_KOBLITZ_MAX …
#define P_KOBLITZ_R …
static inline int ecp_mod_koblitz(mbedtls_mpi *N, const mbedtls_mpi_uint *Rp, size_t p_limbs,
size_t adjust, size_t shift, mbedtls_mpi_uint mask)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED)
static int ecp_mod_p192k1(mbedtls_mpi *N)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED)
static int ecp_mod_p224k1(mbedtls_mpi *N)
{ … }
#endif
#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED)
static int ecp_mod_p256k1(mbedtls_mpi *N)
{ … }
#endif
#if defined(MBEDTLS_TEST_HOOKS)
MBEDTLS_STATIC_TESTABLE
mbedtls_ecp_variant mbedtls_ecp_get_variant(void)
{
return MBEDTLS_ECP_VARIANT_WITH_MPI_STRUCT;
}
#endif
#endif
#endif
#endif