21 #ifndef MBEDTLS_TRNG_H
22 #define MBEDTLS_TRNG_H
24 #if !defined(MBEDTLS_CONFIG_FILE)
27 #include MBEDTLS_CONFIG_FILE
30 #if defined(MBEDTLS_TRNG_C)
72 #include "em_device.h"
79 #define MBEDTLS_ERR_TRNG_CONDITIONING_TEST_FAILED ((int)MBEDTLS_ERR_TRNG_BASE | 0x00000001)
82 #define MBEDTLS_ERR_TRNG_NO_DATA ((int)MBEDTLS_ERR_TRNG_BASE | 0x00000002)
90 #define MBEDTLS_ERR_TRNG_REPETITION_COUNT_TEST_FAILED ((int)MBEDTLS_ERR_TRNG_BASE | 0x00000003)
103 #define MBEDTLS_ERR_TRNG_ADAPTIVE_PROPORTION_TEST_64_FAILED ((int)MBEDTLS_ERR_TRNG_BASE | 0x00000004)
116 #define MBEDTLS_ERR_TRNG_ADAPTIVE_PROPORTION_TEST_4096_FAILED ((int)MBEDTLS_ERR_TRNG_BASE | 0x00000005)
128 #define MBEDTLS_ERR_TRNG_NOISE_ALARM ((int)MBEDTLS_ERR_TRNG_BASE | 0x00000006)
140 #define MBEDTLS_ERR_TRNG_PRELIMINARY_NOISE_ALARM ((int)MBEDTLS_ERR_TRNG_BASE | 0x00000007)
257 unsigned char *output,
size_t len,
size_t *olen );
int mbedtls_trng_check_conditioning(mbedtls_trng_context *ctx)
Check the TRNG conditioning function.
Compatibility names (set of defines)
int mbedtls_trng_set_key(mbedtls_trng_context *ctx, const unsigned char *key)
Check the TRNG conditioning function.
int mbedtls_trng_poll(mbedtls_trng_context *ctx, unsigned char *output, size_t len, size_t *olen)
Poll for entropy data.
void mbedtls_trng_soft_reset(mbedtls_trng_context *ctx)
Execute TRNG soft reset.
Silicon Labs specific mbedtls error code definitions.
void mbedtls_trng_init(mbedtls_trng_context *ctx)
Initialize TRNG context.
void mbedtls_trng_free(mbedtls_trng_context *ctx)
Free TRNG context.
int mbedtls_trng_check_entropy(mbedtls_trng_context *ctx)
Check the TRNG entropy source is producing random data.