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

Adding Typed Structured Data Hashing and Signing Protocol #2835

Open
Jim8y opened this issue Dec 11, 2022 · 2 comments
Open

Adding Typed Structured Data Hashing and Signing Protocol #2835

Jim8y opened this issue Dec 11, 2022 · 2 comments
Labels
discussion Initial issue state - proposed but not yet accepted

Comments

@Jim8y
Copy link
Contributor

Jim8y commented Dec 11, 2022

Summary or problem description
People need to know what they are signing in readable and verifiable plaintext, instead of hex string.

Do you have any solution you want to propose?
Typed Structured Data Hasing and Signing Protocol is a good one.

Neo Version

  • Neo 3

Where in the software does this update applies to?

  • Other: Neo Proposals
@Jim8y Jim8y added the discussion Initial issue state - proposed but not yet accepted label Dec 11, 2022
@roman-khimov
Copy link
Contributor

This is a very good thing to have, but in Neo context there is a huge barrier to that: transaction's NeoVM script. The fact that we can have Turing-complete code in each and every transaction is a huge and underrated feature of Neo, while at the same time it's a problem for this kind of protocol since you have to deal with VM code and not just (typed) data.

Maybe it can be handled for simple cases like only calling exactly one method of one contract, though. We have invokefunction JSON-RPC and somehow it deals with its (typed, btw) input producing some bytecode to run. Now you need to ensure that there is only one way to turn this input into bytecode (there are lots of ways to PUSH 1 onto the stack) and that can be some base for the thing. But the process itself looks like
https://github.com/neo-project/neo/blob/535aa2057b6ddddb90b2009ef47f8ba16fd3d036/src/Neo/VM/Helper.cs#LL105C11-L105C11
or
https://github.com/nspcc-dev/neo-go/blob/a0117042e8fc1b88b33b854b82e83e42ca6b286b/pkg/services/rpcsrv/params/txBuilder.go#L115
and we're not even considering the inverse VM->structure process for now.

@roman-khimov
Copy link
Contributor

But we may consider moving to neo-project/proposals#68 for this discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Initial issue state - proposed but not yet accepted
Projects
None yet
Development

No branches or pull requests

2 participants