skycoin / services

Incubator repo for various services
16 stars 25 forks source link

[Hardware-wallet]: Check signature: how should it work ? #138

Closed mpsido closed 5 years ago

mpsido commented 6 years ago

Suggested scenario: 1- the PC sends a message with a [address signature message] inputs:

skycoin-cli deviceCheckMessageSignature --address=zC8GAQGABfwk7vtTxVoRG7iMperHNuyYPs --message="Hello World!" --signature=GTL6dapi5RLnvsYUQvW9khdn6jhNAF87Jdjm4mYHE9nLhYLtsY8QX6YV5avi9ZjVtycjc7Dw8ExZB6K6cBmTNR6TS

2- the device computes the address that issued the given signature for the given message and sends it back to the PC:

address that issued the signature is: #2EU3JbveHdkxW6z5tdhbbB2kRAWvXC2pLzw

3- the device's screen displays "Signature success" if the address matches the given address "Wrong signature" otherwise

4- the PC has to check the address matching on his side as well

mpsido commented 5 years ago

It is not a really an "issue" but a question about how to format the output of that feature: here is the thing: the check signature function can compute the public address of the issuer of that signature. I can also give that function a public address of the "supposed to be issuer" and ask it to compare with the computed address

The question is just to say: what do we expect from the device : to compute the address of the issuer and let the pc compare. Or return a true/false boolean siganture success or fail