0

When I want to sign a message/file, the wallet (gui/cli/rpc) only asks for the message, so it is impossible to sign it with a subaddress.

When I verify the signature, I must insert the main address. If I insert a subaddress, the wallet cannot verify the signature.

It would useful to be able to send a signed message without linking it to one's account (main address). One could instead use a subaddress, so the receiver would anyway be sure that it was the owner of the subaddress to sign the message, but couldn't link it to the main address.

The uses would be the same that prompted the existence of subaddresses, i.e. to have distinct identities without having multiple wallets.

EDIT

After checking the code, not only it is possible with the cli but also with rpc, just not documented.

The additional parameters for the wallet rpc are:

  • account_index
  • address_index
  • signature_type (string: "spend" or "view")

So it is impossible only with the gui.

1 Answer 1

1

What you're asking for is already possible (with at least the monero-wallet-cli):

[wallet 9xB33F]: help sign
Command usage: 
  sign [<account_index>,<address_index>] [--spend|--view] <filename>

Command description: 
  Sign the contents of a file with the given subaddress (or the main address if not specified)

Replace <account_index>,<address_index> with your subaddress indices.

The one can verify (with the file, subaddress and signature):

[wallet 9xB33F]: help verify
Command usage: 
  verify <filename> <address> <signature>

Command description: 
  Verify a signature on the contents of a file.
2
  • According to official documentation the wallet rpc cannot sign with a subaddress. Checking the code, it is instead possible. It is not documented. I am editing my question to give this information
    – Kzar
    Aug 30, 2022 at 10:19
  • You asked for "(gui/cli/rpc)", I gave you the answer for the CLI. The official RPC docs are often out of date, though this also supports sign/verify with subaddresses.
    – jtgrassie
    Aug 30, 2022 at 14:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.