Skip to content

Commit b050a9d

Browse files
authored
Merge pull request #10722 from Patater/auto-enable-psa-entropy-injection
mbed-crypto: Automatically enable entropy injection
2 parents f18e336 + 4feb15c commit b050a9d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

features/mbedtls/platform/inc/platform_mbed.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@
3333
#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbed_default_seed_write
3434
#endif
3535

36+
/* Automatically enable the Mbed Crypto entropy injection API if
37+
* MBEDTLS_ENTROPY_NV_SEED is enabled. WARNING: the current implementation of
38+
* the Mbed Crypto entropy injection API is incompatible with other entropy
39+
* sources. When MBEDTLS_ENTROPY_NV_SEED is used on PSA target, the NV Seed is
40+
* the sole source of entropy and all other entropy sources are ignored. */
41+
#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES
42+
#define MBEDTLS_PSA_INJECT_ENTROPY
43+
3644
#endif // (defined(TARGET_PSA) && defined(MBEDTLS_ENTROPY_NV_SEED))
3745

3846
#if DEVICE_TRNG

0 commit comments

Comments
 (0)