Dear lazyweb,
At work, we are trying to rotate the GPG signing keys for the Linux packages of the eID middleware
We created new keys, and they will be installed on all Linux machines that have the eid-archive package installed soon (they were already supposed to be, but we made a mistake).
Running some tests, however, I have a bit of a problem:
[wouter@rhel rpm-gpg]$ sudo rpm --import RPM-GPG-KEY-BEID-RELEASE
[wouter@rhel rpm-gpg]$ sudo rpm --import RPM-GPG-KEY-BEID-RELEASE-2025
fout: RPM-GPG-KEY-BEID-RELEASE-2025: key 1 import failed.
[wouter@rhel rpm-gpg]$ sudo rpm --import RPM-GPG-KEY-BEID-CONTINUOUS
This is on RHEL9.
The only difference between the old keys and the new one, apart of course from the fact that the old one is, well, old, is that the old one uses the RSA algorithm whereas the new one uses ECDSA on the NIST P-384 curve (the same algorithm as the one used by the eID card).
Does RPM not support ECDSA keys? Does anyone know where this is documented?
(Yes, I probably should have tested this before publishing the new key, but this is where we are)
Using a search engine: it looks as if OpenEuler also had this issue and found a solution. If you uncomment one of the RPM configuration files, you can load support for ECDSA
https://docs.openeuler.org/en/docs/24.03_LTS_SP1/server/security/shangmi/rpm_signature_verification.html
Maybe this will help?
I bet the RPM internal OpenPGP implementation(!) doesn't support ECDSA keys.
It looks like since RPM 4.18 they have had a Sequoia integration solution, and it is now the default (I think since RPM 4.18? Definitely is in Fedora 38 (April 2023), so whatever version it has) (but internal imp. is sticking around for a while of course, as a build option). So I wonder if the Sequoia version would work with ECDSA OpenPGP keys...
RHEL (and friends) v9 is still on RPM v4.16 though. Not sure what EL 10 is on...
This article is where I got this idea from: https://sequoia-pgp.org/blog/2023/04/27/rpm-sequoia/
In any case I confirm that I couldn't make rpm (4.16) accept an ECDSA PGP key, but it accepted RSA and DSA/Elgamal (classic DSA) keys ok. As far as importing them anyway, I didn't test sign and verify a package...
Kinda wild since the RPM package signature has supported EC for a good while
Following up on earlier comment, can confirm on Fedora 42 with RPM 4.20.1, I can create an ECC PGP key with NIST P-384, and successfully import it with
rpmkey --import.It is then visible with
rpmkeys --listand in the old pseudo-packages interface withrpm -qa gpg-pubkey.Also tested now with Alma 10 with RPM 4.19.1.1, import is also successful, shows up with
rpm -qa gpg-pubkey(rpm 4.19 doesn't haverpmkeys --listyet)Again, I did not test actually signing and verifying a package with it, but I take the fact that it imported as a good sign at least.
Nonetheless, their are probably still a lot of EL9 and older systems out there, and maybe Fedora systems older than 38? Also OpenSuSE was going to continue with the internal implementation for a while longer than Fedora, not sure what their status is. So may not be feasible to distribute rpm packages signed with ECC PGP keys for a while yet.