Skip to content

feat(cardano): Message signing #3509

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

jaskp
Copy link
Contributor

@jaskp jaskp commented Jan 31, 2024

Adds support for arbitrary message signing as per CIP-8.

https://cips.cardano.org/cip/CIP-0008

@jaskp
Copy link
Contributor Author

jaskp commented Feb 11, 2024

Made some changes after feedback from software wallet devs

@jaskp jaskp force-pushed the feat/cardano/message-signing branch 2 times, most recently from bfccf17 to e3c4907 Compare February 13, 2024 13:55
@jaskp
Copy link
Contributor Author

jaskp commented Feb 13, 2024

Heads-up: There are conflicts with main so I'm about to rebase

@jaskp jaskp force-pushed the feat/cardano/message-signing branch from e3c4907 to 8381708 Compare February 13, 2024 16:10
@jaskp
Copy link
Contributor Author

jaskp commented Feb 27, 2024

Heads-up: Rebasing again to fix conflict

@jaskp jaskp force-pushed the feat/cardano/message-signing branch from 8381708 to 8ceefbf Compare February 27, 2024 14:40
@matejcik
Copy link
Contributor

you are adding new texts, so you will now need to convert to translations and update.

  1. rebase on current main
  2. find the newly added strings, convert them to TR.cardano__... symbols
  3. add english texts for those symbols to en.json
  4. run python core/translations/order.py
  5. rebuild the firmware
  6. regenerate fixtures
  7. when that is ready, force-push here and add translations label
  8. wait for CI results

@davidmisiak davidmisiak force-pushed the feat/cardano/message-signing branch from 8ceefbf to b3b317a Compare May 16, 2024 23:20
@davidmisiak davidmisiak requested a review from prusnak as a code owner May 16, 2024 23:20
@matejcik matejcik added the translations Put this label on a PR to run tests in all languages label May 17, 2024
@davidmisiak davidmisiak force-pushed the feat/cardano/message-signing branch from b3b317a to 4bb7871 Compare May 23, 2024 12:22
@davidmisiak
Copy link
Contributor

I've rebased on top of the current main. (neither update_fixtures.py ci nor update_fixtures.py ci --github does anything at this moment)

@davidmisiak
Copy link
Contributor

Hi @matejcik, could we finish also this please?

@davidmisiak
Copy link
Contributor

@matejcik any update please?

@prusnak
Copy link
Member

prusnak commented Nov 15, 2024

Spamming GitHub with comments that add no value is exactly what you do not want to do as a community. It adds lots of noise into all developers' inboxes and we should prefer work on them on code, not reading useless comments.

Locking discussion to collaborators-only.

@trezor trezor locked as spam and limited conversation to collaborators Nov 15, 2024
@trezor trezor deleted a comment from nephix Nov 15, 2024
@trezor trezor deleted a comment from thenic95 Nov 15, 2024
@trezor trezor deleted a comment from InputEndorsers Nov 15, 2024
@trezor trezor deleted a comment from FilipBl4gojevic Nov 15, 2024
@trezor trezor deleted a comment from jterrier84 Nov 15, 2024
@trezor trezor deleted a comment from intertreeJK Nov 15, 2024
@trezor trezor deleted a comment from tobiaswutz Nov 15, 2024
@trezor trezor deleted a comment from pmcorcoran Nov 15, 2024
@gubatron
Copy link

eyes on this please, lots of users can't claim midnight drop because they can't sign messages with their trezor ada wallets

@obrusvit obrusvit added this to the Release 25.09 milestone Aug 18, 2025
Comment on lines +1052 to +1055
if not isinstance(response, m.CardanoMessageSignature):
raise ValueError("Unexpected response")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if not isinstance(response, m.CardanoMessageSignature):
raise ValueError("Unexpected response")
response = m.CardanoMessageSignature.ensure_isinstance(response)

@matejcik
Copy link
Contributor

ACK from me, leaving the rest to @obrusvit

whoever ends up doing the final review, please specifically confirm that we're showing the whole payload to the user; there are remnats in the code for "first chunk" display

@ibz ibz mentioned this pull request Aug 21, 2025
@ibz ibz force-pushed the feat/cardano/message-signing branch from 97619a8 to e0af7d0 Compare August 21, 2025 09:13
@ibz
Copy link
Contributor

ibz commented Aug 21, 2025

whoever ends up doing the final review, please specifically confirm that we're showing the whole payload to the user

I am taking this over.

So your request @matejcik is both fulfilled and unfulfilled at the same time.

Do you think we should raise an error if the data is too long rather than truncating? Or simply not truncate and keep scrolling?

@matejcik
Copy link
Contributor

not truncate, keep scrolling.
we can employ the mechanism for skipping long messages that we came up with for Ethereum; not sure if that was ever implemented or not

@ibz ibz force-pushed the feat/cardano/message-signing branch 2 times, most recently from f0eb138 to 7a07c36 Compare August 21, 2025 15:20
@ibz ibz force-pushed the feat/cardano/message-signing branch from 7a07c36 to 6fb97f0 Compare August 21, 2025 17:25
Copy link
Contributor

@obrusvit obrusvit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
translations Put this label on a PR to run tests in all languages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants