Skip to content

Commit 326b119

Browse files
committed
crypto: Remove PSA Crypto API from targets without entropy
An entropy source is required in order to use the PSA Crypto API. The only devices Mbed OS knows are guaranteed by default to have an entropy source are those devices with a TRNG. Don't enable the PSA Crypto API by default for devices that Mbed OS can't know have an entropy source. This avoids run-time errors when an entropy source is not present on these targets. Applications can add their own entropy source by place entropy into their systems, implementing their own NV Seed read and write callbacks, and then enabling the MBEDTLS_ENTROPY_NV_SEED configuration option to notify the PSA Crypto implementation that an entropy source is present and how to use it. See https://os.mbed.com/docs/mbed-os/v5.11/porting/entropy-sources.html for the background on why entropy is fundamental to system security and how to inject entropy into systems that lack an on-board source of entropy.
1 parent a477354 commit 326b119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2439,7 +2439,7 @@
24392439
"macro_name": "CLOCK_SOURCE_USB"
24402440
}
24412441
},
2442-
"macros_add": ["USB_STM_HAL", "USBHOST_OTHER", "MBEDTLS_PSA_CRYPTO_C", "MBEDTLS_ENTROPY_NV_SEED"],
2442+
"macros_add": ["USB_STM_HAL", "USBHOST_OTHER"],
24432443
"device_has_add": [
24442444
"SERIAL_ASYNCH",
24452445
"FLASH",

0 commit comments

Comments
 (0)