Hardcode numwords in vli_mmod

This commit is contained in:
Manuel Pégourié-Gonnard 2019-11-04 14:57:53 +01:00
parent 1b0875d863
commit 10349e4912
4 changed files with 7 additions and 5 deletions

View file

@ -182,7 +182,7 @@ int uECC_sign(const uint8_t *private_key, const uint8_t *message_hash,
}
// computing k as modular reduction of _random (see FIPS 186.4 B.5.1):
uECC_vli_mmod(k, _random, curve->n, BITS_TO_WORDS(curve->num_n_bits));
uECC_vli_mmod(k, _random, curve->n);
if (uECC_sign_with_k(private_key, message_hash, hash_size, k, signature,
curve)) {