Bitcoin Forum
November 09, 2024, 08:23:41 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: signmessage doesn not work - Address does not refer to key  (Read 389 times)
lmazur (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
March 30, 2018, 09:52:04 PM
 #1

Hello, I am new here.

I am experimenting with a full node, and setup a new node on ubuntu - Core 0.16.0.
I'm running my bitcoind in test-net

I am having an issue running signmessage [key] [message].  Whenever I try to sign a message with my pub key, it shows this error

Steps:

1. bitcoin-cli getnewaddress
--> It produced an address: 2N2yv1XcYfNXR54J7ZJvBxY6ZnmZFbz89tm

2. bitcoin-cli signmessage "2N2yv1XcYfNXR54J7ZJvBxY6ZnmZFbz89tm" "Hello there"

--> Get following error
error code: -3
error message:
Address does not refer to key


This is pretty vanilla functionality - why is this happening and how to address?

Thank you in advance.


LoyceV
Legendary
*
Offline Offline

Activity: 3486
Merit: 17652


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
March 30, 2018, 10:16:03 PM
 #2

--> It produced an address: 2N2yv1XcYfNXR54J7ZJvBxY6ZnmZFbz89tm
Isn't this a testnet SegWit address? You can't sign message from those.

Disclaimer: I've never used Bitcoin Core on the command line, and I've barely used testnet addresses.

▄▄███████████████████▄▄
▄█████████▀█████████████▄
███████████▄▐▀▄██████████
███████▀▀███████▀▀███████
██████▀███▄▄████████████
█████████▐█████████▐█████
█████████▐█████████▐█████
██████████▀███▀███▄██████
████████████████▄▄███████
███████████▄▄▄███████████
█████████████████████████
▀█████▄▄████████████████▀
▀▀███████████████████▀▀
Peach
BTC bitcoin
Buy and Sell
Bitcoin P2P
.
.
▄▄███████▄▄
▄████████
██████▄
▄██
█████████████████▄
▄███████
██████████████▄
███████████████████████
█████████████████████████
████████████████████████
█████████████████████████
▀███████████████████████▀
▀█████████████████████▀
▀██████████████████▀
▀███████████████▀
▀▀███████▀▀

▀▀▀▀███▀▀▀▀
EUROPE | AFRICA
LATIN AMERICA
▄▀▀▀











▀▄▄▄


███████▄█
███████▀
██▄▄▄▄▄░▄▄▄▄▄
████████████▀
▐███████████▌
▐███████████▌
████████████▄
██████████████
███▀███▀▀███▀
.
Download on the
App Store
▀▀▀▄











▄▄▄▀
▄▀▀▀











▀▄▄▄


▄██▄
██████▄
█████████▄
████████████▄
███████████████
████████████▀
█████████▀
██████▀
▀██▀
.
GET IT ON
Google Play
▀▀▀▄











▄▄▄▀
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
March 30, 2018, 10:24:37 PM
 #3

Addresses starting with 2.. are P2SH on tesnet.
So either 1) multisignature or 2) nested segwit.

Since getnewaddress returned this address i assume you use nested segwit and not multisig.
Unfortunately, as LoyceV already mentioned, you can't sign message from those yet.

Thats not because it is not technically achievable, it is due to the missing convention on how to exactly perform this.
This is on the 'to-do list'.

starmyc
Full Member
***
Offline Offline

Activity: 198
Merit: 130

Some random software engineer


View Profile
March 31, 2018, 07:34:28 AM
 #4

This is pretty vanilla functionality - why is this happening and how to address?

Use "legacy" addresses, as stated in other posts:

Code:
 $ bitcoin-cli -testnet getnewaddress "" legacy
mjqWH4b7pjGgLhzMeTxknEH1uiRqvHPrzh

$ bitcoin-cli -testnet signmessage mjqWH4b7pjGgLhzMeTxknEH1uiRqvHPrzh "blablabla"
IPwZKrocIgT2AdUKp3CCSjLUotUuYKNCPUGIaX6tmkspbe/HHq1TAwAJ/ltVZzA3nhfX7gU9KM0XFcO+n2eaCAo=

Hi, I'm just some random software engineer.
You can check my projects: Bitcoin & altcoin balances/addresses listing dumps: https://balances.crypto-nerdz.org/
tumikosha
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile WWW
April 07, 2018, 12:56:08 PM
 #5

I have this problem too. I am trying to proof the ownership of my address via signing the message. Steps to reproduce:
1) I download Bitcoin Core 0.16.0
2) Have started bitcoin-qt.exe
3) Generate new adress: 32iCzcXZefA9j84Q2A7EXPUwRwA6bykQij
4) When i tried to sign message with this adress
it shows an Error:
The entered address does not refer to a key. Please check the address and try again.
How i can sign message and proof my ownership of my address?
What I am doing wrong?
ranochigo
Legendary
*
Offline Offline

Activity: 3038
Merit: 4420


Crypto Swap Exchange


View Profile
April 07, 2018, 01:11:36 PM
Merited by LoyceV (4)
 #6

I have this problem too. I am trying to proof the ownership of my address via signing the message. Steps to reproduce:
1) I download Bitcoin Core 0.16.0
2) Have started bitcoin-qt.exe
3) Generate new adress: 32iCzcXZefA9j84Q2A7EXPUwRwA6bykQij
4) When i tried to sign message with this adress
it shows an Error:
The entered address does not refer to a key. Please check the address and try again.
How i can sign message and proof my ownership of my address?
What I am doing wrong?
Nothing.

Signing message uses a signature and an address to validate. When the message is signed, a private key is used and the public key can be derived from its signature. With P2SH addresses, there isn't a public key for the client to use and it's just a script. You can't sign with P2SH/P2SH-P2WPKH as of now.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
April 07, 2018, 01:46:42 PM
 #7

it shows an Error:
The entered address does not refer to a key. Please check the address and try again.
How i can sign message and proof my ownership of my address?
What I am doing wrong?

Wow. You didn't even read the first reply in this thread?
It is stated, that it is currently not possible to sign messages from P2SH addresses (starting with 3..).

If you are interested in the reason why its currently not possible, you can read the replys to this post: https://github.com/bitcoin/bitcoin/issues/10542

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!