Bitcoin Forum
July 27, 2024, 06:21:20 PM *
News: Help 1Dq create 15th anniversary forum artwork.
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Type Error: Incorrect padding when verifiying sign message  (Read 662 times)
shorena (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1528


No I dont escrow anymore.


View Profile WWW
February 01, 2016, 10:04:26 AM
 #1

I tried to verify this

-----BEGIN BITCOIN SIGNED MESSAGE-----
This is harizen from bitcointalk.org. Today is February 1,2016.
-----BEGIN BITCOIN SIGNATURE-----
1BzFQocxr7QABTpwGz6o9Dsb6tPpBqbWZ8
HyEuQEIIi5KS0dqyCaIWh6a5A3wIMFqkSEehuNa7jOUZTSyLa08czuASi5RUcj78hPI5PMNec0w6Xhz flMbFNcM
-----END BITCOIN SIGNATURE-----

signed message with electrum 2.5.4. (extracted tar.gz) on debian linux and get the following message in terminal (nor error or other message in the GUI)

Code:
Traceback (most recent call last):
  File "-snip-/Electrum-2.5.4/gui/qt/main_window.py", line 2079, in <lambda>
    b.clicked.connect(lambda: self.do_verify(address_e, message_e, signature_e))
  File "-snip-/Electrum-2.5.4/gui/qt/main_window.py", line 2042, in do_verify
    sig = base64.b64decode(str(signature.toPlainText()))
  File "/usr/lib/python2.7/base64.py", line 76, in b64decode
    raise TypeError(msg)
TypeError: Incorrect padding

Is this a wallet issue?

Im not really here, its just your imagination.
Sharma
Legendary
*
Offline Offline

Activity: 1092
Merit: 1000


GATCOIN : The New Currency Of Digital Marketing


View Profile
February 01, 2016, 10:07:18 AM
 #2

isn't there something wrong with the signature? There seems to be a hidden character, if you copy/paste it in a basic texteditor you'll see an extra space Wink

.
   █████▄▄▄▄
   ████████████▄▄▄            ▀██████
   ███ ▀▀▀▀█████████▄          ▀█████
   ███         ▀▀▀█████▄         ▀███
   ███              ▀▀████▄▄███    ▀▀
   ███                ▀███████▀
   ███                    █████
   ███     ███▄         ▄███████
   ▐██▌     ▀███▄     ▄███▀  ███
   ▐███       ▀███▄▄ ███▀     ███
    ███▌        ▀████        ▐██▌
     ███         ████         ███
      ███      ▄█████▄       ▐██
       ███   ▄████▀ ▀███▄     ▐██
        ███▄████▀     ▀███▄   ███
         █████▀         ▀███▄████
          ██▀             ▀█████▌
                            ▀███▌
  ██████                      ▀▀
  ▀▀▀███
     ███
█         █   ███
 █        ███  ███  █
███       ███   █  ███
███   █   ███   █  ███
███  ███   █       ███
███  ███   █       ███
 █   ███            █
 █    █             █
█         █   ███
 █        ███  ███  █
███       ███   █  ███
███   █   ███   █  ███
███  ███   █       ███
███  ███   █       ███
 █   ███            █
 █    █             █
             JOIN US             
TELEGRAM TWITTER FACEBOOK
LINKEDIN WHITEPAPER
shorena (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1528


No I dont escrow anymore.


View Profile WWW
February 01, 2016, 10:14:46 AM
 #3

isn't there something wrong with the signature? There seems to be a hidden character, if you copy/paste it in a basic texteditor you'll see an extra space Wink

Missed that indeed thanks, blocktrail verified it so I thought it wasnt about the signature.... removed it, but still get the same error.

Other messages like the below verify just fine.

Code:
-----BEGIN BITCOIN SIGNED MESSAGE-----
This is shorena from bitcointalk.org and today is 2015.03.14
or as some of you might write it 03/14/15 pi day 2015
-----BEGIN SIGNATURE-----
18uTXyQubfaYrkbQDdaXhzd2ALEY5YN77B
IFtLgDZCpvfw0DT70RCLcYXj3Dbjf68sc6pj/C+u5K6IC8PIhHE4Y/ldllt1/yhrZpVW/shFRf7rxQYdsW/CcBM=
-----END BITCOIN SIGNED MESSAGE-----

Im not really here, its just your imagination.
Sharma
Legendary
*
Offline Offline

Activity: 1092
Merit: 1000


GATCOIN : The New Currency Of Digital Marketing


View Profile
February 01, 2016, 10:17:29 AM
 #4

I'm running electrum 2.5.4 on windows 7, and i can verify that it's not working for me either (in my previous post, i only saw the hidden character, i didn't try to verify the message, after your last post i tried to verify it, and failed to)

.
   █████▄▄▄▄
   ████████████▄▄▄            ▀██████
   ███ ▀▀▀▀█████████▄          ▀█████
   ███         ▀▀▀█████▄         ▀███
   ███              ▀▀████▄▄███    ▀▀
   ███                ▀███████▀
   ███                    █████
   ███     ███▄         ▄███████
   ▐██▌     ▀███▄     ▄███▀  ███
   ▐███       ▀███▄▄ ███▀     ███
    ███▌        ▀████        ▐██▌
     ███         ████         ███
      ███      ▄█████▄       ▐██
       ███   ▄████▀ ▀███▄     ▐██
        ███▄████▀     ▀███▄   ███
         █████▀         ▀███▄████
          ██▀             ▀█████▌
                            ▀███▌
  ██████                      ▀▀
  ▀▀▀███
     ███
█         █   ███
 █        ███  ███  █
███       ███   █  ███
███   █   ███   █  ███
███  ███   █       ███
███  ███   █       ███
 █   ███            █
 █    █             █
█         █   ███
 █        ███  ███  █
███       ███   █  ███
███   █   ███   █  ███
███  ███   █       ███
███  ███   █       ███
 █   ███            █
 █    █             █
             JOIN US             
TELEGRAM TWITTER FACEBOOK
LINKEDIN WHITEPAPER
nomnomnom
Sr. Member
****
Offline Offline

Activity: 313
Merit: 250



View Profile
February 02, 2016, 08:14:29 AM
 #5

with current electrum from github I get: Wrong signature

But if I add a = at the end of the signature I get: Signature verified.
Maybe somehow the = got missing? Try adding it  Roll Eyes
shorena (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 1498
Merit: 1528


No I dont escrow anymore.


View Profile WWW
February 02, 2016, 09:10:26 AM
 #6

with current electrum from github I get: Wrong signature

But if I add a = at the end of the signature I get: Signature verified.
Maybe somehow the = got missing? Try adding it  Roll Eyes

Indeed

Code:
-----BEGIN BITCOIN SIGNED MESSAGE-----
This is harizen from bitcointalk.org. Today is February 1,2016.
-----BEGIN BITCOIN SIGNATURE-----
1BzFQocxr7QABTpwGz6o9Dsb6tPpBqbWZ8
HyEuQEIIi5KS0dqyCaIWh6a5A3wIMFqkSEehuNa7jOUZTSyLa08czuASi5RUcj78hPI5PMNec0w6XhzflMbFNcM=
-----END BITCOIN SIGNATURE-----

works, so its a blocktrail bug?

Brainwallet copy does verify the message with "=" as well as without.

https://chainquery.com/bitcoin-api/verifymessage reports a proper error without the "="

Code:
{
"result": null,
"error": {
"code": -5,
"message": "Malformed base64 encoding"
},
"id": null
}

Core isnt happy either:

Code:
$ bitcoin-cli verifymessage "1BzFQocxr7QABTpwGz6o9Dsb6tPpBqbWZ8" "HyEuQEIIi5KS0dqyCaIWh6a5A3wIMFqkSEehuNa7jOUZTSyLa08czuASi5RUcj78hPI5PMNec0w6XhzflMbFNcM" "This is harizen from bitcointalk.org. Today is February 1,2016."
error: {"code":-5,"message":"Malformed base64 encoding"}
$ bitcoin-cli verifymessage "1BzFQocxr7QABTpwGz6o9Dsb6tPpBqbWZ8" "HyEuQEIIi5KS0dqyCaIWh6a5A3wIMFqkSEehuNa7jOUZTSyLa08czuASi5RUcj78hPI5PMNec0w6XhzflMbFNcM=" "This is harizen from bitcointalk.org. Today is February 1,2016."
true
$ bitcoin-cli verifymessage "18uTXyQubfaYrkbQDdaXhzd2ALEY5YN77B" "IFtLgDZCpvfw0DT70RCLcYXj3Dbjf68sc6pj/C+u5K6IC8PIhHE4Y/ldllt1/yhrZpVW/shFRf7rxQYdsW/CcBM=" "This is shorena from bitcointalk.org and today is 2015.03.14
> or as some of you might write it 03/14/15 pi day 2015"
true

So if anything its just that electrum has no GUI message for it and blocktrail somehow catches this or has an error somewhere.

Thanks, I will let them know about this.

Im not really here, its just your imagination.
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!