Conversation
| wallet sign message <message> | ||
| </pre> | ||
|
|
||
| A conforming implementation MUST: |
There was a problem hiding this comment.
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.
thank you Roman. I'll rewrite it.
There was a problem hiding this comment.
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.
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.
thank you @ixje I'm rewriting the proposal. It will be uploaded next weak.
There was a problem hiding this comment.
My data Idea:
NetworkMagic (GetSignData already added) + Ocode.RET + 4 bytes for ValidUntilBlock + 4/8 bytes for nonce + message
This allow:
- Avoid to use the message as script because the first RET and transaction wrapper.
- Refuse a signature if the block was reached.
- Refuse a signature if it's the wrong network.
|
Wallets do no work this way. Wallets sign the thing described in the proposal. It's not new, it just tries to outline things that are known for years, de facto standard. |
|
I believe the message signature should always be verifiable and should not include a |
Abstract message is not a transaction, these things are out of scope to me. It's message and its interpretation that matters wrt this. The main thing this standard tries to do is to avoid signing a valid transaction. |
But if we include the blockchain protection (using |
Add message singing proposal