From f23582fe7129cd6b68bd0554c4f93e66c9493b81 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Thu, 12 May 2016 10:19:52 +0200 Subject: [PATCH] tinycrypt: Fix discrepancy of ecc_make_key definition and declaration ecc_make_key declaration has random size of NUM_ECC_DIGITS * 2 but definition has (and use) only NUM_ECC_DIGITS. Change-Id: I18f0d7992b21a2ed7ed99851b1b795cff0a08a10 Signed-off-by: Szymon Janc --- lib/crypto/tinycrypt/include/tinycrypt/ecc_dh.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/crypto/tinycrypt/include/tinycrypt/ecc_dh.h b/lib/crypto/tinycrypt/include/tinycrypt/ecc_dh.h index 7c7c98f83d7..9a728517753 100644 --- a/lib/crypto/tinycrypt/include/tinycrypt/ecc_dh.h +++ b/lib/crypto/tinycrypt/include/tinycrypt/ecc_dh.h @@ -90,15 +90,13 @@ extern "C" { * * @note You must use a new non-predictable random number to generate each * new key pair. - * @note p_random must have NUM_ECC_DIGITS*2 bits of entropy to eliminate - * bias in keys. * * @note side-channel countermeasure: algorithm strengthened against timing * attack. */ int32_t ecc_make_key(EccPoint *p_publicKey, uint32_t p_privateKey[NUM_ECC_DIGITS], - uint32_t p_random[NUM_ECC_DIGITS * 2]); + uint32_t p_random[NUM_ECC_DIGITS]); /** * @brief Determine whether or not a given point is on the chosen elliptic curve