mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-12 09:04:37 +02:00
secure boot: Fix anti-fault value if hash is shorter than curve
(Not actually a problem with SBV1 anti-fault as hash size == curve size in this case.)
This commit is contained in:
committed by
Angus Gratton
parent
b9abb78546
commit
f2d310fea7
@@ -133,7 +133,7 @@ int uECC_verify_antifault(const uint8_t *public_key,
|
||||
}
|
||||
/* Curve may be longer than hash, in which case keep reading the rest of the bytes */
|
||||
for (int w = hash_words; w < curve->num_words; w++) {
|
||||
vhash_words[w % hash_words] |= rx[w] | r[w];
|
||||
vhash_words[w % hash_words] |= rx[w] ^ r[w];
|
||||
}
|
||||
|
||||
/* Accept only if v == r. */
|
||||
|
Reference in New Issue
Block a user