Pages:
Author

Topic: Wrong signature on Electrum (Read 338 times)

hero member
Activity: 1358
Merit: 635
December 08, 2019, 03:04:03 AM
#24
why don't people read what was said in other comments before replying Cheesy

the ONLY problem here is the encoding of the signature that when it generates r and s, r is 32 bytes, s is 31 bytes. it doesn't pad s so it ends up with a 64 (1+32+31) byte signature instead of 65 (1+32+(1+31)).

if you change that, the signature becomes valid. try the following and see for yourself:
Code:
IFkS40AxIuRGDN/vnjwavfV6R00h3MKArtDB7tpBbnqIADHOlkhiEJv8JuJTeyVW2Oo23jH9u8fFTqiOms4MM9k=

this is NOT a problem with Electrum, at least not the new versions. i DID test it with my own key and brute forced a signature with a smaller r or s and it DID generate the right signature encoding.

3. the signature I get: IFkS40AxIuRGDN/vnjwavfV6R00h3MKArtDB7tpBbnqIMc6WSGIQm/wm4lN7JVbY6jbeMf27x8VOqI6azgwz2Q==

your signature length is invalid, it should have been 65 bytes but what you posted here is only 64 bytes which means it is missing 1 byte.

this should not have happened, i can't see any bugs that could lead to this either. are you sure that you have not modified the signature yourself?

Right, in fact I have said the same

.. might be some strange combination of characters that mislead Electrum's signer.  

but you are more specific and precise.
legendary
Activity: 3234
Merit: 5637
Blackjack.fun-Free Raffle-Join&Win $50🎲
December 07, 2019, 07:00:59 AM
#23
What version of Electrum you currently using?

I use the latest version of Electrum 3.3.8 downloaded from https://electrum.org/

Can you tell us what version of the electrum you currently use?

Can you tell us why are you repeating the same question on which you already got the answer? The OP clearly states that he is using the latest version of the Electrum downloaded from the official website. The problem, in this case, is not the fake version or version 3.3.4.

BrewMaster has obviously found the problem, maybe it just needs to be explained more simply to OP so he can change what need to be changed.

legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
December 06, 2019, 11:06:09 PM
#22
why don't people read what was said in other comments before replying Cheesy

the ONLY problem here is the encoding of the signature that when it generates r and s, r is 32 bytes, s is 31 bytes. it doesn't pad s so it ends up with a 64 (1+32+31) byte signature instead of 65 (1+32+(1+31)).

if you change that, the signature becomes valid. try the following and see for yourself:
Code:
IFkS40AxIuRGDN/vnjwavfV6R00h3MKArtDB7tpBbnqIADHOlkhiEJv8JuJTeyVW2Oo23jH9u8fFTqiOms4MM9k=

this is NOT a problem with Electrum, at least not the new versions. i DID test it with my own key and brute forced a signature with a smaller r or s and it DID generate the right signature encoding.

3. the signature I get: IFkS40AxIuRGDN/vnjwavfV6R00h3MKArtDB7tpBbnqIMc6WSGIQm/wm4lN7JVbY6jbeMf27x8VOqI6azgwz2Q==

your signature length is invalid, it should have been 65 bytes but what you posted here is only 64 bytes which means it is missing 1 byte.

this should not have happened, i can't see any bugs that could lead to this either. are you sure that you have not modified the signature yourself?
legendary
Activity: 3710
Merit: 1586
December 06, 2019, 06:26:35 PM
#21
note there is no standard for signing messages with bc1 addresses so if you use electrum to generate the signature the challenger also has to use electrum to verify it.



If I remove or change any symbol in the message it gets signed correctly with no problem. But the original message still has an issue.

Can you tell us what version of the electrum you currently use?
This is an old issue of old electrum version lower than 3.3.4 if you can use the latest version of Electrum I tried the message you are trying to sign and verify.
It's all fine to me so maybe you are using old version of Electrum that is why you are having an issue with verifying a signed message.


Yes this is probably it: https://github.com/spesmilo/electrum/pull/5210
legendary
Activity: 2758
Merit: 6830
December 06, 2019, 05:18:35 PM
#20
Probably not the best solution by try signing it with Coinb.in[1]. Optionally run it offline (highly recommended) and in the "Sign" tab, get the address' private key and use it to sign the message. Then verify it with Electrum or BrainWallet.

I'm not sure if it supports bech32 addresses (bc1...) tho.

[1] https://github.com/OutCast3k/coinbin
legendary
Activity: 3472
Merit: 3217
Playbet.io - Crypto Casino and Sportsbook
December 06, 2019, 03:38:52 PM
#19

If I remove or change any symbol in the message it gets signed correctly with no problem. But the original message still has an issue.

