Authenticity trailer appended after a signed image body.
More...
#include <ra8_rot.h>
Authenticity trailer appended after a signed image body.
Laid out immediately after the body_len image body. Every field is 32-bit aligned. sig_len records the active signature length so the same struct carries a 64-byte ECDSA-P256 signature on target and the 32-byte fake stand-in signature in RA8_OFF_TARGET (the unused tail of sig is ignored). img_version is the monotonic anti-rollback version consumed by ra8_dfu_antirollback.h (downgrade protection).
- Invariant
- magic == k_ra8_rot_trailer_magic for a signed image.
-
version == k_ra8_rot_version for this verifier revision.
-
body_len equals the byte length the digest covers.
-
sig_len <= k_ra8_rot_sig_bytes.
- Note
- img_version IS covered by sig: the ECDSA signature authenticates SHA-256(img_version_le || body_digest) rather than the bare body digest (see ra8_rot_verify_image), so an attacker holding an older validly-signed image cannot raise this field to defeat anti-rollback – the forged version invalidates the signature. The signing tool scripts/secrets/rot_sign.py binds the identical material. digest itself still covers only the body. See ra8_dfu_antirollback.h for the monotonic-counter check.
- See also
- ra8_rot_verify_image
Definition at line 150 of file ra8_rot.h.
◆ body_len
| uint32_t ra8_rot_trailer_t::body_len |
Body length the digest covers.
Definition at line 154 of file ra8_rot.h.
◆ digest
SHA-256 of the body (pre-check).
Definition at line 156 of file ra8_rot.h.
◆ img_version
| uint32_t ra8_rot_trailer_t::img_version |
Monotonic anti-rollback image ver.
Definition at line 153 of file ra8_rot.h.
◆ magic
| uint32_t ra8_rot_trailer_t::magic |
◆ sig
ECDSA-P256 raw r||s over the digest.
Definition at line 157 of file ra8_rot.h.
◆ sig_len
| uint32_t ra8_rot_trailer_t::sig_len |
Active signature length, bytes.
Definition at line 155 of file ra8_rot.h.
◆ version
| uint32_t ra8_rot_trailer_t::version |
The documentation for this struct was generated from the following file: