-
Notifications
You must be signed in to change notification settings - Fork 13
Add signing function for non protocol message #429
Conversation
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.
Just one suggestion for the rationale.
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.
Approved, just a minor suggestion.
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.
Looks good to me now.
A non-protocol related message `message` can be signed by the function `signNonProtocolEd25519`. The resulting signature can be verified by `verifyNonProtocolEd25519`. This scheme should be used for the _sign message_ feature in Lisk Desktop. Note that the tag `MESSAGE_TAG_NON_PROTOCOL_MESSAGE` is defined in [LIP 0037](https://github.com/LiskHQ/lips/blob/main/proposals/lip-0037.md#message-tags-1). | ||
|
||
```python | ||
def signNonProtocolEd25519(sk: bytes, message: bytes) -> bytes: |
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.
maybe not necessary to align, but for the SDK we have functions like
signMessageWithPrivateKey
verifyMessageWithPublicKey
so and it's used like ed.signMessageWithPrivateKey
. I would prefer to keep those names
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 see the reason to keep the names in the SDK and it's fine for me. Would be good to haven some comments then. I'm also open to new names for the LIP as I'm not satisfied with them as well. But I didn't have a better idea. But I would like to avoid signMessageWithPrivateKey
as it is really not descriptive.
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.
An alternative could be signOffchainDataEd25519
.
Created corresponding issue on SDK: LiskArchive/lisk-sdk#8775 |
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.
Editorial approval
Fixes #427