Skip to content

Key rotation - #323

Merged
mfield4 merged 3 commits into
mainfrom
key-rotation
Nov 7, 2026
Merged

mfield4 merged 3 commits into
mainfrom
key-rotation

Conversation

@mfield4

@mfield4 mfield4 commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Adds support for larger key rotation records

@mfield4
mfield4 force-pushed the key-rotation branch 2 times, most recently from 4ca0e9a to 8acea00 Compare October 30, 2026 00:30
@mfield4
mfield4 marked this pull request as ready for review November 4, 2026 21:29
@mfield4
mfield4 requested review from ckungler and xorptr November 4, 2026 21:59
Define `LIBHOTH_MAX_MAILBOX_SIZE` (6,144 bytes) for targets with larger
mailboxes such as OpenTitan Earlgrey while preserving `LIBHOTH_MAILBOX_SIZE`
(1,024 bytes) for legacy chunked protocols.

Widen `libhoth_hostcmd_exec` request and response buffers to
`LIBHOTH_MAX_MAILBOX_SIZE` using a shared `union` so the stack footprint stays
at 6 KiB, and update `command_raw_host_command` and test mock `CopyResp` to
match.
Widen `LIBHOTH_USB_FIFO_MAX_REQUEST_SIZE` to `LIBHOTH_MAX_MAILBOX_SIZE` so USB
FIFO transfers accept up to 6 KiB payloads.

On spidev, enforce `LIBHOTH_MAX_MAILBOX_SIZE` on non-atomic multi-page writes,
bound atomic `SPI_IOC_MESSAGE(5)` writes to a single 256-byte flash page, clamp
SPI mailbox response reads to the 1 KiB hardware egress mailbox window, and
ensure `buffered_request` is freed on error and device close.
Add `KEY_ROTATION_RECORD_WRITE_COMMIT` (op 12) and dispatch
`libhoth_key_rotation_update` to single-command write-commit when the input
record begins with the OpenTitan signed descriptor magic (`"KRSD"`), while
preserving the legacy initiate/write/commit flow for Haven records.
Comment thread protocol/host_cmd.c Resolved
@mfield4
mfield4 merged commit 5b276d4 into main Nov 7, 2026
11 checks passed
@mfield4
mfield4 deleted the key-rotation branch November 7, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants