Title: Trouble signing a Bitcoin Message in Bitcoin Core Post by: bitcoinermatt on December 08, 2020, 07:53:01 PM I am learning more and more, I am able to sign PGP messages, I tried signing a Bitcoin message with Bitcoin Core, I have a full node.
I get an error every time I try, the first time I tried, I changed to another address, as the address I was using was SegWit and Bitcoin Core does not support it apparently. I tried using a legacy address (The one that starts with 1) and I got a different error message: The address provided does not match any private key. I tried with a Bech32 address and I got the first error. I guess Legacy is the way to go but why do I get an error? Thanks Title: Re: Trouble signing a Bitcoin Message in Bitcoin Core Post by: Charles-Tim on December 08, 2020, 08:35:02 PM It will be good to move your topic to 'bitcoin technical support', you will get fast and better helpful replies from there.
To sign a message from bitcoin core shouldn't be a problem but it will only sign the address(es) the wallet (your bitcoin core) is generating. I have not used bitcoin core before but it will surely sign the address it generates itself. Title: Re: Trouble signing a Bitcoin Message in Bitcoin Core Post by: hosseinimr93 on December 08, 2020, 08:40:31 PM According to the error message you referred to, you are using an address which your wallet doesn't have its private key.
How did you generate the legacy address? You probably did something wrong when generating the legacy address. For generating a legacy address in bitcoin core, you need to go console and use the following command. Code: getnewaddress "" legacy Title: Re: Trouble signing a Bitcoin Message in Bitcoin Core Post by: BitMaxz on December 08, 2020, 10:43:58 PM Are you sure that the address that you are trying to sign a message is generated from your wallet created from that Bitcoin core?
Or are you trying to sign a message with the address generated from another source or wallet? Check your receiving addresses tab and check if the address you are trying to sign is included on the addresses tab. Or get the private key from bitcoin core and import it to Electrum(As temporary) and make a sign message. Title: Re: Trouble signing a Bitcoin Message in Bitcoin Core Post by: HCP on December 08, 2020, 11:46:51 PM ... Then you are attempting to sign a message using an address for which your wallet does not contain the matching private key.I tried using a legacy address (The one that starts with 1) and I got a different error message: The address provided does not match any private key. Where did this address come from? Did you generate it using your Bitcoin Core wallet? If so, how did you generate this address? ??? If you didn't generate it from your Bitcoin Core wallet, then follow hosseinimr93's advice (https://bitcointalk.org/index.php?topic=5298297.msg55784102#msg55784102) and generate a legacy address from within Bitcoin Core, then sign a message using the newly created legacy address. Or get the private key from bitcoin core and import it to Electrum(As temporary) and make a sign message. That is a terrible idea. Private keys should not be exported/imported without a very good reason (like last ditch attempts at fund recovery etc)... exposing one simply to sign a message is a terrible reason, imo. :-\Title: Re: Trouble signing a Bitcoin Message in Bitcoin Core Post by: Csmiami on December 09, 2020, 01:04:01 AM Sorry to step in onto this conversation; but a couple of weeks ago, we at the local spanish board were starting a thread similar to the "stake your address here" (but in spanish ofc) and were faced with the exact same error message.
In fact, I have just tried to sign a message using my core 0.20.1 wallet and I've got the same exact message. I'd like to think that after all these years I do know how to sign a message, so I really believe there's something that may be going on with the software. I didn't pay it much attention because I only use core as a node, not as a wallet, but now that I see this issue has been brought up.... I'll add that I tried signing a message from an "old" address from the core wallet, and with a new one created with the sole porpuse of signing it. I got the same error in both cases Title: Re: Trouble signing a Bitcoin Message in Bitcoin Core Post by: hosseinimr93 on December 09, 2020, 01:19:44 AM .......so I really believe there's something that may be going on with the software....... The problem is that, bitcoin core only allows you to sign message with legacy addresses while you cannot generate a legacy address using the GUI and you need to use the console. As people usually use the GUI and simply click on "Create new receiving address" button, they get a segwit address and cannot sign message with that. For signing a message with bitcoin core, first you need to generate a legacy address using the command below. Code: getnewaddress "" legacy Or the command below, if you want to label your address. Code: getnewaddress ("Enter the label here" "legacy") |