Remove less-safe mult function from public API
This doesn't change code size, but makes it easier to remove unneeded
parameters later (less possible entry points).
diff --git a/include/tinycrypt/ecc.h b/include/tinycrypt/ecc.h
index 3996cd4..7a0b0bb 100644
--- a/include/tinycrypt/ecc.h
+++ b/include/tinycrypt/ecc.h
@@ -283,33 +283,6 @@
uECC_word_t *private_key, uECC_Curve curve);
/*
- * @brief Regularize the bitcount for the private key so that attackers cannot
- * use a side channel attack to learn the number of leading zeros.
- * @return Regularized k
- * @param k IN -- private-key
- * @param k0 IN/OUT -- regularized k
- * @param k1 IN/OUT -- regularized k
- * @param curve IN -- elliptic curve
- */
-uECC_word_t regularize_k(const uECC_word_t * const k, uECC_word_t *k0,
- uECC_word_t *k1, uECC_Curve curve);
-
-/*
- * @brief Point multiplication algorithm using Montgomery's ladder with co-Z
- * coordinates. See http://eprint.iacr.org/2011/338.pdf.
- * @note Result may overlap point.
- * @param result OUT -- returns scalar*point
- * @param point IN -- elliptic curve point
- * @param scalar IN -- scalar
- * @param initial_Z IN -- initial value for z
- * @param num_bits IN -- number of bits in scalar
- * @param curve IN -- elliptic curve
- */
-void EccPoint_mult(uECC_word_t * result, const uECC_word_t * point,
- const uECC_word_t * scalar, const uECC_word_t * initial_Z,
- bitcount_t num_bits, uECC_Curve curve);
-
-/*
* @brief Point multiplication algorithm using Montgomery's ladder with co-Z
* coordinates. See http://eprint.iacr.org/2011/338.pdf.
* Uses scalar regularization and coordinate randomization (if a global RNG
diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c
index 91bec56..a95ad28 100644
--- a/tinycrypt/ecc.c
+++ b/tinycrypt/ecc.c
@@ -871,7 +871,7 @@
uECC_vli_set(X1, t7, num_words);
}
-void EccPoint_mult(uECC_word_t * result, const uECC_word_t * point,
+static void EccPoint_mult(uECC_word_t * result, const uECC_word_t * point,
const uECC_word_t * scalar,
const uECC_word_t * initial_Z,
bitcount_t num_bits, uECC_Curve curve)
@@ -920,7 +920,7 @@
uECC_vli_set(result + num_words, Ry[0], num_words);
}
-uECC_word_t regularize_k(const uECC_word_t * const k, uECC_word_t *k0,
+static uECC_word_t regularize_k(const uECC_word_t * const k, uECC_word_t *k0,
uECC_word_t *k1, uECC_Curve curve)
{