Can you tell us what version of the electrum you currently use?
This is an old issue of old electrum version lower than 3.3.4 if you can use the latest version of Electrum I tried the message you are trying to sign and verify.
It's all fine to me so maybe you are using old version of Electrum that is why you are having an issue with verifying a signed message.
hero member
Activity: 1806
Merit: 916
December 06, 2019, 03:36:43 PM
#18
Ok, you can’t verify it on Electrum. But does the message appear as valid when you use it in whatever you are trying to sign it for? (The bounty/bot that gives you the claimed coins, which is what you are trying to do?)

I tried checking on http://brainwalletx.github.io and it also went wrong.  I think it's an error in signing process.
newbie
Activity: 6
Merit: 0
December 06, 2019, 03:36:26 PM
#17
Ok, you can’t verify it on Electrum. But does the message appear as valid when you use it in whatever you are trying to sign it for? (The bounty/bot that gives you the claimed coins, which is what you are trying to do?)

No, it doesn't accept it and says "A valid Bitcoin signature is required!".
But it worked very well with other 2 addresses.
Only this one has such problem.
legendary
Activity: 2758
Merit: 6830
December 06, 2019, 03:29:30 PM
#16
Ok, you can’t verify it on Electrum. But does the message appear as valid when you use it in whatever you are trying to sign it for? (The bounty/bot that gives you the claimed coins, which is what you are trying to do?)
newbie
Activity: 6
Merit: 0
December 06, 2019, 02:03:07 PM
#15
When I sign the message with one of my BTC addresses on Electrum and then verify it on the same wallet it says "wrong signature". The same message signed with other BTC addresses is correct. How to resolve this issue?
The address is native segwit (starts with bc1).


It might be a copy-paste issue.If you have created the message  by some text redactor like WORD and transfer in to Electrum via copy-paste then It might be messed with reserved character. Try to put you message into Electrum by using keyboard.


Thank you for your advice.
I tried to put the message by using keyboard, but it didn't help.
The message is still the same and incorrect.

There is still no common standard to sign from bc1 address... so might be some strange combination of characters that mislead Electrum's signer... could you sign if   HEX string in your message would be removed? 

If I remove or change any symbol in the message it gets signed correctly with no problem. But the original message still has an issue.
newbie
Activity: 6
Merit: 0
December 06, 2019, 01:42:49 PM
#14
There is still no common standard to sign from bc1 address... so might be some strange combination of characters that mislead Electrum's signer... could you sign if   HEX string in your message would be removed? 

There's no problem with message. I signed the same message using my address and everything went well.

-----BEGIN BITCOIN SIGNED MESSAGE-----
Claim_HEX_to_0x3A72cA4d32d272CC02832F4096a40C2c326DfFfb
-----BEGIN SIGNATURE-----
bc1q9yfe07gfytzf200qqg6cm3wkugdmts6tj4myhc
HzeFm8xePVWoN59+HinI04kEzUQONqwWaWMpzzMWkhi7DNhIUkVjSCj5soGp6DkUEVxo8uslcm03kRUKpXV+W3I=
-----END BITCOIN SIGNED MESSAGE-----

Thank you for your advice.
I tried to put the message by using keyboard, but it didn't help.
The message is still the same and incorrect.

As soon as you generate the signature, Electrum allows you to click the verify signature button. Do you still get the "wrong signature" message?

Yes, exactly, it is the case. As soon as I generate the signature, and push "verify" it says "wrong signature"


hero member
Activity: 1806
Merit: 916
December 06, 2019, 01:35:20 PM
#13
There is still no common standard to sign from bc1 address... so might be some strange combination of characters that mislead Electrum's signer... could you sign if   HEX string in your message would be removed? 

There's no problem with message. I signed the same message using my address and everything went well.

-----BEGIN BITCOIN SIGNED MESSAGE-----
Claim_HEX_to_0x3A72cA4d32d272CC02832F4096a40C2c326DfFfb
-----BEGIN SIGNATURE-----
bc1q9yfe07gfytzf200qqg6cm3wkugdmts6tj4myhc
HzeFm8xePVWoN59+HinI04kEzUQONqwWaWMpzzMWkhi7DNhIUkVjSCj5soGp6DkUEVxo8uslcm03kRUKpXV+W3I=
-----END BITCOIN SIGNED MESSAGE-----

Thank you for your advice.
I tried to put the message by using keyboard, but it didn't help.
The message is still the same and incorrect.

As soon as you generate the signature, Electrum allows you to click the verify signature button. Do you still get the "wrong signature" message?

hero member
Activity: 1358
Merit: 635
December 06, 2019, 12:50:09 PM
#12
When I sign the message with one of my BTC addresses on Electrum and then verify it on the same wallet it says "wrong signature". The same message signed with other BTC addresses is correct. How to resolve this issue?
The address is native segwit (starts with bc1).


