test/crypto: Update ECC DSA test case
The ECC DSA test case was updated in TinyCrypt 0.2.6. Fix the length of the random vector. Change-Id: I7545a51c6855959afdefe00a1e0b53e5c3001a7c Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit is contained in:
parent
3692aed6a8
commit
c3f79e1d46
1 changed files with 3 additions and 3 deletions
|
@ -562,7 +562,7 @@ int montecarlo_signverify(uint32_t num, int verbose)
|
|||
uint32_t l_private[NUM_ECC_DIGITS];
|
||||
|
||||
uint32_t l_hash[NUM_ECC_DIGITS];
|
||||
uint32_t l_random[NUM_ECC_DIGITS];
|
||||
uint32_t l_random[2 * NUM_ECC_DIGITS];
|
||||
|
||||
uint32_t r[NUM_ECC_DIGITS];
|
||||
uint32_t s[NUM_ECC_DIGITS];
|
||||
|
@ -571,11 +571,11 @@ int montecarlo_signverify(uint32_t num, int verbose)
|
|||
ARG_UNUSED(verbose);
|
||||
|
||||
for (uint32_t i = 0; i < num; ++i) {
|
||||
random_bytes(l_random, NUM_ECC_DIGITS);
|
||||
random_bytes(l_random, 2 * NUM_ECC_DIGITS);
|
||||
ecc_make_key(&l_public, l_private, l_random);
|
||||
|
||||
random_bytes(l_hash, NUM_ECC_DIGITS);
|
||||
random_bytes(l_random, NUM_ECC_DIGITS);
|
||||
random_bytes(l_random, 2 * NUM_ECC_DIGITS);
|
||||
|
||||
if (!ecdsa_sign(r, s, l_private, l_random, l_hash)) {
|
||||
TC_PRINT("ecdsa_sign() failed\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue