RA Flexible Software Package Documentation
Release v5.6.0
|
|
Functions | |
int | mbedtls_platform_setup (mbedtls_platform_context *ctx) |
void | mbedtls_platform_teardown (mbedtls_platform_context *ctx) |
fsp_err_t | RM_PSA_CRYPTO_TRNG_Read (uint8_t *const p_rngbuf, uint32_t num_req_bytes, uint32_t *p_num_gen_bytes) |
Reads requested length of random data from the TRNG. Generate nbytes of random bytes and store them in p_rngbuf buffer. More... | |
Hardware acceleration for the mbedCrypto implementation of the Arm PSA Crypto API.
Crypto Peripheral version | Devices |
---|---|
SCE9 | RA6M4, RA4M3, RA4M2, RA6M5 |
SCE7 | RA6M3, RA6M2, RA6M1, RA6T1 |
SCE5 | RA4W1, RA4M1 |
SCE5B | RA6T2 |
AES Engine | RA2A1, RA2E1, RA2E2, RA2L1 |
TRNG | RA4E1, RA4E2, RA4T1, RA6E1, RA6E2, RA6T3 |
RSIP-E51A | RA8M1, RA8D1, RA8T1 |
The PSA_Crypto module provides hardware support for the following PSA Crypto operations
Configuration | Options | Default | Description |
---|---|---|---|
Hardware Acceleration | |||
Hardware Acceleration > Key Format | |||
AES | MCU Specific Options | Select AES key formats used | |
ECC | MCU Specific Options | Select ECC key formats used | |
RSA | MCU Specific Options | Select RSA key formats used | |
Hardware Acceleration > Hash | |||
SHA256/224 | MCU Specific Options | Defines MBEDTLS_SHA256_ALT and MBEDTLS_SHA256_PROCESS_ALT. | |
SHA512/384 | MCU Specific Options | Defines MBEDTLS_SHA512_ALT and MBEDTLS_SHA512_PROCESS_ALT. | |
Hardware Acceleration > Cipher | |||
AES | MCU Specific Options | Defines MBEDTLS_AES_ALT, MBEDTLS_AES_SETKEY_ENC_ALT, MBEDTLS_AES_SETKEY_DEC_ALT, MBEDTLS_AES_ENCRYPT_ALT and MBEDTLS_AES_DECRYPT_ALT | |
Hardware Acceleration > Public Key Cryptography (PKC) | |||
Hardware Acceleration > Public Key Cryptography (PKC) > RSA 3072 | |||
RSA 3072 > Key Generation | MCU Specific Options | Enables RSA 3072 Key Generation. | |
RSA 3072 > Signing | MCU Specific Options | Enables RSA 3072 Key Signing. | |
RSA 3072 > Verification | MCU Specific Options | Enables RSA 3072 Verify. | |
Hardware Acceleration > Public Key Cryptography (PKC) > RSA 4096 | |||
RSA 4096 > Key Generation | MCU Specific Options | Enables RSA 4096 Key Generation. | |
RSA 4096 > Signing | MCU Specific Options | Enables RSA 4096 Key Signing. | |
RSA 4096 > Verification | MCU Specific Options | Enables RSA 4096 Verify. | |
ECC | MCU Specific Options | Defines MBEDTLS_ECP_ALT | |
ECDSA | MCU Specific Options | Defines MBEDTLS_ECDSA_SIGN_ALT and MBEDTLS_ECDSA_VERIFY_ALT | |
ECDH | MCU Specific Options | Defines MBEDTLS_ECDH_ALT | |
RSA | MCU Specific Options | Defines MBEDTLS_RSA_ALT. RSA 2048 Key Generation, Signing and Verification are also enabled. | |
TRNG | Enabled | Enabled | Defines MBEDTLS_ENTROPY_HARDWARE_ALT. |
Crypto Engine Initialization | Enabled | Enabled | MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT |
Platform | |||
Platform > Alternate | |||
MBEDTLS_PLATFORM_SETBUF_ALT |
| Undefine | MBEDTLS_PLATFORM_SETBUF_ALT |
MBEDTLS_PLATFORM_EXIT_ALT |
| Undefine | MBEDTLS_PLATFORM_EXIT_ALT |
MBEDTLS_PLATFORM_TIME_ALT |
| Undefine | MBEDTLS_PLATFORM_TIME_ALT |
MBEDTLS_PLATFORM_FPRINTF_ALT |
| Undefine | MBEDTLS_PLATFORM_FPRINTF_ALT |
MBEDTLS_PLATFORM_PRINTF_ALT |
| Undefine | MBEDTLS_PLATFORM_PRINTF_ALT |
MBEDTLS_PLATFORM_SNPRINTF_ALT |
| Undefine | MBEDTLS_PLATFORM_SNPRINTF_ALT |
MBEDTLS_PLATFORM_VSNPRINTF_ALT |
| Undefine | MBEDTLS_PLATFORM_VSNPRINTF_ALT |
MBEDTLS_PLATFORM_NV_SEED_ALT |
| Undefine | MBEDTLS_PLATFORM_NV_SEED_ALT |
MBEDTLS_PLATFORM_MS_TIME_ALT |
| Undefine | MBEDTLS_PLATFORM_MS_TIME_ALT |
MBEDTLS_PLATFORM_ZEROIZE_ALT |
| Undefine | MBEDTLS_PLATFORM_ZEROIZE_ALT |
MBEDTLS_PLATFORM_GMTIME_R_ALT |
| Undefine | MBEDTLS_PLATFORM_GMTIME_R_ALT |
MBEDTLS_HAVE_ASM |
| Undefine | MBEDTLS_HAVE_ASM |
MBEDTLS_NO_UDBL_DIVISION |
| Undefine | MBEDTLS_NO_UDBL_DIVISION |
MBEDTLS_NO_64BIT_MULTIPLICATION |
| Undefine | MBEDTLS_NO_64BIT_MULTIPLICATION |
MBEDTLS_HAVE_SSE2 |
| Undefine | MBEDTLS_HAVE_SSE2 |
MBEDTLS_HAVE_TIME |
| Undefine | MBEDTLS_HAVE_TIME |
MBEDTLS_HAVE_TIME_DATE |
| Undefine | MBEDTLS_HAVE_TIME_DATE |
MBEDTLS_PLATFORM_MEMORY |
| Define | MBEDTLS_PLATFORM_MEMORY |
MBEDTLS_PLATFORM_NO_STD_FUNCTIONS |
| Undefine | MBEDTLS_PLATFORM_NO_STD_FUNCTIONS |
MBEDTLS_TIMING_ALT |
| Undefine | MBEDTLS_TIMING_ALT |
MBEDTLS_NO_PLATFORM_ENTROPY |
| Define | MBEDTLS_NO_PLATFORM_ENTROPY |
MBEDTLS_ENTROPY_C |
| Define | MBEDTLS_ENTROPY_C |
MBEDTLS_PLATFORM_C |
| Define | MBEDTLS_PLATFORM_C |
MBEDTLS_PLATFORM_STD_CALLOC |
| Undefine | MBEDTLS_PLATFORM_STD_CALLOC |
MBEDTLS_PLATFORM_STD_CALLOC value | Manual Entry | calloc | MBEDTLS_PLATFORM_STD_CALLOC value |
MBEDTLS_PLATFORM_STD_FREE |
| Undefine | MBEDTLS_PLATFORM_STD_FREE |
MBEDTLS_PLATFORM_STD_FREE value | Manual Entry | free | MBEDTLS_PLATFORM_STD_FREE value |
MBEDTLS_PLATFORM_STD_SETBUF |
| Undefine | MBEDTLS_PLATFORM_STD_SETBUF |
MBEDTLS_PLATFORM_STD_SETBUF value | Manual Entry | setbuf | MBEDTLS_PLATFORM_STD_SETBUF value |
MBEDTLS_PLATFORM_STD_EXIT |
| Undefine | MBEDTLS_PLATFORM_STD_EXIT |
MBEDTLS_PLATFORM_STD_EXIT value | Manual Entry | exit | MBEDTLS_PLATFORM_STD_EXIT value |
MBEDTLS_PLATFORM_STD_TIME |
| Undefine | MBEDTLS_PLATFORM_STD_TIME |
MBEDTLS_PLATFORM_STD_TIME value | Manual Entry | time | MBEDTLS_PLATFORM_STD_TIME value |
MBEDTLS_PLATFORM_STD_FPRINTF |
| Undefine | MBEDTLS_PLATFORM_STD_FPRINTF |
MBEDTLS_PLATFORM_STD_FPRINTF value | Manual Entry | fprintf | MBEDTLS_PLATFORM_STD_FPRINTF value |
MBEDTLS_PLATFORM_STD_PRINTF |
| Undefine | MBEDTLS_PLATFORM_STD_PRINTF |
MBEDTLS_PLATFORM_STD_PRINTF value | Manual Entry | printf | MBEDTLS_PLATFORM_STD_PRINTF value |
MBEDTLS_PLATFORM_STD_SNPRINTF |
| Undefine | MBEDTLS_PLATFORM_STD_SNPRINTF |
MBEDTLS_PLATFORM_STD_SNPRINTF value | Manual Entry | snprintf | MBEDTLS_PLATFORM_STD_SNPRINTF value |
MBEDTLS_PLATFORM_STD_EXIT_SUCCESS |
| Undefine | MBEDTLS_PLATFORM_STD_EXIT_SUCCESS |
MBEDTLS_PLATFORM_STD_EXIT_SUCCESS value | Manual Entry | 0 | MBEDTLS_PLATFORM_STD_EXIT_SUCCESS value |
MBEDTLS_PLATFORM_STD_EXIT_FAILURE |
| Undefine | MBEDTLS_PLATFORM_STD_EXIT_FAILURE |
MBEDTLS_PLATFORM_STD_EXIT_FAILURE value | Manual Entry | 1 | MBEDTLS_PLATFORM_STD_EXIT_FAILURE value |
MBEDTLS_PLATFORM_STD_NV_SEED_READ |
| Undefine | MBEDTLS_PLATFORM_STD_NV_SEED_READ |
MBEDTLS_PLATFORM_STD_NV_SEED_READ value | Manual Entry | mbedtls_platform_std_nv_seed_read | MBEDTLS_PLATFORM_STD_NV_SEED_READ value |
MBEDTLS_PLATFORM_STD_NV_SEED_WRITE |
| Undefine | MBEDTLS_PLATFORM_STD_NV_SEED_WRITE |
MBEDTLS_PLATFORM_STD_NV_SEED_WRITE value | Manual Entry | mbedtls_platform_std_nv_seed_write | MBEDTLS_PLATFORM_STD_NV_SEED_WRITE value |
MBEDTLS_PLATFORM_STD_NV_SEED_FILE |
| Undefine | MBEDTLS_PLATFORM_STD_NV_SEED_FILE |
MBEDTLS_PLATFORM_STD_NV_SEED_FILE value | Manual Entry | MBEDTLS_PLATFORM_STD_NV_SEED_FILE value | |
MBEDTLS_PLATFORM_CALLOC_MACRO |
| Undefine | MBEDTLS_PLATFORM_CALLOC_MACRO |
MBEDTLS_PLATFORM_CALLOC_MACRO value | Manual Entry | calloc | MBEDTLS_PLATFORM_CALLOC_MACRO value |
MBEDTLS_PLATFORM_FREE_MACRO |
| Undefine | MBEDTLS_PLATFORM_FREE_MACRO |
MBEDTLS_PLATFORM_FREE_MACRO value | Manual Entry | free | MBEDTLS_PLATFORM_FREE_MACRO value |
MBEDTLS_PLATFORM_EXIT_MACRO |
| Undefine | MBEDTLS_PLATFORM_EXIT_MACRO |
MBEDTLS_PLATFORM_EXIT_MACRO value | Manual Entry | exit | MBEDTLS_PLATFORM_EXIT_MACRO value |
MBEDTLS_PLATFORM_SETBUF_MACRO |
| Define | MBEDTLS_PLATFORM_SETBUF_MACRO |
MBEDTLS_PLATFORM_SETBUF_MACRO value | Manual Entry | dummy_setbuf | MBEDTLS_PLATFORM_SETBUF_MACRO value |
MBEDTLS_PLATFORM_TIME_MACRO |
| Undefine | MBEDTLS_PLATFORM_TIME_MACRO |
MBEDTLS_PLATFORM_TIME_MACRO value | Manual Entry | time | MBEDTLS_PLATFORM_TIME_MACRO value |
MBEDTLS_PLATFORM_TIME_TYPE_MACRO |
| Undefine | MBEDTLS_PLATFORM_TIME_TYPE_MACRO |
MBEDTLS_PLATFORM_TIME_TYPE_MACRO value | Manual Entry | time_t | MBEDTLS_PLATFORM_TIME_TYPE_MACRO value |
MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO |
| Undefine | MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO |
MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO value | Manual Entry | int64_t | MBEDTLS_PLATFORM_MS_TIME_TYPE_MACRO value |
MBEDTLS_PRINTF_MS_TIME |
| Undefine | MBEDTLS_PRINTF_MS_TIME |
MBEDTLS_PRINTF_MS_TIME value | Manual Entry | PRId64 | MBEDTLS_PRINTF_MS_TIME value |
MBEDTLS_PLATFORM_FPRINTF_MACRO |
| Undefine | MBEDTLS_PLATFORM_FPRINTF_MACRO |
MBEDTLS_PLATFORM_FPRINTF_MACRO value | Manual Entry | fprintf | MBEDTLS_PLATFORM_FPRINTF_MACRO value |
MBEDTLS_PLATFORM_PRINTF_MACRO |
| Undefine | MBEDTLS_PLATFORM_PRINTF_MACRO |
MBEDTLS_PLATFORM_PRINTF_MACRO value | Manual Entry | printf | MBEDTLS_PLATFORM_PRINTF_MACRO value |
MBEDTLS_PLATFORM_SNPRINTF_MACRO |
| Undefine | MBEDTLS_PLATFORM_SNPRINTF_MACRO |
MBEDTLS_PLATFORM_SNPRINTF_MACRO value | Manual Entry | snprintf | MBEDTLS_PLATFORM_SNPRINTF_MACRO value |
MBEDTLS_PLATFORM_VSNPRINTF_MACRO |
| Undefine | MBEDTLS_PLATFORM_VSNPRINTF_MACRO |
MBEDTLS_PLATFORM_VSNPRINTF_MACRO value | Manual Entry | vsnprintf | MBEDTLS_PLATFORM_VSNPRINTF_MACRO value |
MBEDTLS_PLATFORM_NV_SEED_READ_MACRO |
| Undefine | MBEDTLS_PLATFORM_NV_SEED_READ_MACRO |
MBEDTLS_PLATFORM_NV_SEED_READ_MACRO value | Manual Entry | mbedtls_platform_std_nv_seed_read | MBEDTLS_PLATFORM_NV_SEED_READ_MACRO value |
MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO |
| Undefine | MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO |
MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO value | Manual Entry | mbedtls_platform_std_nv_seed_write | MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO value |
General | |||
MBEDTLS_PSA_CRYPTO_DRIVERS |
| Undefine | MBEDTLS_PSA_CRYPTO_DRIVERS |
MBEDTLS_DEPRECATED_WARNING |
| Undefine | MBEDTLS_DEPRECATED_WARNING |
MBEDTLS_DEPRECATED_REMOVED |
| Define | MBEDTLS_DEPRECATED_REMOVED |
MBEDTLS_CHECK_RETURN_WARNING |
| Undefine | MBEDTLS_CHECK_RETURN_WARNING |
MBEDTLS_ERROR_STRERROR_DUMMY |
| Define | MBEDTLS_ERROR_STRERROR_DUMMY |
MBEDTLS_MEMORY_DEBUG |
| Undefine | MBEDTLS_MEMORY_DEBUG |
MBEDTLS_MEMORY_BACKTRACE |
| Undefine | MBEDTLS_MEMORY_BACKTRACE |
MBEDTLS_PSA_CRYPTO_CLIENT |
| Undefine | MBEDTLS_PSA_CRYPTO_CLIENT |
MBEDTLS_PSA_CRYPTO_SPM |
| Undefine | MBEDTLS_PSA_CRYPTO_SPM |
MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS |
| Undefine | MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS |
MBEDTLS_SELF_TEST |
| Undefine | MBEDTLS_SELF_TEST |
MBEDTLS_THREADING_ALT |
| Define | MBEDTLS_THREADING_ALT |
MBEDTLS_THREADING_PTHREAD |
| Undefine | MBEDTLS_THREADING_PTHREAD |
MBEDTLS_USE_PSA_CRYPTO | Undefine | Undefine | MBEDTLS_USE_PSA_CRYPTO |
MBEDTLS_VERSION_FEATURES |
| Define | MBEDTLS_VERSION_FEATURES |
MBEDTLS_ERROR_C |
| Define | MBEDTLS_ERROR_C |
MBEDTLS_MEMORY_BUFFER_ALLOC_C |
| Undefine | MBEDTLS_MEMORY_BUFFER_ALLOC_C |
MBEDTLS_PSA_CRYPTO_C |
| Define | MBEDTLS_PSA_CRYPTO_C |
MBEDTLS_PSA_CRYPTO_SE_C |
| Undefine | MBEDTLS_PSA_CRYPTO_SE_C |
MBEDTLS_THREADING_C |
| Define | MBEDTLS_THREADING_C |
MBEDTLS_TIMING_C |
| Undefine | MBEDTLS_TIMING_C |
MBEDTLS_VERSION_C |
| Define | MBEDTLS_VERSION_C |
MBEDTLS_MEMORY_ALIGN_MULTIPLE |
| Undefine | MBEDTLS_MEMORY_ALIGN_MULTIPLE |
MBEDTLS_MEMORY_ALIGN_MULTIPLE value | Manual Entry | 4 | MBEDTLS_MEMORY_ALIGN_MULTIPLE value |
MBEDTLS_CHECK_RETURN |
| Define | MBEDTLS_CHECK_RETURN |
MBEDTLS_IGNORE_RETURN |
| Undefine | MBEDTLS_IGNORE_RETURN |
MBEDTLS_PSA_CRYPTO_CONFIG |
| Undefine | MBEDTLS_PSA_CRYPTO_CONFIG |
Cipher | |||
Cipher > Alternate | |||
MBEDTLS_ARIA_ALT |
| Undefine | MBEDTLS_ARIA_ALT |
MBEDTLS_CAMELLIA_ALT |
| Undefine | MBEDTLS_CAMELLIA_ALT |
MBEDTLS_CCM_ALT | MCU Specific Options | MBEDTLS_CCM_ALT | |
MBEDTLS_CHACHA20_ALT |
| Undefine | MBEDTLS_CHACHA20_ALT |
MBEDTLS_CHACHAPOLY_ALT |
| Undefine | MBEDTLS_CHACHAPOLY_ALT |
MBEDTLS_CMAC_ALT | MCU Specific Options | MBEDTLS_CMAC_ALT | |
MBEDTLS_DES_ALT |
| Undefine | MBEDTLS_DES_ALT |
MBEDTLS_GCM_ALT | MCU Specific Options | MBEDTLS_GCM_ALT | |
MBEDTLS_NIST_KW_ALT |
| Undefine | MBEDTLS_NIST_KW_ALT |
MBEDTLS_DES_SETKEY_ALT |
| Undefine | MBEDTLS_DES_SETKEY_ALT |
MBEDTLS_DES_CRYPT_ECB_ALT |
| Undefine | MBEDTLS_DES_CRYPT_ECB_ALT |
MBEDTLS_DES3_CRYPT_ECB_ALT |
| Undefine | MBEDTLS_DES3_CRYPT_ECB_ALT |
Cipher > AES | |||
MBEDTLS_AES_ROM_TABLES |
| Undefine | MBEDTLS_AES_ROM_TABLES |
MBEDTLS_AES_FEWER_TABLES |
| Undefine | MBEDTLS_AES_FEWER_TABLES |
MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH |
| Undefine | MBEDTLS_AES_ONLY_128_BIT_KEY_LENGTH |
MBEDTLS_CAMELLIA_SMALL_MEMORY |
| Undefine | MBEDTLS_CAMELLIA_SMALL_MEMORY |
MBEDTLS_CIPHER_MODE_CBC |
| Define | MBEDTLS_CIPHER_MODE_CBC |
MBEDTLS_CIPHER_MODE_CFB |
| Define | MBEDTLS_CIPHER_MODE_CFB |
MBEDTLS_CIPHER_MODE_CTR |
| Define | MBEDTLS_CIPHER_MODE_CTR |
MBEDTLS_CIPHER_MODE_OFB |
| Undefine | MBEDTLS_CIPHER_MODE_OFB |
MBEDTLS_CIPHER_MODE_XTS |
| Undefine | MBEDTLS_CIPHER_MODE_XTS |
MBEDTLS_CIPHER_NULL_CIPHER |
| Undefine | MBEDTLS_CIPHER_NULL_CIPHER |
MBEDTLS_CIPHER_PADDING_PKCS7 |
| Define | MBEDTLS_CIPHER_PADDING_PKCS7 |
MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS |
| Define | MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS |
MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN |
| Define | MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN |
MBEDTLS_CIPHER_PADDING_ZEROS |
| Define | MBEDTLS_CIPHER_PADDING_ZEROS |
MBEDTLS_AES_C | Define | Define | MBEDTLS_AES_C |
MBEDTLS_BLOCK_CIPHER_NO_DECRYPT |
| Undefine | MBEDTLS_BLOCK_CIPHER_NO_DECRYPT |
MBEDTLS_CAMELLIA_C |
| Undefine | MBEDTLS_CAMELLIA_C |
MBEDTLS_ARIA_C |
| Undefine | MBEDTLS_ARIA_C |
MBEDTLS_CCM_C |
| Define | MBEDTLS_CCM_C |
MBEDTLS_CHACHA20_C |
| Undefine | MBEDTLS_CHACHA20_C |
MBEDTLS_CHACHAPOLY_C |
| Undefine | MBEDTLS_CHACHAPOLY_C |
MBEDTLS_CIPHER_C |
| Define | MBEDTLS_CIPHER_C |
MBEDTLS_DES_C |
| Undefine | MBEDTLS_DES_C |
MBEDTLS_GCM_C |
| Define | MBEDTLS_GCM_C |
MBEDTLS_GCM_LARGE_TABLE |
| Undefine | MBEDTLS_GCM_LARGE_TABLE |
MBEDTLS_NIST_KW_C |
| Undefine | MBEDTLS_NIST_KW_C |
Public Key Cryptography (PKC) | |||
Public Key Cryptography (PKC) > DHM | |||
Public Key Cryptography (PKC) > DHM > Alternate | |||
MBEDTLS_DHM_ALT |
| Undefine | MBEDTLS_DHM_ALT |
MBEDTLS_DHM_C |
| Undefine | MBEDTLS_DHM_C |
Public Key Cryptography (PKC) > ECC | |||
Public Key Cryptography (PKC) > ECC > Alternate | |||
MBEDTLS_ECJPAKE_ALT |
| Undefine | MBEDTLS_ECJPAKE_ALT |
MBEDTLS_ECDSA_GENKEY_ALT |
| Undefine | MBEDTLS_ECDSA_GENKEY_ALT |
MBEDTLS_ECP_INTERNAL_ALT |
| Undefine | MBEDTLS_ECP_INTERNAL_ALT |
MBEDTLS_ECP_RANDOMIZE_JAC_ALT |
| Undefine | MBEDTLS_ECP_RANDOMIZE_JAC_ALT |
MBEDTLS_ECP_ADD_MIXED_ALT |
| Undefine | MBEDTLS_ECP_ADD_MIXED_ALT |
MBEDTLS_ECP_DOUBLE_JAC_ALT |
| Undefine | MBEDTLS_ECP_DOUBLE_JAC_ALT |
MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT |
| Undefine | MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT |
MBEDTLS_ECP_NORMALIZE_JAC_ALT |
| Undefine | MBEDTLS_ECP_NORMALIZE_JAC_ALT |
MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT |
| Undefine | MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT |
MBEDTLS_ECP_RANDOMIZE_MXZ_ALT |
| Undefine | MBEDTLS_ECP_RANDOMIZE_MXZ_ALT |
MBEDTLS_ECP_NORMALIZE_MXZ_ALT |
| Undefine | MBEDTLS_ECP_NORMALIZE_MXZ_ALT |
Public Key Cryptography (PKC) > ECC > Curves | |||
MBEDTLS_ECP_DP_SECP192R1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_SECP192R1_ENABLED |
MBEDTLS_ECP_DP_SECP224R1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_SECP224R1_ENABLED |
MBEDTLS_ECP_DP_SECP256R1_ENABLED |
| Define | MBEDTLS_ECP_DP_SECP256R1_ENABLED |
MBEDTLS_ECP_DP_SECP384R1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_SECP384R1_ENABLED |
MBEDTLS_ECP_DP_SECP521R1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_SECP521R1_ENABLED |
MBEDTLS_ECP_DP_SECP192K1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_SECP192K1_ENABLED |
MBEDTLS_ECP_DP_SECP224K1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_SECP224K1_ENABLED |
MBEDTLS_ECP_DP_SECP256K1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_SECP256K1_ENABLED |
MBEDTLS_ECP_DP_BP256R1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_BP256R1_ENABLED |
MBEDTLS_ECP_DP_BP384R1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_BP384R1_ENABLED |
MBEDTLS_ECP_DP_BP512R1_ENABLED |
| Undefine | MBEDTLS_ECP_DP_BP512R1_ENABLED |
MBEDTLS_ECP_DP_CURVE25519_ENABLED |
| Undefine | MBEDTLS_ECP_DP_CURVE25519_ENABLED |
MBEDTLS_ECP_DP_CURVE448_ENABLED |
| Undefine | MBEDTLS_ECP_DP_CURVE448_ENABLED |
MBEDTLS_ECDH_GEN_PUBLIC_ALT |
| Undefine | MBEDTLS_ECDH_GEN_PUBLIC_ALT |
MBEDTLS_ECDH_COMPUTE_SHARED_ALT |
| Undefine | MBEDTLS_ECDH_COMPUTE_SHARED_ALT |
MBEDTLS_ECP_NO_FALLBACK |
| Undefine | MBEDTLS_ECP_NO_FALLBACK |
MBEDTLS_ECP_NIST_OPTIM |
| Undefine | MBEDTLS_ECP_NIST_OPTIM |
MBEDTLS_ECP_RESTARTABLE |
| Undefine | MBEDTLS_ECP_RESTARTABLE |
MBEDTLS_ECDSA_DETERMINISTIC |
| Undefine | MBEDTLS_ECDSA_DETERMINISTIC |
MBEDTLS_PK_PARSE_EC_COMPRESSED |
| Undefine | MBEDTLS_PK_PARSE_EC_COMPRESSED |
MBEDTLS_PK_PARSE_EC_EXTENDED |
| Undefine | MBEDTLS_PK_PARSE_EC_EXTENDED |
MBEDTLS_ECDH_C |
| Undefine | MBEDTLS_ECDH_C |
MBEDTLS_ECDSA_C |
| Define | MBEDTLS_ECDSA_C |
MBEDTLS_ECP_C |
| Define | MBEDTLS_ECP_C |
MBEDTLS_ECJPAKE_C |
| Undefine | MBEDTLS_ECJPAKE_C |
MBEDTLS_ECP_WINDOW_SIZE |
| Undefine | MBEDTLS_ECP_WINDOW_SIZE |
MBEDTLS_ECP_WINDOW_SIZE value | Manual Entry | 6 | MBEDTLS_ECP_WINDOW_SIZE value |
MBEDTLS_ECP_FIXED_POINT_OPTIM |
| Undefine | MBEDTLS_ECP_FIXED_POINT_OPTIM |
MBEDTLS_ECP_FIXED_POINT_OPTIM value | Manual Entry | 1 | MBEDTLS_ECP_FIXED_POINT_OPTIM value |
MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED |
| Undefine | MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED |
Public Key Cryptography (PKC) > RSA | |||
MBEDTLS_PK_RSA_ALT_SUPPORT |
| Undefine | MBEDTLS_PK_RSA_ALT_SUPPORT |
MBEDTLS_RSA_NO_CRT |
| Define | MBEDTLS_RSA_NO_CRT |
MBEDTLS_RSA_C |
| Define | MBEDTLS_RSA_C |
MBEDTLS_RSA_GEN_KEY_MIN_BITS |
| Undefine | MBEDTLS_RSA_GEN_KEY_MIN_BITS |
MBEDTLS_RSA_GEN_KEY_MIN_BITS value | Manual Entry | 1024 | MBEDTLS_RSA_GEN_KEY_MIN_BITS value |
MBEDTLS_GENPRIME |
| Define | MBEDTLS_GENPRIME |
MBEDTLS_PKCS1_V15 |
| Define | MBEDTLS_PKCS1_V15 |
MBEDTLS_PKCS1_V21 |
| Define | MBEDTLS_PKCS1_V21 |
MBEDTLS_ASN1_PARSE_C |
| Define | MBEDTLS_ASN1_PARSE_C |
MBEDTLS_ASN1_WRITE_C |
| Define | MBEDTLS_ASN1_WRITE_C |
MBEDTLS_BASE64_C |
| Define | MBEDTLS_BASE64_C |
MBEDTLS_BIGNUM_C |
| Define | MBEDTLS_BIGNUM_C |
MBEDTLS_LMS_C |
| Define | MBEDTLS_LMS_C |
MBEDTLS_LMS_PRIVATE |
| Undefine | MBEDTLS_LMS_PRIVATE |
MBEDTLS_OID_C |
| Define | MBEDTLS_OID_C |
MBEDTLS_PEM_PARSE_C |
| Define | MBEDTLS_PEM_PARSE_C |
MBEDTLS_PEM_WRITE_C |
| Define | MBEDTLS_PEM_WRITE_C |
MBEDTLS_PK_C |
| Define | MBEDTLS_PK_C |
MBEDTLS_PK_PARSE_C |
| Define | MBEDTLS_PK_PARSE_C |
MBEDTLS_PK_WRITE_C |
| Define | MBEDTLS_PK_WRITE_C |
MBEDTLS_PKCS5_C |
| Define | MBEDTLS_PKCS5_C |
MBEDTLS_PKCS7_C |
| Undefine | MBEDTLS_PKCS7_C |
MBEDTLS_PKCS12_C |
| Define | MBEDTLS_PKCS12_C |
MBEDTLS_MPI_WINDOW_SIZE |
| Undefine | MBEDTLS_MPI_WINDOW_SIZE |
MBEDTLS_MPI_WINDOW_SIZE value | Manual Entry | 6 | MBEDTLS_MPI_WINDOW_SIZE value |
MBEDTLS_MPI_MAX_SIZE |
| Undefine | MBEDTLS_MPI_MAX_SIZE |
MBEDTLS_MPI_MAX_SIZE value | Manual Entry | 1024 | MBEDTLS_MPI_MAX_SIZE value |
Hash | |||
Hash > Alternate | |||
MBEDTLS_MD5_ALT |
| Undefine | MBEDTLS_MD5_ALT |
MBEDTLS_RIPEMD160_ALT |
| Undefine | MBEDTLS_RIPEMD160_ALT |
MBEDTLS_SHA1_ALT |
| Undefine | MBEDTLS_SHA1_ALT |
MBEDTLS_MD5_PROCESS_ALT |
| Undefine | MBEDTLS_MD5_PROCESS_ALT |
MBEDTLS_RIPEMD160_PROCESS_ALT |
| Undefine | MBEDTLS_RIPEMD160_PROCESS_ALT |
MBEDTLS_SHA1_PROCESS_ALT |
| Undefine | MBEDTLS_SHA1_PROCESS_ALT |
MBEDTLS_SHA256_SMALLER |
| Undefine | MBEDTLS_SHA256_SMALLER |
MBEDTLS_SHA512_SMALLER |
| Undefine | MBEDTLS_SHA512_SMALLER |
MBEDTLS_MD_C |
| Define | MBEDTLS_MD_C |
MBEDTLS_MD5_C |
| Define | MBEDTLS_MD5_C |
MBEDTLS_RIPEMD160_C |
| Undefine | MBEDTLS_RIPEMD160_C |
MBEDTLS_SHA1_C |
| Define | MBEDTLS_SHA1_C |
MBEDTLS_SHA3_C |
| Undefine | MBEDTLS_SHA3_C |
MBEDTLS_SHA224_C |
| Define | MBEDTLS_SHA224_C |
MBEDTLS_SHA256_C |
| Define | MBEDTLS_SHA256_C |
MBEDTLS_SHA384_C |
| Undefine | MBEDTLS_SHA384_C |
MBEDTLS_SHA512_C |
| Undefine | MBEDTLS_SHA512_C |
Message Authentication Code (MAC) | |||
Message Authentication Code (MAC) > Alternate | |||
MBEDTLS_POLY1305_ALT |
| Undefine | MBEDTLS_POLY1305_ALT |
MBEDTLS_CMAC_C |
| Undefine | MBEDTLS_CMAC_C |
MBEDTLS_HKDF_C |
| Define | MBEDTLS_HKDF_C |
MBEDTLS_HMAC_DRBG_C |
| Undefine | MBEDTLS_HMAC_DRBG_C |
MBEDTLS_POLY1305_C |
| Undefine | MBEDTLS_POLY1305_C |
Storage | |||
MBEDTLS_FS_IO |
| Undefine | MBEDTLS_FS_IO |
MBEDTLS_PSA_CRYPTO_STORAGE_C |
| Undefine | MBEDTLS_PSA_CRYPTO_STORAGE_C |
MBEDTLS_PSA_ITS_FILE_C |
| Undefine | MBEDTLS_PSA_ITS_FILE_C |
RNG | |||
MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES |
| Undefine | MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES |
MBEDTLS_ENTROPY_FORCE_SHA256 |
| Undefine | MBEDTLS_ENTROPY_FORCE_SHA256 |
MBEDTLS_ENTROPY_NV_SEED |
| Undefine | MBEDTLS_ENTROPY_NV_SEED |
MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG |
| Undefine | MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG |
MBEDTLS_PSA_INJECT_ENTROPY |
| Undefine | MBEDTLS_PSA_INJECT_ENTROPY |
MBEDTLS_CTR_DRBG_C |
| Define | MBEDTLS_CTR_DRBG_C |
MBEDTLS_CTR_DRBG_C_ALT | Define | Define | MBEDTLS_CTR_DRBG_C_ALT |
MBEDTLS_CTR_DRBG_ENTROPY_LEN |
| Undefine | RNG|MBEDTLS_CTR_DRBG_ENTROPY_LEN |
MBEDTLS_CTR_DRBG_ENTROPY_LEN value | Manual Entry | 48 | RNG value|MBEDTLS_CTR_DRBG_ENTROPY_LEN |
MBEDTLS_CTR_DRBG_RESEED_INTERVAL |
| Undefine | RNG|MBEDTLS_CTR_DRBG_RESEED_INTERVAL |
MBEDTLS_CTR_DRBG_RESEED_INTERVAL value | Manual Entry | 10000 | RNG value|MBEDTLS_CTR_DRBG_RESEED_INTERVAL |
MBEDTLS_CTR_DRBG_MAX_INPUT |
| Undefine | MBEDTLS_CTR_DRBG_MAX_INPUT |
MBEDTLS_CTR_DRBG_MAX_INPUT value | Manual Entry | 256 | MBEDTLS_CTR_DRBG_MAX_INPUT value |
MBEDTLS_CTR_DRBG_MAX_REQUEST |
| Undefine | MBEDTLS_CTR_DRBG_MAX_REQUEST |
MBEDTLS_CTR_DRBG_MAX_REQUEST value | Manual Entry | 1024 | MBEDTLS_CTR_DRBG_MAX_REQUEST value |
MBEDTLS_CTR_DRBG_MAX_SEED_INPUT |
| Undefine | MBEDTLS_CTR_DRBG_MAX_SEED_INPUT |
MBEDTLS_CTR_DRBG_MAX_SEED_INPUT value | Manual Entry | 384 | MBEDTLS_CTR_DRBG_MAX_SEED_INPUT value |
MBEDTLS_CTR_DRBG_USE_128_BIT_KEY |
| Undefine | MBEDTLS_CTR_DRBG_USE_128_BIT_KEY |
MBEDTLS_HMAC_DRBG_RESEED_INTERVAL |
| Undefine | MBEDTLS_HMAC_DRBG_RESEED_INTERVAL |
MBEDTLS_HMAC_DRBG_RESEED_INTERVAL value | Manual Entry | 10000 | MBEDTLS_HMAC_DRBG_RESEED_INTERVAL value |
MBEDTLS_HMAC_DRBG_MAX_INPUT |
| Undefine | MBEDTLS_HMAC_DRBG_MAX_INPUT |
MBEDTLS_HMAC_DRBG_MAX_INPUT value | Manual Entry | 256 | MBEDTLS_HMAC_DRBG_MAX_INPUT value |
MBEDTLS_HMAC_DRBG_MAX_REQUEST |
| Undefine | MBEDTLS_HMAC_DRBG_MAX_REQUEST |
MBEDTLS_HMAC_DRBG_MAX_REQUEST value | Manual Entry | 1024 | MBEDTLS_HMAC_DRBG_MAX_REQUEST value |
MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT |
| Undefine | MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT |
MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT value | Manual Entry | 384 | MBEDTLS_HMAC_DRBG_MAX_SEED_INPUT value |
MBEDTLS_ENTROPY_MAX_SOURCES |
| Undefine | MBEDTLS_ENTROPY_MAX_SOURCES |
MBEDTLS_ENTROPY_MAX_SOURCES value | Manual Entry | 20 | MBEDTLS_ENTROPY_MAX_SOURCES value |
MBEDTLS_ENTROPY_MAX_GATHER |
| Undefine | MBEDTLS_ENTROPY_MAX_GATHER |
MBEDTLS_ENTROPY_MAX_GATHER value | Manual Entry | 128 | MBEDTLS_ENTROPY_MAX_GATHER value |
MBEDTLS_ENTROPY_MIN_HARDWARE |
| Undefine | MBEDTLS_ENTROPY_MIN_HARDWARE |
MBEDTLS_ENTROPY_MIN_HARDWARE value | Manual Entry | 32 | MBEDTLS_ENTROPY_MIN_HARDWARE value |
Key Configuration | |||
MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER |
| Undefine | MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER |
MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS |
| Undefine | MBEDTLS_PSA_CRYPTO_BUILTIN_KEYS |
PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER |
| Undefine | PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER |
MBEDTLS_PSA_KEY_SLOT_COUNT |
| Undefine | MBEDTLS_PSA_KEY_SLOT_COUNT |
MBEDTLS_PSA_KEY_SLOT_COUNT value | Manual Entry | 32 | MBEDTLS_PSA_KEY_SLOT_COUNT value |
HMAC | |||
MBEDTLS_PSA_HMAC_DRBG_MD_TYPE |
| Define | MBEDTLS_PSA_HMAC_DRBG_MD_TYPE |
To enable hardware acceleration for the SHA256/224 calculation, the macro MBEDTLS_SHA256_ALT and MBEDTLS_SHA256_PROCESS_ALT must be defined in the configuration file. By default SHA256 is enabled. SHA256 can be disabled, but SHA512 then needs to be enabled (software version) because the PSA implementation uses it for the entropy accumulator. This can be done using the RA Configuration editor.
To enable hardware acceleration for the AES128/256 operation, the macro MBEDTLS_AES_SETKEY_ENC_ALT, MBEDTLS_AES_SETKEY_DEC_ALT, MBEDTLS_AES_ENCRYPT_ALT and MBEDTLS_AES_DECRYPT_ALT must be defined in the configuration file. By default AES is enabled. AES cannot be disabled because the PSA implementation requires it for the CTR_DRBG random number generator. This can be done using the RA Configuration editor.
To enable hardware acceleration for the ECC Key Generation operation, the macro MBEDTLS_ECP_ALT must be defined in the configuration file. For ECDSA, the macros MBEDTLS_ECDSA_SIGN_ALT and MBEDTLS_ECDSA_VERIFY_ALT must be defined. By default ECC, ECDSA and ECDHE are enabled. To disable ECC, undefine MBEDTLS_ECP_C, MBEDTLS_ECDSA_C and MBEDTLS_ECDH_C. This can be done using the RA Configuration editor.
To enable hardware acceleration for the RSA2048 operation, the macro MBEDTLS_RSA_ALT must be defined in the configuration file. By default RSA is enabled. To disable RSA, undefine MBEDTLS_RSA_C, MBEDTLS_PK_C, MBEDTLS_PK_PARSE_C, MBEDTLS_PK_WRITE_C. This can be done using the RA Configuration editor.
To use the Secure Crypto Engine to generate and use wrapped keys, use PSA_KEY_TYPE_AES_WRAPPED or PSA_KEY_TYPE_ECC_KEY_PAIR_WRAPPED(curve) or PSA_KEY_TYPE_RSA_KEY_PAIR when setting the key type attribute. Setting the key's type attribute using this value will cause the SCE to use wrapped key mode for all operations related to that key. The user can use the export functionality to save the wrapped keys to user ROM and import it later for usage. This mode requires that Wrapped Key functionality for the algorithm is enabled in the project configuration.
Persistent key storage can be enabled by defining MBEDTLS_FS_IO, MBEDTLS_PSA_CRYPTO_STORAGE_C, and MBEDTLS_PSA_ITS_FILE_C. The key lifetime must also be specifed as PSA_KEY_LIFETIME_PERSISTENT. A lower level storage module must be added in the RA Configuration editor and initialized in the code before generating persistent keys. Persistent storage supports the use of plaintext and vendor keys. Refer to the lower level storage module documentation for information on how it should be initialized. To generate a persistent key the key must be assigned a unique id prior to calling generate using the psa_set_key_id api.
To run the mbedCrypto implementation of the PSA Crypto API on the MCU, the macro MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT must be defined in the configuration file. This enables code that will initialize the SCE. Parameter checking (General|MBEDTLS_CHECK_PARAMS) is enabled by default. To reduce code size, disable parameter checking.
To run the mbedCrypto implementation of the PSA Crypto API on the MCU, the macro MBEDTLS_ENTROPY_HARDWARE_ALT must be defined in the configuration file. This enables using the TRNG as an entropy source. None of the other cryptographic operations (even in software only mode) will work without this feature.
mbedtls_platform_setup() must be invoked before using the PSA Crypto API to ensure that the SCE peripheral is initialized.
In general, depending on the mbedCrypto features being used a heap size of 0x1000 to 0x5000 bytes is required. The total allocated heap should be the sum of the heap requirements of the individual algorithms:
Algorithm | Required Heap (bytes) |
---|---|
SHA256/224 | None |
AES | 0x200 |
Hardware ECC | 0x400 |
Software ECC | 0x1800 |
RSA | 0x1500 |
A minimum stack of 0x1000 is required where the module is used. This is either the main stack in a bare metal application or the task stack of the task used for crypto operations.
The MBEDTLS_PLATFORM_SETBUF_MACRO was introduced in mbedTLS 3.2.1 to prevent stdio read/write functions from buffering stream data to reduce the likelihood of key leakage by setting the buffer argument in setbuf() to NULL. FSP uses a dummy_setbuf() function in rm_psa_crypto.c to prevent build errors; since FSP uses LittleFS by default (where the usage of a buffer is mandatory) this function does not perform any action. Setting the cache size in LittleFS to the minimum supported by the Data Flash (4) can minimize but not remove the likelihood of key data leakage. The dummy function can be replaced with a user-defined function by defining a different value for MBEDTLS_PLATFORM_SETBUF_MACRO_value in the FSP configurator.
The SCE9 is used in Compatibility Mode for mbedCrypto acceleration. The crypto capabilities in this mode on the SCE9 are different which results in the below usage limitations with mbedCrypto:
Unlike FSP drivers, PSA Crypto cannot be configured as Non-secure callable in the RA Configurator for a secure project. The reason for this is that in order to achieve the security objective of controlling access to protected keys, both the PSA Crypto code as well as the keys must be placed in the secure region. Since the PSA Crypto API requires access to the keys directly during initialization and later via a key handle, allowing non-secure code to use the API by making it Non-secure callable will require the keys to be stored in non-secure memory.
This section will provide a short explanation of how to add PSA Crypto to a secure project and have it usable by the non-secure project without exposing the keys. In this example the secure project will contain an RSA private key and the non-secure project is expected to be able to perform sign and verify operations using that key.
Non-secure project
For more details on how to add user-code to the Non-secure callable region refer to the "Security Design with Arm TrustZone - IP Protection (R11AN0467EU0100)" Application Note.
This is an example on calculating the SHA256 hash using the PSA Crypto API.
This is an example on using the PSA Crypto API to generate an AES256 key, encrypting and decrypting multi-block data and using PKCS7 padding.
This is an example on using the PSA Crypto API to generate an AES256 key, encrypting and decrypting multi-block data and using PKCS7 padding using AES-CCM.
This is an example on using the PSA Crypto API to generate an AES128 XTS key, encrypting and decrypting multi-block data.
This is an example on using the PSA Crypto API to generate an AES256 key, followed by generation and verification of MAC for random data of known length.
This is an example on using the PSA Crypto API to generate an ECC-P256R1 key, signing and verifying data after hashing it first using SHA256.
This is an example on using the PSA Crypto API to generate an RSA2048 key, encrypting and decrypting multi-block data and using PKCS7 padding.
MBEDTLS_PSA_ASSUME_EXCLUSIVE_BUFFERS macro is disabled by default to handle shared memory in a secure manner. Note that this increases heap memory usage and code size. The macro can be enabled if all buffers passed to any PSA function reside in memory that is accessible only to the PSA function during its execution or if it possible otherwise for the user to conclude that the user buffers passed into PSA are secure from modification. Refer to https://github.com/Mbed-TLS/mbedtls-docs/blob/main/security-advisories/mbedtls-security-advisory-2024-03.md for more details.
psa_import_key() now only accepts RSA keys in the PSA standard formats. Applications that need other formats like: PKCS#8, SubjectPublicKey, PEM can call mbedtls_pk_parse_{public,}key() followed by mbedtls_pk_import_into_psa().
int mbedtls_platform_setup | ( | mbedtls_platform_context * | ctx | ) |
This function initializes the SCE and the TRNG. It must be invoked before the crypto library can be used. This implementation is used if MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT is defined.
Example:
0 | Initialization was successful. |
MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED | SCE Initialization error. |
void mbedtls_platform_teardown | ( | mbedtls_platform_context * | ctx | ) |
This implementation is used if MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT is defined. It is intended to de-initialize any items that were initialized in the mbedtls_platform_setup() function, but currently is only a placeholder function.
Example:
N/A |
fsp_err_t RM_PSA_CRYPTO_TRNG_Read | ( | uint8_t *const | p_rngbuf, |
uint32_t | num_req_bytes, | ||
uint32_t * | p_num_gen_bytes | ||
) |
Reads requested length of random data from the TRNG. Generate nbytes
of random bytes and store them in p_rngbuf
buffer.
FSP_SUCCESS | Random number generation successful |
FSP_ERR_ASSERTION | NULL input parameter(s). |
FSP_ERR_CRYPTO_UNKNOWN | An unknown error occurred. |