diff --git a/tinycrypt/ecc_dsa.c b/tinycrypt/ecc_dsa.c index b3a08cf1f..04b1bfabd 100644 --- a/tinycrypt/ecc_dsa.c +++ b/tinycrypt/ecc_dsa.c @@ -220,6 +220,9 @@ int uECC_verify(const uint8_t *public_key, const uint8_t *message_hash, wordcount_t num_words = curve->num_words; wordcount_t num_n_words = BITS_TO_WORDS(curve->num_n_bits); + if (curve != uECC_secp256r1()) + return 0; + rx[num_n_words - 1] = 0; r[num_n_words - 1] = 0; s[num_n_words - 1] = 0;