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

SDKs - Provide an arbitrary byte sign/verify #10

Open
barnjamin opened this issue Nov 15, 2021 · 4 comments
Open

SDKs - Provide an arbitrary byte sign/verify #10

barnjamin opened this issue Nov 15, 2021 · 4 comments

Comments

@barnjamin
Copy link
Contributor

At the moment the Sign/Verify bytes functions prepend the domain separator MX prior to signing/checking. This is fine in the case that it is desired but if a user is trying to do something like validate a signature on a transaction for auth purposes it makes the processes awkward and the user has to write their own ED25519 sign/verify functions.

The SDKs should provide some rawsign/rawverify that does not prepend the domain separator.

@barnjamin
Copy link
Contributor Author

This request is often meant to allow a "sign in" in a web3 context. In lieu of arbitrary byte signing maybe something like this arc would be useful

@barnjamin
Copy link
Contributor Author

In fact, maybe this should just validate a transaction rather than arbitrary bytes?

@joe-p
Copy link

joe-p commented Jan 14, 2022

I think a function for arbitrary signing/verifying would be nice. If someone wanted to verify a transaction they could just leverage that. Ideally, I think we should have functions similar to the JavaScript SDKsignBytes and verifyBytes functions that don't make any requirements/assumptions about the "MX" prefix.

In my ideal world:

  • signBytes is deprecated
  • verifyBytes is deprecated
  • signMessage to append bytes with "MX" and sign
  • signRawBytes to sign any arbitrary data
  • verifyRawBytes to verify any arbitrary data

@barnjamin
Copy link
Contributor Author

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

No branches or pull requests

2 participants