|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Secure-side TRNG read implementation (host PRNG stub). More...
Go to the source code of this file.
Functions | |
| ra8_err_t | priv_ra8_secure_trng_reset (void) |
| Reset the TRNG seed (test-only; production reseeds from RSIP). | |
| ra8_err_t | priv_ra8_secure_trng_read (uint8_t *out, uint32_t len) |
| Fill [out, out+len) with TRNG-quality entropy. | |
Variables | |
| static const char * | s_tag = "SECTRNG" |
Secure-side TRNG read implementation (host PRNG stub).
Host-friendly xorshift64* core. The real RSIP TRNG hookup lands in ; the wrapper interface here is the part the NSC veneer ra8_nsc_trng_read depends on, so the seam is committed now.
Definition in file secure_trng.c.
|
nodiscard |
Fill [out, out+len) with TRNG-quality entropy.
Pulls 8 bytes at a time from the entropy core and copies the needed prefix into out. The caller must ensure out is already a secure buffer – the NSC veneer copies bytes from here back to the NS destination, so the secure-side function itself never touches NS memory.
| [out] | out | Destination buffer (secure scratch). |
| [in] | len | Bytes to fill, 1..k_ra8_secure_trng_max_bytes. |
| k_ra8_ok | Bytes written. |
| k_ra8_err_null_ptr | out was NULL. |
| k_ra8_err_invalid_arg | len zero or above the cap. |
Definition at line 179 of file secure_trng.c.
References k_ra8_err_not_supported, RA8_CHECK_NULL_PTR, and s_tag.
|
nodiscard |
Reset the TRNG seed (test-only; production reseeds from RSIP).
Definition at line 174 of file secure_trng.c.
References k_ra8_err_not_supported.
|
static |
Definition at line 24 of file secure_trng.c.