mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-25 17:07:08 +00:00
Also check curve in verify()
This is the only function that performs computations without calling EccPoint_mult_safer() and that didn't have that guard yet.
This commit is contained in:
parent
913534837a
commit
ad166d8db7
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue