Commit message · benma's agentfactorysetup: compress constant root keys
Store the 110 root attestation public keys as const compressed SEC1
points instead of writable uncompressed points. Keep every key and its
index unchanged, and document conversion using Python's ecdsa module.
Derive root identifiers from the uncompressed encoding so the host's
identifiers and the single-signature verification added in #2081 are
preserved.
The factory-setup image shrinks from 155,088 to 152,472 bytes, saving
2,616 bytes. RAM usage drops from 203,304 to 196,152 bytes, saving
7,152 bytes by keeping the table out of writable memory.
Together with the earlier changes in this PR, the image shrinks from
195,296 to 152,472 bytes (-42,824, 21.9%), and RAM usage drops from
203,304 to 196,152 bytes (-7,152, 3.5%). These figures exclude the
peripheral and font changes split into #2092.
91/100 · StrongMessage clarity
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Mentions testing or verification✓ Links an issue, advisory, or supporting reference✓ Names security-relevant behavior explicitly
Why it was queuedsigning boundaryupdate trustdefensive validationcryptography-sensitive path
AI analysis · Informational 19/100This commit is a hardening and size-optimization change for the BitBox02 factory-setup firmware. It stores the 110 built-in root attestation public keys in compressed (33-byte) form instead of uncompressed (65-byte) form, and marks the table as read-only (`const`). This shrinks the firmware image by about 2.6 KB and reduces RAM use by about 7 KB. A new helper is added so the device can still compute the same public-key identifiers used by host software, and the existing signature verification behavior is preserved. There is no direct vulnerability being fixed; the main security benefit is making the key table tamper-resistant in RAM because it now lives in read-only memory.