Added some descriptions of functions
Signed-off-by: Piotr Nowicki <piotr.nowicki@arm.com>
diff --git a/tinycrypt/ecc.c b/tinycrypt/ecc.c
index 8f2cf0e..ba36267 100644
--- a/tinycrypt/ecc.c
+++ b/tinycrypt/ecc.c
@@ -290,6 +290,7 @@
uECC_word_t tmp1, tmp2;
volatile int i;
+ /* Start from a random location and check the correct number of iterations */
int start_offset = mbedtls_platform_random_in_range(NUM_ECC_WORDS);
for (i = start_offset; i < NUM_ECC_WORDS; ++i) {
@@ -306,6 +307,7 @@
diff |= (tmp1 ^ tmp2);
}
+ /* Random delay to increase security */
mbedtls_platform_random_delay();
/* Return 0 only when diff is 0 and flow_counter is equal to NUM_ECC_WORDS */