Skip to content

api/firmware: reset sessions on connect - #187

Open
benma-agent wants to merge 1 commit into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/reset-session
Open

benma-agent wants to merge 1 commit into
BitBoxSwiss:masterfrom
benma-agent:benma-agent/reset-session

Conversation

@benma-agent

@benma-agent benma-agent commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Disconnecting after an intermediate signing response leaves the firmware
waiting for a continuation while the device stays powered. On reconnect,
the old workflow consumes the first attestation request and returns an
encrypted error, causing the attestation check to fail.

Send HWW_REQ_RESET (0x03) after version discovery and before attestation,
unlock, and Noise pairing on firmware v9.28.0 or newer. Keep the helper
private, retry BUSY responses once per second, and require an ACK without
a payload. Older firmware keeps its existing connection flow.

Add a simulator regression that disconnects with signing unfinished,
reconnects to the same running process, checks the real attestation
response, pairs, and reads the root fingerprint. Older simulator versions
exercise ordinary reconnects. The regression uses the locally built
v9.28.0 C simulator and fails if the reset call is disabled.

Firmware counterpart: BitBoxSwiss/bitbox02-firmware#2111

Related client PRs in this change:

Disconnecting after an intermediate signing response leaves the firmware
waiting for a continuation while the device stays powered. On reconnect,
the old workflow consumes the first attestation request and returns an
encrypted error, causing the attestation check to fail.

Send HWW_REQ_RESET (0x03) after version discovery and before attestation,
unlock, and Noise pairing on firmware v9.28.0 or newer. Keep the helper
private, retry BUSY responses once per second, and require an ACK without
a payload. Older firmware keeps its existing connection flow.

Add a simulator regression that disconnects with signing unfinished,
reconnects to the same running process, checks the real attestation
response, pairs, and reads the root fingerprint. Older simulator versions
exercise ordinary reconnects. The regression uses the locally built
v9.28.0 C simulator and fails if the reset call is disabled.

Firmware counterpart: BitBoxSwiss/bitbox02-firmware#2111
@benma
benma requested review from bznein and cedwies and removed request for cedwies September 17, 2026 14:30
@benma
benma marked this pull request as ready for review September 17, 2026 14:30
@cedwies
cedwies requested review from cedwies and removed request for bznein September 21, 2026 10:32

@cedwies cedwies left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

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