Signing Messages with line breaks

When a message is sent to a Trezor to sign, if the message contains just ASCII characters, the Trezor shows it on its screen as a text message. However, I’ve found that with a Trezor Model One, if the text message contains any line breaks (carriage returns), then the device switches into signing binary data mode. The binary data mode is harder to parse and verify for a human than the text representation of that message. Would it be possible for the Trezor to show the line breaks in the message, and still show it to the user as text?

My specific use-case is using ERC4361 (Sign-In With Ethereum). That standard uses the personal_sign message format, using a message formatted with line breaks. The Metamask browser detects messages formatted in this manner and shows them to a user differently than a plain text message. Trezor already detects ERC712-formmatted messages and prompts the user differently for those. Could Trezors detect ERC4361-formmatted messages and show them as individual string values to sign (URI, version, nonce, resources, etc.)?

1 Like