Post
Topic
Board Electrum
Re: Type Error: Incorrect padding when verifiying sign message
by
shorena
on 02/02/2016, 09:10:26 UTC
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.