Remove curve parameter from (semi-)internal functions
By semi-internal I mean functions that are only public because they're used in
more than once compilation unit in the library (for example in ecc.c and
ecc_dsa.c) but should not really be part of the public-facing API.
diff --git a/include/tinycrypt/ecc.h b/include/tinycrypt/ecc.h
index 65381bd..5a48743 100644
--- a/include/tinycrypt/ecc.h
+++ b/include/tinycrypt/ecc.h
@@ -134,7 +134,7 @@
* @param curve IN -- elliptic curve
*/
void double_jacobian_default(uECC_word_t * X1, uECC_word_t * Y1,
- uECC_word_t * Z1, uECC_Curve curve);
+ uECC_word_t * Z1);
/*
* @brief Computes result = product % curve_p
@@ -265,10 +265,9 @@
/*
* @brief Check if 'point' is the point at infinity
* @param point IN -- elliptic curve point
- * @param curve IN -- elliptic curve
* @return if 'point' is the point at infinity, 0 otherwise.
*/
-uECC_word_t EccPoint_isZero(const uECC_word_t *point, uECC_Curve curve);
+uECC_word_t EccPoint_isZero(const uECC_word_t *point);
/*
* @brief computes the sign of left - right, in constant time.
@@ -313,7 +312,7 @@
* @param curve IN -- elliptic curve
*/
void XYcZ_add(uECC_word_t * X1, uECC_word_t * Y1, uECC_word_t * X2,
- uECC_word_t * Y2, uECC_Curve curve);
+ uECC_word_t * Y2);
/*
* @brief Computes (x1 * z^2, y1 * z^3)
@@ -444,7 +443,7 @@
* @exception returns -2 if x or y is smaller than p,
* @exception returns -3 if y^2 != x^3 + ax + b.
*/
-int uECC_valid_point(const uECC_word_t *point, uECC_Curve curve);
+int uECC_valid_point(const uECC_word_t *point);
/*
* @brief Check if a public key is valid.
@@ -460,7 +459,7 @@
* time computing a shared secret or verifying a signature using an invalid
* public key.
*/
-int uECC_valid_public_key(const uint8_t *public_key, uECC_Curve curve);
+int uECC_valid_public_key(const uint8_t *public_key);
/*
* @brief Converts an integer in uECC native format to big-endian bytes.