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
36
37#include <stddef.h>
38#include <stdint.h>
39
40#include "mbedtls/platform_util.h"
41#include "psa/crypto.h"
42
43psa_status_t mbedtls_psa_external_get_random(mbedtls_psa_external_random_context_t* context,
44 uint8_t* output,
45 size_t output_size,
46 size_t* output_length)
47{
48 (void)context;
49 (void)output;
50 (void)output_size;
51 /* Verify-only bootloader: no operation on the boot path draws randomness. A
52 * request here is an unexpected path -- fail closed rather than emit predictable
53 * bytes. The launch gate treats a crypto failure as default-deny (no launch). */
54 if (output_length != nullptr) {
55 *output_length = 0U;
56 }
57 return PSA_ERROR_INSUFFICIENT_ENTROPY;
58}
59
60#if defined(MBEDTLS_HAVE_TIME) && defined(MBEDTLS_PLATFORM_MS_TIME_ALT)
65mbedtls_ms_time_t mbedtls_ms_time(void)
66{
67 return 0;
68}
69#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).