Increase the Hamming distance of uECC_generate_random_int returns

Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2020-06-12 06:32:13 -04:00
parent 8f52a8a8c0
commit 3a0df03364
No known key found for this signature in database
GPG key ID: 89A90840DC388527
3 changed files with 8 additions and 7 deletions

View file

@ -109,7 +109,7 @@ int uECC_sign_with_k(const uint8_t *private_key, const uint8_t *message_hash,
uECC_vli_clear(tmp);
tmp[0] = 1;
}
else if (!uECC_generate_random_int(tmp, curve_n, num_n_words)) {
else if (uECC_generate_random_int(tmp, curve_n, num_n_words) != UECC_SUCCESS) {
return UECC_FAILURE;
}