ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_psa_crypto_fake.c File Reference

Off-target crypto primitives for the ra8_psa_crypto facade. More...

#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "ra8_err.h"
#include "ra8_psa_crypto.h"
#include "ra8_psa_crypto_internal.h"
Include dependency graph for ra8_psa_crypto_fake.c:

Go to the source code of this file.

Detailed Description

Off-target crypto primitives for the ra8_psa_crypto facade.

Tag
[Ring 4 / PAL] {World: NS}

Companion translation unit to ra8_psa_crypto.c. When the host unit-test build defines RA8_OFF_TARGET the heavy TF-PSA-Crypto object library is not linked; this file supplies tiny in-memory crypto stand-ins so the public ra8_psa_* surface still behaves:

  • SHA-256 is implemented inline (FIPS 180-4 reference algorithm) so ra8_psa_hash_compute can produce real digests in the test suite.
  • AES-GCM is replaced by a deterministic XOR-and-checksum cipher that exercises the AEAD contract (ciphertext + tag layout, tag tampering detection) without requiring the real AES core.

None of this code is compiled into a firmware image: the whole unit is guarded by RA8_OFF_TARGET and never runs on the target.

Since
0.1.0

Definition in file ra8_psa_crypto_fake.c.