mcuboot/boot/zephyr/include
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
..
flash_map_backend zephyr: remove flash_device_get_binding 2022-07-29 09:05:29 +02:00
hal zephyr: Move code under 'boot' directory 2017-01-10 09:49:47 -07:00
mcuboot_config boot_serial: Add unaligned stack buffer writing 2023-01-03 12:18:54 +01:00
os zephyr: Move code under 'boot' directory 2017-01-10 09:49:47 -07:00
serial_adapter Add serial adapter module for support serial communication for zephyr 2017-12-06 16:11:10 -07:00
sysflash zephyr: Switch to using FIXED_PARTITION_ macros 2022-09-08 12:44:58 +02:00
arm_cleanup.h boot: zephyr: cleanup NXP MPU configuration before boot 2020-12-18 18:31:38 +01:00
config-asn1.h Fix ECDSA Zephyr configuration of mbed TLS 2017-11-14 19:12:53 -07:00
config-ec.h zephyr: remove MBEDTLS_ECP_MAX_BITS from mbedTLS configs 2022-06-15 14:37:24 -06:00
config-ed25519.h zephyr: remove MBEDTLS_ECP_MAX_BITS from mbedTLS configs 2022-06-15 14:37:24 -06:00
config-kw.h zephyr: Use a smaller sha256 implementation 2022-01-20 16:09:37 +01:00
config-rsa-kw.h zephyr: remove MBEDTLS_ECP_MAX_BITS from mbedTLS configs 2022-06-15 14:37:24 -06:00
config-rsa.h zephyr: remove MBEDTLS_ECP_MAX_BITS from mbedTLS configs 2022-06-15 14:37:24 -06:00
mcuboot-mbedtls-cfg.h Add support for signed images in single loader mode 2022-01-13 14:05:30 -07:00
platform-bench.h bootutil: Refactor MCUBOOT_LOG_MODULE_(DECLARE|REGISTER) macros 2021-07-21 11:47:58 +02:00
single_loader.h fih: Hardening of fault injection countermeasures 2023-01-30 09:34:34 -07:00
target.h zephyr: Switch to using FIXED_PARTITION_ macros 2022-09-08 12:44:58 +02:00