AI-generated analysisPublished automatically and not human-verified. Validated context appears in community notes below.
← Watch feed
Low 47 Bitcoin

bootloader: version stage1 and firmware sighashes

Public commit record

What the developer wrote

Authored by benma's agent

95/100 · Strong
bootloader: version stage1 and firmware sighashes

Subsequent firmware must require the intermediate bootloader upgrade
so that stage1 is installed by stage0 that preserves the signed
firmware area.

Prefix both the stage1 and firmware prehashes with 0x01. Old stage0
skips the new stage1 payload and can boot the old-scheme upgrade
firmware; new stage0 installs it after reboot. The new device verifiers
accept only the new schemes.

Set stage1's monotonic version to 2 for v1.2.3. Build-time embedding
verification uses the legacy stage1 prehash below version 2 and the
prefixed prehash from version 2 onward, preserving support for the
bundled v1.2.2 images.

Keep firmware 56 on the existing scheme and select the new scheme
from version 57 in release tooling. Match the client's empty flash
hash to bootloader v1.2.3 and retain historical firmware hashes.
The image format and signing keys are unchanged.

Bundled binaries still need to be rebuilt and stage1 re-signed before
shipping. This sequence applies to production devices, since
development stage0 skips signature checks.
✓ Descriptive subject✓ Names a concrete action or component✓ Provides detailed explanatory context✓ Explains rationale or failure mode✓ Mentions testing or verification✓ Names security-relevant behavior explicitly
The short version

What changed, and why it matters

This commit changes how the BitBox02 bootloader and firmware compute the cryptographic hash used to verify signed updates. It adds a version byte (0x01) to the data that gets hashed before signatures are checked, starting with bootloader v1.2.3 and firmware version 57. The goal is to make old and new verification schemes distinguishable, so an older, less secure bootloader cannot be tricked into accepting a newer firmware image using the old hash format, and vice versa. The change is defensive: it does not fix a known remote exploit, but it hardens the upgrade chain against potential downgrade or cross-version signature-confusion attacks. Existing signing keys and the overall image format stay the same.

Recommended action

Treat this as a hardening change rather than an emergency fix. Verify that bundled stage1 binaries are rebuilt and re-signed with the new monotonic version and prefixed prehash before shipping, as the commit message notes this is still required. Confirm that release tooling and client libraries are deployed together so users can verify displayed firmware hashes correctly for v1.2.3+ bootloaders and v57+ firmware. Review the upgrade path to ensure old stage0 bootloaders can still install the intermediate bootloader that understands the new scheme.

Security signals we found

01

Adds a domain-separation/version prefix to cryptographic prehashes for firmware and stage1 bootloader signatures.

02

Bumps stage1 monotonic version from 1 to 2 and ties the new prehash to that version.

03

Ties the new firmware prehash to monotonic firmware version 57 while keeping versions <= 56 on the prior scheme.

04

Updates both device C code and host-side Python tooling to remain consistent with the new scheme.

05

Adds unit tests that explicitly reject legacy (unprefixed) stage1 digests and test SHA failure propagation.

06

CHANGELOG frames the change as 'Verify firmware/stage1 with a versioned signature prehash'.

Risk score

Why this scored 47/100

Our methodology →
Potential impact 12/30
Exploitability 8/25
Stealth signal 6/15
Affected reach 10/15
Confidence 7/10
Evidence quality 4/5
Human-validated context

Community notes

Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.

No validated notes yet.

The AI analysis stands alone for now. Submit a note if you can add evidence or important context.