It might be a copy-paste issue.If you have created the message  by some text redactor like WORD and transfer in to Electrum via copy-paste then It might be messed with reserved character. Try to put you message into Electrum by using keyboard.


Thank you for your advice.
I tried to put the message by using keyboard, but it didn't help.
The message is still the same and incorrect.

There is still no common standard to sign from bc1 address... so might be some strange combination of characters that mislead Electrum's signer... could you sign if   HEX string in your message would be removed? 
newbie
Activity: 6
Merit: 0
December 06, 2019, 11:33:54 AM
#11
When I sign the message with one of my BTC addresses on Electrum and then verify it on the same wallet it says "wrong signature". The same message signed with other BTC addresses is correct. How to resolve this issue?
The address is native segwit (starts with bc1).


It might be a copy-paste issue.If you have created the message  by some text redactor like WORD and transfer in to Electrum via copy-paste then It might be messed with reserved character. Try to put you message into Electrum by using keyboard.


Thank you for your advice.
I tried to put the message by using keyboard, but it didn't help.
The message is still the same and incorrect.
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
December 06, 2019, 09:48:22 AM
#10
It might be a copy-paste issue.If you have created the message  by some text redactor like WORD and transfer in to Electrum via copy-paste then It might be messed with reserved character. Try to put you message into Electrum by using keyboard.

this can not be a copy paste error!
as i said above your comment, the only problem here is in his signature byte length is invalid. and since the signature string is in base64 it could not have happened by accident. since accidental modification of base64 will most probably lead to invalid encoding!
hero member
Activity: 1358
Merit: 635
December 06, 2019, 09:35:36 AM
#9
When I sign the message with one of my BTC addresses on Electrum and then verify it on the same wallet it says "wrong signature". The same message signed with other BTC addresses is correct. How to resolve this issue?
The address is native segwit (starts with bc1).


It might be a copy-paste issue.If you have created the message  by some text redactor like WORD and transfer in to Electrum via copy-paste then It might be messed with reserved character. Try to put you message into Electrum by using keyboard.
legendary
Activity: 2128
Merit: 1293
There is trouble abrewing
December 06, 2019, 09:23:50 AM
#8
3. the signature I get: IFkS40AxIuRGDN/vnjwavfV6R00h3MKArtDB7tpBbnqIMc6WSGIQm/wm4lN7JVbY6jbeMf27x8VOqI6azgwz2Q==

your signature length is invalid, it should have been 65 bytes but what you posted here is only 64 bytes which means it is missing 1 byte.

this should not have happened, i can't see any bugs that could lead to this either. are you sure that you have not modified the signature yourself?
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
December 06, 2019, 08:46:29 AM
#7
Here are more details:
1. The message I try to sign: Claim_HEX_to_0x3A72cA4d32d272CC02832F4096a40C2c326DfFfb
2. the address I use: bc1q63tz9rvlnjxpz39nvueuu49t6m7cygfynj6krw
3. the signature I get: IFkS40AxIuRGDN/vnjwavfV6R00h3MKArtDB7tpBbnqIMc6WSGIQm/wm4lN7JVbY6jbeMf27x8VOqI6azgwz2Q==
"Wrong Signature" at my end, too. Probably bad copy->paste of the signature or message...

Anyways, you can just sign the same message again, it should give you the correct signature.
Electrum will provide the same signature when given the same message, if it's still the same, this must be a bug.
newbie
Activity: 6
Merit: 0
December 06, 2019, 08:23:34 AM
#6
You need to provide more details, I have already signed and checked many messages using Electrum with Legacy and Segwit addresses. Is your sign generated normally? Have you tried to verify this message in another verifier?

Try putting your message / address / sign here so we can test as well.


Here are more details:
1. The message I try to sign: Claim_HEX_to_0x3A72cA4d32d272CC02832F4096a40C2c326DfFfb
2. the address I use: bc1q63tz9rvlnjxpz39nvueuu49t6m7cygfynj6krw
3. the signature I get: IFkS40AxIuRGDN/vnjwavfV6R00h3MKArtDB7tpBbnqIMc6WSGIQm/wm4lN7JVbY6jbeMf27x8VOqI6azgwz2Q==

When I push "Verify the message" it says "Wrong signature".

It works well with all other BTC addresses, but not with this one.
Also, it works well with other messages and with this address.

I use the latest version of Electrum 3.3.8 downloaded from https://electrum.org/

Thank you.
legendary
Activity: 2618
Merit: 6452
Self-proclaimed Genius
December 05, 2019, 10:01:36 PM
#5
I just tried it using the latest version, sign then verify using Electrum and it worked just fine.

Did you mean "using the same address" not wallet?
Because if you tried to verify a messaged signed with a bech32/nested SegWit address to other clients, it will fail to verify.
Pages:
Jump to: