-
Notifications
You must be signed in to change notification settings - Fork 118
NEP-message-signing #213
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
base: master
Are you sure you want to change the base?
NEP-message-signing #213
Conversation
| wallet sign message <message> | ||
| </pre> | ||
|
|
||
| A conforming implementation MUST: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standard is written in a way that ensures there is a single implementation. NEPs shouldn't specify CLI commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you Roman. I'll rewrite it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to add that it be described in a language agnostic way. I see a lot of C# code in there
| That is: | ||
|
|
||
| * 4 bytes: `networkMagic` in little-endian. | ||
| * Followed by 32 bytes: the serialized `hash` (`UInt256`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why UInt256 got involved here.
Can't we just say something along the lines of
The data to be signed using secp256r1 is a byte array consisting of; a + b where
ais the networkMagic encoded as a 32-bit little-endian unsigned integerbis thesha256(sha256(payload))digest wherepayloadis formatted as described in<section xyz>
All these C# code references from the neo project make no sense for other languages and should be irrelevant for a specification.
Instead, I would suggest to add a section with test vectors so implementers can verify their implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @ixje I'm rewriting the proposal. It will be uploaded next weak.
Add message singing proposal