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

Signature Verification on testnet #9154

Closed
xvlqhiaa opened this issue Feb 6, 2024 · 5 comments
Closed

Signature Verification on testnet #9154

xvlqhiaa opened this issue Feb 6, 2024 · 5 comments

Comments

@xvlqhiaa
Copy link

xvlqhiaa commented Feb 6, 2024

I have a question regarding the signature verification behavior on testnet. I would like to understand whether the signature verification process on the testnet is intentionally lax or if there are specific settings or reasons for this behavior.

For instance, if I change my request data to a faked or even empty signature, rpc still responds with 'good': True.

Is the signature verification process on testnet intentionally less strict compared to mainnet? Is there a monerod or rpc flag I can use to force testnet sig ver to be strict like it would be on mainnet?

Thanks a lot

@plowsof
Copy link
Contributor

plowsof commented Feb 6, 2024

can you confirm if are you doing this in the cli or gui? you are trying to verify a signed message? (there is an open issue about this being not correctly implemented in the gui, or rather, for view only wallets* please confirm)

sorry, you are using this rpc call correct? https://www.getmonero.org/resources/developer-guides/wallet-rpc.html#verify

@plowsof
Copy link
Contributor

plowsof commented Feb 6, 2024

wallet rpc testnet sign/verify works. i use the wallets main address:

curl http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign","params":{"data":"This is sample data to be signed"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signature": "SigV2PECWS3q4j4jCFZqFneMM5KGfmWwgfrg27LF9QdaY6hofPFJQvL7jCJphvW1nfkv34BD3yp7gh4LMjS7GAPQjpPjF"
  }
}
curl http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"verify","params":{"data":"This is sample data to be signed","address":"A2JaqzYKf75MS17Ast12NhejooK6d29wRF6kvwqvxvUUT68BkSnBY57XAgqibjgQPyVM9TyT8RsFn1FXEsPcZE64LonF1iK","signature":"SigV2PECWS3q4j4jCFZqFneMM5KGfmWwgfrg27LF9QdaY6hofPFJQvL7jCJphvW1nfkv34BD3yp7gh4LMjS7GAPQjpPjF"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": true,
    "old": false,
    "signature_type": "spend",
    "version": 2
  }
}
curl http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"verify","params":{"data":"This is sample data to be signed","address":"A2JaqzYKf75MS17Ast12NhejooK6d29wRF6kvwqvxvUUT68BkSnBY57XAgqibjgQPyVM9TyT8RsFn1FXEsPcZE64LonF1iK","signature":"BADigV2PECWS3q4j4jCFZqFneMM5KGfmWwgfrg27LF9QdaY6hofPFJQvL7jCJphvW1nfkv34BD3yp7gh4LMjS7GAPQjpPjF"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "good": false,
    "old": false,
    "signature_type": "spend",
    "version": 0
  }
}

@xvlqhiaa
Copy link
Author

xvlqhiaa commented Feb 7, 2024

Resolved. Thanks a lot.

@xvlqhiaa xvlqhiaa closed this as completed Feb 7, 2024
@plowsof
Copy link
Contributor

plowsof commented Feb 7, 2024

Paste the request data you used to obtain a good: true response

@xvlqhiaa
Copy link
Author

xvlqhiaa commented Feb 7, 2024

Sorry, I've already replaced it with the above. It was most likely just incorrect params placement. But seems to work well now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants