Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for non-UTF8 message signature #6

Merged

Conversation

hardsetting
Copy link

@hardsetting hardsetting commented Feb 10, 2024

Description

Added support for non-UTF8 messages (aka raw messages).

Changes and tests are in separate commits for ease of review.

Building on top of LedgerHQ#13
Thanks @vldmkr for the amazing rundown provided here.

  • Anything that is not a transaction or a UTF8 encoded sequence of bytes is considered a raw message.
  • The raw message is displayed in hex format.
  • Due to memory constraints we can only show up to 60 hex characters. Anything longer than that will be considered blind signing.
  • Made sure the nano app builds fine for all devices, and added test cases for the new feature

Bonus fix:

  • It should now be possible to sign messages shorter than 33 bytes

Next steps:

In the future, we can do some work to enable displaying longer messages.
One simple option would be, if the signing message is very long, we can compute the signature ahead of time, so that the memory used to store the signing message can be freed and use for formatting.

@alnoki
Copy link

alnoki commented Feb 12, 2024

@hardsetting thank you for implementing this feature! This will be crucial for enabling key rotation per aptos-labs/aptos-core#11151

@vldmkr vldmkr changed the base branch from develop to feature/sign_raw_msg February 13, 2024 14:33
@vldmkr
Copy link
Member

vldmkr commented Feb 13, 2024

@hardsetting Thank you! Everything looks great to me. Great addition to the current release!

@vldmkr vldmkr merged commit 18f28e4 into pontem-network:feature/sign_raw_msg Feb 13, 2024
31 of 37 checks passed
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.

3 participants