What changed, and why it matters
This commit is a user-interface improvement for Trezor hardware wallets with Caesar-style screens. It adds an information menu (account, derivation path, message size) during message signing/verification and refactors the navigation flow. There is no security vulnerability being fixed; it is a usability enhancement.
No security action required; treat as a normal feature/usability improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change refactors confirm_signverify() in core/src/trezor/ui/layouts/caesar/init.py to use a shared menu component (confirm_with_menu) and adds info items to the context menu. It also updates tests to cover the new flow on all core models. The previous flow used a while/retry loop to show address then message; the new flow shows address with an external menu, then message, with pagination for long messages. No cryptographic, authorization, or input-validation logic is altered.
Changed components
core/src/trezor/ui/layouts/caesar/__init__.pytests/device_tests/bitcoin/test_signmessage.pytests/input_flows.pyInspect captured patch +65 / −31
### core/.changelog.d/+signverify-info.added
@@ -0,0 +1 @@
+[T2B1,T3B1] Show account, derivation path and message size in the context menu when signing or verifying a message.
### core/src/trezor/ui/layouts/caesar/__init__.py
@@ -2349,47 +2349,68 @@ async def confirm_signverify(
account: str | None = None,
chunkify: bool = False,
) -> None:
- br_name = "verify_message" if verify else "sign_message"
+ from trezor.ui.layouts.menu import Menu, cancel_leaf, confirm_with_menu
+
+ if verify:
+ address_title = TR.sign_message__verify_address
+ br_name = "verify_message"
+ else:
+ address_title = TR.sign_message__confirm_address
+ br_name = "sign_message"
+
+ info_items: list[StrPropertyType] = []
+ if account is not None:
+ info_items.append((TR.words__account, account, False))
+ if path is not None:
+ info_items.append((TR.address_details__derivation_path, path, False))
+ info_items.append(
+ (
+ TR.sign_message__message_size,
+ TR.sign_message__bytes_template.format(len(message)),
+ False,
+ )
+ )
+ menu = Menu(
+ [
+ create_info_menu_leaf(TR.buttons__more_info, with_colon(info_items)),
+ cancel_leaf(
+ TR.buttons__cancel,
+ confirm=lambda: trezorui_api.show_mismatch(
+ title=TR.addr_mismatch__mismatch
+ ),
+ ),
+ ]
+ )
+
+ with trezorui_api.confirm_value(
+ title=address_title,
+ value=address,
+ description=None,
+ verb=TR.buttons__continue,
+ chunkify=chunkify,
+ external_menu=True,
+ ) as address_layout:
+ await confirm_with_menu(address_layout, menu, br_name, BR_CODE_OTHER)
with trezorui_api.confirm_value(
title=TR.sign_message__confirm_message,
description=None,
value=message,
- verb=None,
- verb_cancel="^",
hold=not verify,
- chunkify=chunkify,
+ external_menu=True,
) as message_layout:
- # Allowing to go back from the second screen
- while True:
+ if message_layout.page_count() <= LONG_MSG_PAGE_THRESHOLD:
+ await confirm_with_menu(message_layout, menu, br_name, BR_CODE_OTHER)
+ else:
await confirm_blob(
br_name,
- TR.sign_message__confirm_address,
- address,
- verb=TR.buttons__continue,
+ TR.sign_message__confirm_message,
+ message,
br_code=BR_CODE_OTHER,
+ ask_pagination=True,
+ # signing without reading the whole message is held to confirm
+ extra_confirmation_if_not_read=not verify,
)
- try:
- if message_layout.page_count() <= LONG_MSG_PAGE_THRESHOLD:
- await raise_if_not_confirmed(
- message_layout,
- br_name,
- BR_CODE_OTHER,
- )
- else:
- await confirm_blob(
- br_name,
- TR.sign_message__confirm_message,
- message,
- verb=None,
- verb_cancel="^",
- ask_pagination=True,
- extra_confirmation_if_not_read=not verify,
- )
- except ActionCancelled:
- continue
- else:
- break
def error_popup(
### tests/device_tests/bitcoin/test_signmessage.py
@@ -341,7 +341,7 @@ def test_signmessage_long(
assert sig.signature.hex() == signature
-@pytest.mark.models("core", skip=["safe3"], reason="Not implemented")
+@pytest.mark.models("core")
@pytest.mark.parametrize(
"coin_name, path, script_type, no_script_type, address, message, signature", VECTORS
)
### tests/input_flows.py
@@ -503,6 +503,18 @@ def input_flow_bolt(self) -> BRGeneratorType:
self.debug.press_yes()
yield
+ def input_flow_caesar(self) -> BRGeneratorType:
+ yield
+ # show address/message info (visits "More info", skips "Cancel")
+ self.client.ui.visit_menu_items()
+ # cancel signature
+ self.debug.press_left()
+ self.debug.button_actions.navigate_to_menu_item(1)
+ # address mismatch? - "Quit" button aborts the flow
+ self.debug.synchronize_at("Flow")
+ self.debug.press_right()
+ yield
+
def input_flow_delizia(self) -> BRGeneratorType:
yield
# show address/message infoWhy 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.