Author

Topic: Type Error: Incorrect padding when verifiying sign message (Read 662 times)

copper member
Activity: 1498
Merit: 1499
No I dont escrow anymore.
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.
sr. member
Activity: 313
Merit: 250
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
legendary
Activity: 1092
Merit: 1000
GATCOIN : The New Currency Of Digital Marketing
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)
copper member
Activity: 1498
Merit: 1499
No I dont escrow anymore.
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-----
legendary
Activity: 1092
Merit: 1000
GATCOIN : The New Currency Of Digital Marketing
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
copper member
Activity: 1498
Merit: 1499
No I dont escrow anymore.
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
    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?
Jump to: