Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpg signature verification on web site https://electrum.org/#download is giving "Bad signature" #7394

Closed
Adrianvic032 opened this issue Jul 6, 2021 · 24 comments

Comments

@Adrianvic032
Copy link

Hi there,
Thanks for all the efforts you put into this application. I was trying from https://electrum.org/#downloading to install on Ubuntu/Tails but the verify signature gives "Bad Signature" status. Please advise. thanks

@SomberNight
Copy link
Member

Could you share what commands you are running and their output?

See e.g. https://electrum.readthedocs.io/en/latest/gpg-check.html

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 6, 2021 via email

@SomberNight
Copy link
Member

What is the full name of the appimage file and the signature files you downloaded?
Do you have the full URLs where you have downloaded them from?

I suspect you might be mixing up the GPG key file and the signature file.

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 6, 2021 via email

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 6, 2021 via email

@SomberNight
Copy link
Member

email attachments do not work in github comments.

I am attaching text file copy of ThomasV signatures provided in the
electrum web site. You can see that both signatures are different thought
both of them states ThomasV signatures.

A GPG key can sign a message (file) which results in a signature.
Each file neccessarily have a different signature corresponding to it, for a given key.

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 6, 2021 via email

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 6, 2021 via email

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 6, 2021 via email

@SomberNight
Copy link
Member

Do you have the full URLs where you have downloaded them from?

Again, you are most likely mixing up the GPG key file and the signature file; and checking the binaries against mismatched signature files.

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 7, 2021 via email

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 7, 2021 via email

@SomberNight
Copy link
Member

By full URL to the files you have downloaded, I mean e.g.:

https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage
https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage.ThomasV.asc

@SomberNight
Copy link
Member

In windows, I get message that electrum app is transmitting data to
https://electrum.hodlister.co (45.154.252.109:50002).

Electrum connects to multiple remote servers for e.g. bitcoin block headers.
electrum.hodlister.co is one of the default electrum servers
So yes, it is normal.

@SomberNight
Copy link
Member

Ok, so given these two files:

https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage
https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage.ThomasV.asc

Try renaming
https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage.ThomasV.asc
to
https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage.asc
and try to check validity after that

@Adrianvic032
Copy link
Author

Adrianvic032 commented Jul 7, 2021 via email

@GlenCooper
Copy link

@Adrianvic032 I happened to be reading this and was curious about whether or not you tried this, and what your results were?

@BTCAlchemist
Copy link

I encountered a similar challenge on macOS. When I tried to "Verify signature of file" in the GUI context menu, with electrum-4.1.5.dmg, the error message said, "No signatures found." This got resolved by removing the dev's name from the .asc file. @SomberNight To save users' time from renaming each .asc file, would it be possible to publish a .asc file that includes all the devs signatures together with the appropriate name (ex. 'electrum-4.1.5.dmg.asc')?

Ok, so given these two files:

https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage
https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage.ThomasV.asc

Try renaming https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage.ThomasV.asc to https://download.electrum.org/4.1.4/electrum-4.1.4-x86_64.AppImage.asc and try to check validity after that

@Bug-Ninja
Copy link

Bug-Ninja commented Feb 16, 2022

I am facing a similar challenge on Linux mint (20.3)
I downloaded 3 files:

https://download.electrum.org/4.1.5/Electrum-4.1.5.tar.gz
https://download.electrum.org/4.1.5/Electrum-4.1.5.tar.gz.asc
https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/ThomasV.asc

First I imported the public key
gpg --import ThomasV.asc
Goes well. Outputs (amongst other things):

6694D8DE7BE8EE5631BED9502BD5824B7F9470E6

Then:
gpg --verify Electrum-4.1.5.tar.gz.asc Electrum-4.1.5.tar.gz

It seems that there are 3 signatures and only one of them matches. This is what my terminal shows me on the first two (sorry, haven figured out how to change the language of the terminal yet...), so I translate it mysef

