Bitcoin Forum

Bitcoin => Electrum => Topic started by: QlooQl on January 26, 2018, 03:15:13 PM



Title: Electrum 3.0.5 Encrypted Message Error non-hexadecimal number
Post by: QlooQl on January 26, 2018, 03:15:13 PM
I'm using Electrum 3.0.5 and when I try to encrypt a message I get the following error:

non-hexadecimal number found in fromhex() arg at position 0

I'm using my public key (not my address) and all my message says is hello

I don't have any spaces and triple checked my public key is correct. Anyone else experiencing this issue?


Title: Re: Electrum 3.0.5 Encrypted Message Error non-hexadecimal number
Post by: pooya87 on January 26, 2018, 05:58:06 PM
it is not about your message, it is about your public key. that is what that error is saying. the first character of your public key is not a valid hexadecimal character.

are you copy pasting your public key or right clicking on the address and selecting Encrypt/Decrypt message?

you can always paste your public key in a text editor (like NotePad) and see what is wrong with it.


Title: Re: Electrum 3.0.5 Encrypted Message Error non-hexadecimal number
Post by: QlooQl on January 26, 2018, 11:48:21 PM
Thank you for the response.

I copied into notepad and tried again from there, no luck. It starts with an x so no i feel like it is correct.

My original thoughts were that there was a space, but I tried creating a new wallet and had the same problem.




Title: Re: Electrum 3.0.5 Encrypted Message Error non-hexadecimal number
Post by: pooya87 on January 27, 2018, 03:34:02 AM
are you by any chance using your "Master" public key? it starts with xpub?

you can only sign with your (individual) key which will start with 02/03 or 04 for compressed and uncompressed pubkeys respectively.


Title: Re: Electrum 3.0.5 Encrypted Message Error non-hexadecimal number
Post by: QlooQl on January 27, 2018, 03:13:11 PM
are you by any chance using your "Master" public key? it starts with xpub?

you can only sign with your (individual) key which will start with 02 or 04 for compressed and uncompressed pubkeys respectively.

Ahhh! That was it! Now I can encrypt messages.

I did not know there was a master public key vs individual public key.

Here is how to find an individual public key in the Electrum wallet:

1. Click View ->  Show addresses
2. Open the addresses tab
3. Find your receiving address in the list (or pick any other address you want to use) and right-click it -> Select Details
4. Your public key is shown in the middle box

My individual public key started with a 03, which I researched and it is also a 32-bit compressed public key.

Thank you for your help!