Engineering constraints
A panic in a bootloader is an RMA
A verifier that aborts on malformed input does not fail safe on a device with no console and no operator. It fails into a brick, and a brick is a truck roll, a warranty claim, and in a metering or medical context a reportable event.
So the verifier core has no panicking paths, and that is enforced by the compiler rather than by code review. These lints are denied in the crate root:
// crates/pqverify/src/lib.rs
#![no_std]
#![forbid(unsafe_code)]
#![deny(clippy::unwrap_used, clippy::expect_used,
clippy::indexing_slicing, clippy::panic)]
#![deny(clippy::arithmetic_side_effects, clippy::integer_division,
clippy::unreachable, clippy::todo, clippy::unimplemented,
clippy::as_conversions)]
make lint runs clippy with those denied across all four targets, so the no-panic contract is a build gate, not a convention. If it passes there is no unwrap, no expect, no panic!, no slice index that can run off the end, and no unchecked arithmetic anywhere in the verifier. Every byte range in the parser goes through a single helper built on checked_add and slice::get. overflow-checks is left on in the release profile too, so an arithmetic mistake becomes a returned error rather than a silent wraparound in the field.
There is no alloc either — not “we try not to allocate”, but there is no allocator and no extern crate alloc to reach for. The verifier holds at most two SHA-256 states and a handful of 32-byte values live at once. The one-shot entry points ask the caller for nothing; the streaming entry point — the one meant for hardware, where the image arrives a flash page at a time — takes its working memory from the caller instead: 162 bytes, the same for every parameter set RFC 8554 registers, with the C streaming API additionally taking a chunk buffer of the caller’s chosen size (32 bytes or more). This code does not get to decide how much RAM your product can spare.
What that is, and what it is not
Those lints report zero violations on all four targets. But everything above is a property of the source, checked by the compiler — it is not a measurement of anything on a part. The stack high-water mark has been measured, by the firmware itself, under emulation: 1,568 B on the Cortex-M0+ image and 1,508 B on the Cortex-M4F, for one HSS verification of RFC 8554 Test Case 1. That is a real maximum for that code and input, and it was taken in an emulator rather than on silicon, which is how the measured numbers page labels it. Cycles and energy are not measured at all, on any target.
Two build-harness gates were red on 28 November, for reasons unconnected to the no-panic contract; both have since been fixed and both pass. The red statuses and what happened to them are on that page rather than deleted.