ecp_curves: Added `mbedtls_ecp_modulus_setup()`.
This patch introduces a new static method, responsible
for automatically initialising an modulus structure,
based on the curve id and a modulus type selector.
Signed-off-by: Minos Galanakis <minos.galanakis@arm.com>
diff --git a/include/mbedtls/ecp.h b/include/mbedtls/ecp.h
index 7a28a19..20b663e 100644
--- a/include/mbedtls/ecp.h
+++ b/include/mbedtls/ecp.h
@@ -141,6 +141,14 @@
MBEDTLS_ECP_TYPE_MONTGOMERY, /* y^2 = x^3 + a x^2 + x */
} mbedtls_ecp_curve_type;
+/*
+ * Curve moduli types
+ */
+typedef enum {
+ MBEDTLS_ECP_MOD_COORDINATE = 0,
+ MBEDTLS_ECP_MOD_SCALAR
+} mbedtls_ecp_modulus_type;
+
/**
* Curve information, for use by other modules.
*