100typedef enum : uint8_t {
116typedef enum : uint32_t {
164static_assert(
sizeof(
ra8_rot_trailer_t) == (4U *
sizeof(uint32_t)) +
sizeof(uint32_t) +
167 "ra8_rot_trailer_t must have no implicit padding");
Annotation-attribute framework macros for ra8-firmware.
#define RA8_TEST_HELPER
Mark a symbol as externally-linked but only callable from tests.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
ra8_rot_const_t
Trailer magic / version and the body-length sanity cap.
@ k_ra8_rot_trailer_magic
ASCII "ROT1" – signed-image marker.
@ k_ra8_rot_body_max
Max signable body length (1 MiB cap).
@ k_ra8_rot_version
Trailer format version.
ra8_rot_size_t
Fixed byte-lengths of the cryptographic fields in a signed image.
@ k_ra8_rot_pubkey_bytes
Uncompressed P-256 public key (0x04||X||Y).
@ k_ra8_rot_sig_bytes
ECDSA-P256 raw r||s signature length.
@ k_ra8_rot_digest_bytes
SHA-256 digest length (FIPS 180-4).
ra8_err_t ra8_rot_verify_image(const uint8_t *body, uint32_t body_len, const ra8_rot_trailer_t *trailer)
Authenticate a signed image: SHA-256 + ECDSA-P256, default-deny.
const ra8_rot_trailer_t * ra8_rot_trailer_after(const void *image_base, uint32_t body_len)
Locate the trailer that immediately follows a signed image body.
ra8_err_t ra8_rot_root_public_key(const uint8_t **out_key, uint32_t *out_len)
Expose the provisioned root public key (host / test only).
Authenticity trailer appended after a signed image body.
uint32_t sig_len
Active signature length, bytes.
uint32_t body_len
Body length the digest covers.
uint32_t img_version
Monotonic anti-rollback image ver.
uint8_t sig[k_ra8_rot_sig_bytes]
ECDSA-P256 raw r||s over the digest.
uint32_t version
k_ra8_rot_version (trailer format).
uint32_t magic
k_ra8_rot_trailer_magic.
uint8_t digest[k_ra8_rot_digest_bytes]
SHA-256 of the body (pre-check).