`gpg: signature created 22 jul 2021 14:49:37 CEST

gpg: with RSA key 637DB1E23370F84AFF88CCE03152347D07DA627C
gpg: Can't verify signature: No public key

gpg: signature created 19 jul 2021 21:19:51 CEST
gpg: with RSA key 0EEDCFD5CAFB459067349B23CA9EEEC43DF911DC
gpg: Can't verify signature: No public key

gpg: signature created 19 jul 2021 20:22:29 CEST
gpg: with RSA key 6694D8DE7BE8EE5631BED9502BD5824B7F9470E6
gpg: Correct signature from van "Thomas Voegtlin (https://electrum.org) thomasv@electrum.org"`
[[bla bla bla]

`gpg: WARNING: this key was not verified
by a trustworthy signature!

gpg: No indication that signature belongs to owner.

fingerprint of the primary key: 6694 D8DE 7BE8 EE56 31BE D950 2BD5 824B 7F94 70E6`

@SomberNight
Copy link
Member

@Bug-Ninja

It seems that there are 3 signatures and only one of them matches.

Yes, exactly. There are now multiple signatures included in the .asc on the website.
You can decide for yourself how many you want to check.
As per your output, looks like ThomasV's signature was verified, so if you are satisfied with that, you can ignore the others.
Or you can also obtain the other public keys and verify those sigs. Up to you.

@BTCAlchemist

To save users' time from renaming each .asc file, would it be possible to publish a .asc file that includes all the devs signatures together with the appropriate name (ex. 'electrum-4.1.5.dmg.asc')?

This has been done, as above (see #7579).


Closing this, as there are multiple different issues here, all of which I believe to have been answered.

@Bug-Ninja
Copy link

Or you can also obtain the other public keys and verify those sigs.
I would love to, but how can I get thos? The instructions on the download page are there only to verify with the signature of ThomasV:

In order to be able to verify GPG signatures, you need to import the public key of the signer. Electrum binaries are signed with ThomasV's public key. On Linux, you can import that key using the following command: gpg --import ThomasV.asc.

Importing the other asc file gives an error (no valid openPGP data found) .
It's a bit confusing as on one hand the exact commands are given on the download instruction page, but then again don't seem complete / up to date to verify succesfully. Might be a good thing to modify. I wish I could help but itś all a bit of mystery to me too.

@SomberNight
Copy link
Member

@Bug-Ninja

Importing the other asc file gives an error (no valid openPGP data found) .

An .asc file can be either some signature(s) or some public key(s).
The idea is that, a key can sign a message which results in a signature. Then, given the message, public key, and signature, anyone can verify the authenticity of the signature. (in this case the message is a release-binary)

The other public keys are linked on the website just above the table on the download page:

The current executables have been signed by ThomasV, SomberNight, Emzy.

or see here in the website source code:
https://github.com/spesmilo/electrum-web/blob/c765d78a5dbce31688bf9f9232e803bb7c90c6d1/panel-download.html#L8

@Bug-Ninja
Copy link

Ah yes, I see it now above the table. I went to "How to verify GPG signatures" and thatś the explanation I followed. Here there is only mention of ThomasV's signature. Thanks for the explantion. I sort of understand the process now.

So to resume: download the 3 public keys:
Sombernight: https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/sombernight_releasekey.asc
Emzy: https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/Emzy.asc
ThomasV: https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/ThomasV.asc

Using PGP you can see the RSA key. For example gpg --show-keys Emzy.asc shows me the key: 9EDAFF80E080659604F4A76B2EBB056FD847F8A7

Using gpg --import filename.asc I import each of the 3 keys.

Then there is a signature file Electrum-4.1.5.tar.gz.asc of the package. To verify that the package is actually not tampered with we do the verify command:
gpg --verify Electrum-4.1.5.tar.gz.asc Electrum-4.1.5.tar.gz

This tells me 3 times the signatures are good (and I can see the RSA keys match with the ones I saw using gpg --show-keys). I guess this is enough and I can ignore the warnings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@GlenCooper @Bug-Ninja @SomberNight @BTCAlchemist @Adrianvic032 and others