Bitcoin Forum
May 05, 2024, 03:12:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin Core 0.20.1 Address does not refer to key when signing message  (Read 75 times)
metallicelmo (OP)
Sr. Member
****
Offline Offline

Activity: 882
Merit: 252



View Profile
December 24, 2020, 11:48:01 AM
 #1

So guys, I've been using Bitcoin Core 0.20.1 and now I had to sign a message to be able to verify an address when buying some BTC.. part of a KYC process.

I have two type of addresses in my wallet. One starting with "3"  and one with "bc1"

I expected the first one not to work since its a sort of legacy address.

When signing with either of them I get the following error "Address does not refer to key (code -3)"

So now it seems that no matter what type of address I create from within that same wallet, none of them are able to sign messages...

Am I missing something or does this function simply not work? It seems Electrum can do it just fine.
1714921935
Hero Member
*
Offline Offline

Posts: 1714921935

View Profile Personal Message (Offline)

Ignore
1714921935
Reply with quote  #2

1714921935
Report to moderator
1714921935
Hero Member
*
Offline Offline

Posts: 1714921935

View Profile Personal Message (Offline)

Ignore
1714921935
Reply with quote  #2

1714921935
Report to moderator
1714921935
Hero Member
*
Offline Offline

Posts: 1714921935

View Profile Personal Message (Offline)

Ignore
1714921935
Reply with quote  #2

1714921935
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
Rath_
aka BitCryptex
Legendary
*
Offline Offline

Activity: 1876
Merit: 3131



View Profile
December 24, 2020, 11:58:59 AM
Merited by ranochigo (1)
 #2

I expected the first one not to work since its a sort of legacy address.

Both are SegWit addresses. A legacy address starts with 1.

Am I missing something or does this function simply not work? It seems Electrum can do it just fine.

This function does not work. A standard of signing messages is currently being worked on. Only Electrum is able to verify its messages signed using SegWit addresses. Either import your private key for that address into Electrum and inform the other party that they will be able to verify your message only using Electrum or use a legacy address instead.
hosseinimr93
Legendary
*
Online Online

Activity: 2394
Merit: 5235



View Profile
December 24, 2020, 01:03:32 PM
 #3

For signing a message in Bitcoin core, you need a legacy address.
And for generating a legacy address in bitcoin core, go to console and use the command below.

Code:
getnewaddress "" legacy

For generating a legacy address that have a label, you can use the command below.

Code:
getnewaddress ("Enter the label here" "legacy")

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
metallicelmo (OP)
Sr. Member
****
Offline Offline

Activity: 882
Merit: 252



View Profile
December 24, 2020, 01:49:24 PM
 #4

I expected the first one not to work since its a sort of legacy address.

Both are SegWit addresses. A legacy address starts with 1.

Am I missing something or does this function simply not work? It seems Electrum can do it just fine.

This function does not work. A standard of signing messages is currently being worked on. Only Electrum is able to verify its messages signed using SegWit addresses. Either import your private key for that address into Electrum and inform the other party that they will be able to verify your message only using Electrum or use a legacy address instead.
Thanks for the info! I'll do it using Electrum then.
metallicelmo (OP)
Sr. Member
****
Offline Offline

Activity: 882
Merit: 252



View Profile
December 24, 2020, 01:49:57 PM
 #5

For signing a message in Bitcoin core, you need a legacy address.
And for generating a legacy address in bitcoin core, go to console and use the command below.

Code:
getnewaddress "" legacy

For generating a legacy address that have a label, you can use the command below.

Code:
getnewaddress ("Enter the label here" "legacy")
Thanks for this info, I'll try and see if that does the trick for now.
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!