Bitcoin Forum
January 22, 2019, 05:27:28 AM *
News: Latest Bitcoin Core release: 0.17.1 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: signmessage doesn not work - Address does not refer to key  (Read 115 times)
lmazur
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.


1548134848
Hero Member
*
Offline Offline

Posts: 1548134848

View Profile Personal Message (Offline)

Ignore
1548134848
Reply with quote  #2

1548134848
Report to moderator
1548134848
Hero Member
*
Offline Offline

Posts: 1548134848

View Profile Personal Message (Offline)

Ignore
1548134848
Reply with quote  #2

1548134848
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1548134848
Hero Member
*
Offline Offline

Posts: 1548134848

View Profile Personal Message (Offline)

Ignore
1548134848
Reply with quote  #2

1548134848
Report to moderator
1548134848
Hero Member
*
Offline Offline

Posts: 1548134848

View Profile Personal Message (Offline)

Ignore
1548134848
Reply with quote  #2

1548134848
Report to moderator
LoyceV
Legendary
*
Offline Offline

Activity: 1372
Merit: 2655


Self-made Legendary!


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.

bob123
Hero Member
*****
Offline Offline

Activity: 798
Merit: 805



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
Member
**
Offline Offline

Activity: 194
Merit: 86

Software engineer


View Profile WWW
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=

Software engineer.
Tip me if you find my help useful: 3QBRMM2CLUTd7hqL4T9Ja2wy6B1VkbXyZ3
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: 1624
Merit: 1124

Somewhat inactive.


View Profile WWW
April 07, 2018, 01:11:36 PM
 #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.

bob123
Hero Member
*****
Offline Offline

Activity: 798
Merit: 805



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:  

Bitcointalk.org is not available or authorized for sale. Do not believe any fake listings.
Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!