367typedef enum : uint16_t {
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_err_t ra8_rsip_hmac_sha256_final(ra8_rsip_hmac_sha256_ctx_t *ctx, uint8_t *mac_out)
Emit the MAC of a streaming HMAC-SHA-256 context.
ra8_err_t ra8_rsip_get_status(uint32_t *out)
Snapshot the STATUS mailbox word.
ra8_err_t ra8_rsip_enter_stop(void)
Park the engine for software-standby entry.
ra8_err_t ra8_rsip_sha256_final(ra8_rsip_sha256_ctx_t *ctx, uint8_t *digest_out)
Emit the digest of a streaming SHA-256 context.
ra8_err_t ra8_rsip_deinit(void)
Power off the RSIP engine.
ra8_err_t ra8_rsip_hmac_sha256_update(ra8_rsip_hmac_sha256_ctx_t *ctx, const uint8_t *data, uint32_t len)
Absorb additional bytes into a streaming HMAC-SHA-256 context.
ra8_rsip_sha_buf_t
Fixed geometry for the incremental SHA / HMAC state.
@ k_ra8_rsip_sha256_state_words
SHA-256 chaining-state words.
@ k_ra8_rsip_sha256_block
SHA-256 message-block byte length.
@ k_ra8_rsip_hmac_inner_pad
RFC 2104 inner-pad fill byte.
@ k_ra8_rsip_hmac_outer_pad
RFC 2104 outer-pad fill byte.
ra8_err_t ra8_rsip_init(const ra8_rsip_config_t *cfg)
Power on the RSIP engine and (optionally) run BIST.
ra8_err_t ra8_rsip_clear_status(uint32_t mask)
Acknowledge ISR bits via write-1-to-clear.
ra8_err_t ra8_rsip_hmac_sha256_init(ra8_rsip_hmac_sha256_ctx_t *ctx, const uint8_t *key, uint32_t key_len)
Initialise a streaming HMAC-SHA-256 context.
ra8_err_t ra8_rsip_sha256_update(ra8_rsip_sha256_ctx_t *ctx, const uint8_t *data, uint32_t len)
Absorb additional bytes into a streaming SHA-256 context.
ra8_err_t ra8_rsip_exit_stop(void)
Re-enable the engine after software-standby exit.
ra8_err_t ra8_rsip_trng_read(uint8_t *buf, uint32_t len)
Drain len bytes from the RSIP true RNG – fail-closed, no backend.
void ra8_rsip_dispatch(void)
Run the attached callback with the current ISR snapshot.
ra8_err_t ra8_rsip_sha256(const uint8_t *msg, uint32_t msg_len, uint8_t *digest)
Compute SHA-256 of an in-memory buffer.
void(* ra8_rsip_event_fn_t)(void *ctx, uint32_t isr)
RSIP interrupt callback.
ra8_err_t ra8_rsip_sha256_init(ra8_rsip_sha256_ctx_t *ctx)
Initialise a streaming SHA-256 context.
ra8_err_t ra8_rsip_attach_handler(ra8_rsip_event_fn_t fn, void *ctx)
Attach a single shared interrupt callback.
Renesas Secure IP (RSIP-E50D) register layout for the RA8D2.
Initial configuration for ra8_rsip_init.
bool run_bist
true -> arm BIST after MSTP release.
Streaming state for incremental HMAC-SHA-256.
ra8_rsip_sha256_ctx_t inner
Running inner-hash state.
uint8_t key_block[k_ra8_rsip_sha256_block]
Prepared 64-byte key block.
uint8_t initialized
1 = ready, 0 = unset.
Streaming state for incremental SHA-256.
uint32_t state[k_ra8_rsip_sha256_state_words]
Chaining words H0..H7.
uint8_t block[k_ra8_rsip_sha256_block]
Partial message block.
uint32_t used
Bytes in block.
uint8_t initialized
1 = ready, 0 = unset.
uint64_t total_bytes
Bytes absorbed so far.