mcuboot/boot/espressif
Michael Grand 5047f032c9 fih: Hardening of fault injection countermeasures
Returned values are now hardcoded. Indeed, while it is not
strictly needed (few return values different from SUCCESS
or FAILURE) complexity added by encoding return values might
cause the software to be vulnerable to fault attacks.

Return type changed from fih_int to fih_ret to make
the whole thing much simpler and therefore more robust
to fault attacks. In addition, its easier to predict
compiler behavior.

Affectation of sentive variables has been hardened using macro
FIH_SET (affectation + check wether write access has been properly
done). FIH_DECLARE() is added to ease the declaration of sentive
variables.

Equality tests fih_eq() and fih_not_eq() are now macros because
inlining produce more complex code (and weaker) than macros.
In addition fih_not_eq is modified to be the negation of fih_eq
which was not the case until now.

when FIH_NOT_EQ is used , FIH_SET(fih_rc, FIH_FAILURE) has been added
in some part of the code.

variable image_mask (bootutil_priv.h) is now volatile because a
double IF test is made on it.

some others parts of the code have been hardenned (eg. loop on images)

Signed-off-by: Michael Grand <m.grand@trustngo.tech>
2023-01-30 09:34:34 -07:00
..
hal espressif:ESP32-S3: Fix multiboot APP CPU start 2023-01-24 22:56:02 -03:00
include boot_serial: espressif: enable erase progressively option on serial recovery 2022-09-29 11:37:13 -03:00
port espressif:ESP32-S3: Fix multiboot APP CPU start 2023-01-24 22:56:02 -03:00
tools espressif: Add warning for unsupported chip revision 2022-05-09 15:55:23 -03:00
CMakeLists.txt boot_serial: espressif: split serial adapter implementation for each chip 2022-09-29 11:37:13 -03:00
keys.c espressif: Enable signature verification (RSA, EC256 and ED25519) 2021-10-07 18:30:20 -03:00
main.c fih: Hardening of fault injection countermeasures 2023-01-30 09:34:34 -07:00
os.c espressif: Fix support for signing algorithms 2021-12-20 09:20:14 -03:00
secureboot-sign-ec256.conf espressif: Add warning for unsupported chip revision 2022-05-09 15:55:23 -03:00
secureboot-sign-ed25519.conf espressif: Add warning for unsupported chip revision 2022-05-09 15:55:23 -03:00
secureboot-sign-rsa2048.conf espressif: Add warning for unsupported chip revision 2022-05-09 15:55:23 -03:00
secureboot-sign-rsa3072.conf espressif: Add warning for unsupported chip revision 2022-05-09 15:55:23 -03:00