I saw this on the internet

enter image description here

I didn't think signing / verifying was possible with P2SH addresses, so I guess this wallet must be using something like signmessagewithprivkey

Anyway, with signmessagewithprivkey "privkey" "message", privkey is required and doesn't provide a default.

Actual Question

How do I get (see) my private key?

  • 1
    Additionally, this looks like the Trezor interface. From what I recall, they have a non-standard segwit address message signature, which isn't supported or verifiable by other clients. There is some discussion on standardising to Trezor's implementation here: github.com/spesmilo/electrum/issues/3861 Apr 23, 2018 at 0:39
  • @RaghavSood, being able to verify the owner of some funds is very important. When we went to segwit that fell through. I understand, technical reasons, but the business need remains.
    – toddmo
    Apr 23, 2018 at 1:01

1 Answer 1


That depends on what type of P2SH address it is. Only some P2SH script types actually have a one-to-one relationship with a private key. The most common case is probably embedded segwit. If its a P2SH-P2WPKH address, you can retrieve the public key from the embedded P2WPKH script using the dumpprivkey RPC command.

  • lol I never would have guessed that. To me, dump and get are very different. Thank you!
    – toddmo
    Apr 23, 2018 at 0:52
  • Shucks. signmessagewithprivkey worked with P2SH address, but verifymessage still throws an error with the address used in signmessagewithprivkey and the resulting signature. Should I ask another question or is verifymessage just going to be impossible with P2SH?
    – toddmo
    Apr 23, 2018 at 0:58
  • verifymessage tries to use the private key corresponding to the address it is given, but again, P2SH addresses don't always have private keys so it won't work. Unfortunately there is no equivalent of "verifymessagewithprivkey" to my knowledge Apr 23, 2018 at 4:34
  • lol exactly. if I had the private key, I would not have to verify that the owner of the public key can spend the funds. So I don't guess verifymessagewithprivkey would do me any good. Back to the drawing board it is!
    – toddmo
    Apr 23, 2018 at 17:51
  • Sorry I meant "verifymessagewithpubkey" lol, the public key would be required for verification Apr 24, 2018 at 2:10

Your Answer

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

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