ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
psa_verify_rng.c
Go to the documentation of this file.
1
33
34#include <stddef.h>
35#include <stdint.h>
36
37#include "mbedtls/platform_util.h"
38#include "psa/crypto.h"
39
48psa_status_t mbedtls_psa_external_get_random(mbedtls_psa_external_random_context_t* context,
49 uint8_t* output,
50 size_t output_size,
51 size_t* output_length)
52{
53 (void)context;
54 (void)output;
55 (void)output_size;
56 /* Verify-only boot: no operation on the boot path draws randomness. A request
57 * here is an unexpected path -- fail closed rather than emit predictable
58 * bytes. The gate treats a crypto failure as default-deny (no BLXNS). */
59 if (output_length != nullptr) {
60 *output_length = 0U;
61 }
62 return PSA_ERROR_INSUFFICIENT_ENTROPY;
63}
64
65#if defined(MBEDTLS_HAVE_TIME) && defined(MBEDTLS_PLATFORM_MS_TIME_ALT)
70mbedtls_ms_time_t mbedtls_ms_time(void)
71{
72 return 0;
73}
74#endif
psa_status_t mbedtls_psa_external_get_random(mbedtls_psa_external_random_context_t *context, uint8_t *output, size_t output_size, size_t *output_length)
PSA external-RNG hook – fails closed (verification draws no entropy).