|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
TEST-ONLY platform shims for the tf-psa-crypto software backend. More...
#include <stddef.h>#include <stdint.h>#include "mbedtls/platform_util.h"#include "psa/crypto.h"Go to the source code of this file.
Enumerations | |
| enum | shim_const_t : uint32_t { k_shim_lcg_mul = 1664525U , k_shim_lcg_add = 1013904223U , k_shim_seed = 0x1234ABCDU , k_shim_top_shift = 24U } |
| LCG multiplier (Numerical Recipes) for the deterministic test RNG. More... | |
Functions | |
| 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) |
TEST-ONLY platform shims for the tf-psa-crypto software backend.
The vendored tf-psa-crypto port config enables MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG, so psa_crypto_init needs an external RNG entry point, and (if MBEDTLS_HAVE_TIME is set) an mbedtls_ms_time. This app is a known-answer test whose operations – SHA-256, AES-128-GCM with a fixed nonce, and ECDSA-P256 verify – draw NO randomness, so a deterministic RNG here does not affect the KAT result. It exists only so psa_crypto_init succeeds.
Definition in file psa_kat_shim.c.
| enum shim_const_t : uint32_t |
LCG multiplier (Numerical Recipes) for the deterministic test RNG.
| Enumerator | |
|---|---|
| k_shim_lcg_mul | Shim lcg mul. |
| k_shim_lcg_add | Shim lcg add. |
| k_shim_seed | Shim seed. |
| k_shim_top_shift | Shim top shift. |
Definition at line 32 of file psa_kat_shim.c.
| 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 ) |
Definition at line 39 of file psa_kat_shim.c.
References k_shim_lcg_add, k_shim_lcg_mul, k_shim_seed, and k_shim_top_shift.