signmessage and verifymessage : "Address does not refer to key" #26876

issue tunerji opened this issue on January 12, 2023
  1. tunerji commented at 3:44 AM on January 12, 2023: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    sign and verify message functions not working with (probobaly bech32 type addresse like: "bc1qg0kmtkmgf4angrmcr9wz2fslxjj4jzj95tkg6r".

    I was able to sign using signmessagewithprivkey "privkey" "my message" and the result if it is correct : "H+QaukT8FP/TFh3bchd9oRj00S7rzuxzSXNXH10y4tgkWkYmKFsfFxOs50bo9510ngNhgsUbE1yG7bbldc2qVGY="

    however using signmessage "bc1qg0kmtkmgf4angrmcr9wz2fslxjj4jzj95tkg6r" "my message" and verifymessage "bc1qg0kmtkmgf4angrmcr9wz2fslxjj4jzj95tkg6r" "signature" "my message" examples gives error : "Address does not refer to key"

    Expected behavior Signing and verifying messages using bech32 addresses.

    <!--- What behavior did you expect? -->

    Actual behavior "Address does not refer to key" error

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    To reproduce

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    System information

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

  2. tunerji added the label Bug on Jan 12, 2023
  3. ghost commented at 3:56 AM on January 12, 2023: none

    Related issue: #10542

    Related pull request: https://github.com/bitcoin/bitcoin/pull/24058

  4. MarcoFalke commented at 9:05 AM on January 12, 2023: member
  5. MarcoFalke closed this on Jan 12, 2023

  6. fanquake locked this on Jan 18, 2023
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-29 03:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me