build(core): firmware_fingerprint.py prints fingerprint of secmon in prodtest case
What changed, and why it matters
This is a small build-tool change that makes a helper script print the correct cryptographic fingerprint for a special 'prodtest' firmware image. It does not change any code that runs on the Trezor device itself, does not introduce any security vulnerability, and is not described by the vendor as a security fix.
No security action required; treat as a normal build-tool improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies python/tools/firmware-fingerprint.py. Previously the script always printed the digest of the parsed firmware image. The change first parses the image, and if it is a VendorFirmware whose embedded code can also be parsed as a SecmonImage, it prints the SecmonImage digest instead; otherwise it falls back to the original behavior. This only affects the diagnostic output of an offline developer/build tool and has no runtime security impact.
Changed components
python/tools/firmware-fingerprint.pyInspect captured patch +14 / −2
diff --git a/python/tools/firmware-fingerprint.py b/python/tools/firmware-fingerprint.py
index bfe4c83f..d841c070 100755
--- a/python/tools/firmware-fingerprint.py
+++ b/python/tools/firmware-fingerprint.py
@@ -33,10 +33,22 @@ def firmware_fingerprint(filename: BinaryIO, output: TextIO) -> None:
orig_err = None
try:
- click.echo(firmware_headers.parse_image(data).digest().hex(), file=output)
- return
+ fw = firmware_headers.parse_image(data)
except Exception as e:
orig_err = e
+ else:
+ if isinstance(fw, firmware_headers.VendorFirmware):
+ try:
+ # try to parse code as secmon
+ # if it succeeds, the image is secmon-only and the fingerprint
+ # relevant for signing is that of the secmon
+ secmon = firmware_headers.SecmonImage.parse(fw.firmware.code)
+ click.echo(secmon.digest().hex(), file=output)
+ return
+ except Exception:
+ pass
+ click.echo(fw.digest().hex(), file=output)
+ return
try:
click.echo(
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.