py/bitbox02: add BitBox03 to platform enum and info parsing
What changed, and why it matters
This commit simply teaches the BitBox Python library to recognize a new hardware device model, the BitBox03. It adds the model name to an internal list and tells the library how to interpret the device-info bytes sent by a BitBox03. There is no security fix or vulnerability here—just routine support for a new product variant.
No security action needed. Treat as normal product-support maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change extends the Platform enum and the device-info parsing logic in bitbox_api_protocol.py to include Platform.BITBOX03 (0x03). It also includes the new platform in the branch that maps the edition byte to BitBox02Edition values. The logic is identical to existing BitBox02/BitBox02-plus handling; no cryptographic, access-control, or protocol changes are introduced.
Changed components
py/bitbox02/bitbox02/communication/bitbox_api_protocol.pyInspect captured patch +7 / −2
diff --git a/py/bitbox02/bitbox02/communication/bitbox_api_protocol.py b/py/bitbox02/bitbox02/communication/bitbox_api_protocol.py
index 002c967..04446d7 100644
--- a/py/bitbox02/bitbox02/communication/bitbox_api_protocol.py
+++ b/py/bitbox02/bitbox02/communication/bitbox_api_protocol.py
@@ -203,6 +203,7 @@ class Platform(enum.Enum):
BITBOX02 = "bitbox02"
BITBOX02PLUS = "bitbox02-plus"
+ BITBOX03 = "bitbox03"
class BitBox02Edition(enum.Enum):
@@ -712,11 +713,15 @@ class BitBoxCommonAPI:
version_str = version.rstrip(b"\0").decode("ascii")
platform_byte, response = response[0], response[1:]
- platform = {0x00: Platform.BITBOX02, 0x02: Platform.BITBOX02PLUS}[platform_byte]
+ platform = {
+ 0x00: Platform.BITBOX02,
+ 0x02: Platform.BITBOX02PLUS,
+ 0x03: Platform.BITBOX03,
+ }[platform_byte]
edition_byte, response = response[0], response[1:]
edition: Union[BitBox02Edition]
- if platform in (Platform.BITBOX02, Platform.BITBOX02PLUS):
+ if platform in (Platform.BITBOX02, Platform.BITBOX02PLUS, Platform.BITBOX03):
edition = {0x00: BitBox02Edition.MULTI, 0x01: BitBox02Edition.BTCONLY}[edition_byte]
else:
raise Exception("Unknown platform: {}".format(platform))
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.