Launchpad cannot handle ECC or Ed25519 OpenPGP keys

Bug #1827369 reported by dkg
234
This bug affects 43 people
Affects Status Importance Assigned to Milestone
Launchpad itself
In Progress
High
Guruprasad

Bug Description

for my dkg0 account, i'm trying to upload my current OpenPGP key, which is an ed25519 key:

pub ed25519 2019-01-19 [C] [expires: 2021-01-18]
      C4BC2DDB38CCE96485EBE9C2F20691179038E5C6
uid [ultimate] Daniel Kahn Gillmor <email address hidden>
uid [ultimate] Daniel Kahn Gillmor <email address hidden>
sub ed25519 2019-01-19 [S] [expires: 2020-01-19]
sub ed25519 2019-01-19 [A] [expires: 2020-01-19]
sub cv25519 2019-01-19 [E] [expires: 2020-01-19]

when i try to do that i get the following error:

------------
 Launchpad could not import your OpenPGP key

    Did you enter your complete fingerprint correctly? (Help with fingerprints)
    Is your key in the Ubuntu keyserver yet? You may have to wait between ten minutes (if you pushed directly to the Ubuntu key server) and one hour (if you pushed your key to another server). (Help with publishing keys)
------------

however, the key is in the ubuntu keyserver: https://keyserver.ubuntu.com/pks/lookup?search=0xC4BC2DDB38CCE96485EBE9C2F20691179038E5C6&op=vindex

I notice that messages from launchpad related to other RSA keys include an OpenPGP Comment field that indicates that it is using GnuPG v1, which doesn't support elliptic curve keys at all. So it's possible that this is the problem. Launchpad should be using a modern version of GnuPG, though.

Related branches

Revision history for this message
dkg (dkg0) wrote :

over on https://answers.launchpad.net/launchpad/+question/680583 @cjwatson wrote:

> This is indeed because we're using GnuPG v1. I tried to upgrade to a modern version a while ago but I
> ran into a huge slew of test failures, mainly because of the same sorts of things that Ian Jackson has
> been complaining about for some time (e.g. https://bugs.debian.org/840669). I would like to have
> another go at some point, but it may take a while.

Revision history for this message
Colin Watson (cjwatson) wrote :

To people who might be inclined to mark this as a duplicate: please note that this is not a duplicate of bug 907675. OpenPGP keys are not SSH keys, and the code involved in handling them is completely separate.

Revision history for this message
Haruka (mrx) wrote :

Hate to "bump" bugs, but it's been quite a while and it seems I still can't use EdDSA keys.

I've already revoked my old RSA key and creating another key just for ppa sounds ridiculous for me.

Any plan to revisit this soon?

Revision history for this message
Shaun Murphy (shoonmcgregor) wrote :

This issue is also impacting me.

Changed in launchpad:
status: New → Confirmed
Revision history for this message
Robert de Rooy (r-d-e-r-o-o-y) wrote :

Just spend a huge amount of time wasted on figuring out why I get this stupid cryptic error that it could not import the gpg key.

It is f****** 2022, and still no support for elliptic curve GPG keys? And certainly don't mention in the instructions that this is a limitation, and even better don't bother to tell the user when he tries to import the key that it is the "wrong" type.

Thanks!

Revision history for this message
Colin Watson (cjwatson) wrote :

I've at least added a message to the "Change your OpenPGP keys" page now, noting the limitation and linking to this bug.

Unfortunately it seems likely that we'll need to do some infrastructure upgrades before it's possible to fix this bug. The new bindings in the python3-gpg package are much better in my experience, but I don't know of a reasonable way to get those working on xenial (and we definitely want to stop running on xenial as soon as we can find time for the upgrade).

Changed in launchpad:
status: Confirmed → Triaged
importance: Undecided → High
Revision history for this message
BA (ba9999) wrote :

Launchpad and Keybase are currently the kids who see ECC and then take their toys and go home. :)

sec> ed25519 2022-02-08 [SC] [expires: 2025-02-07]
      96F74575F7C5E84CD3776CAB5ACF93DDB1D667C4
      Card serial no. = xxxx xxxxxx
uid [ultimate] Barry Allard <email address hidden>
ssb# cv25519 2022-02-08 [E] [expires: 2025-02-07]
ssb rsa4096 2022-02-08 [S] [expires: 2025-02-07]
ssb rsa4096 2022-02-08 [E] [expires: 2025-02-07]
ssb rsa4096 2022-02-08 [A]
ssb> rsa2048 2022-06-04 [E] [expires: 2027-06-03]

Colin Watson (cjwatson)
Changed in launchpad:
assignee: nobody → Guruprasad (lgp171188)
status: Triaged → In Progress
Revision history for this message
Colin Watson (cjwatson) wrote :

I did some experimentation with the new GnuPG 2 changes (not yet deployed to production). Only some key types work as yet. I found that an ed25519 key isn't supported by the version of gpgme1.0 that we have in xenial, while xenial's gpg2 failed to import a secp256k1 key with this somewhat mysterious message:

    gpg: key A719B12D: no valid user IDs
    gpg: this may be caused by a missing self-signature
    gpg: Total number processed: 1
    gpg: w/o user IDs: 1

However, a nistp256 key works OK, although we do need to add it to `GPGKeyAlgorithm` before it will actually be possible to add one of those in Launchpad.

Revision history for this message
Colin Watson (cjwatson) wrote :

You can now at least use nistp256 keys (possibly some other key types too - I didn't exhaustively test all the possibilities). For other ECC types, see my comment #8.

Revision history for this message
Ichthyostega (ichthyo) wrote :

Hopefully this is resolved soon.

ed25519 and rsa4096 are considered recommended standard today.
Policy requirements increasingly force people to upgrade their keys and revoke the old ones, and then you're kind of stuck.

Even if you manage to use a separate dedicated key for the sole purpose of siging source packages for Ubuntu-PPA, how would you prevent other people from accidentally retrieving this key instead or the new real primary key, since it must be uploaded to the Keyservers?

Revision history for this message
Colin Watson (cjwatson) wrote :

rsa4096 is already supported, so I'm not completely sure why you're mentioning it here.

As for the rest, it looks like it'll be a matter of upgrading our infrastructure from xenial to focal so that we have a suitably non-ancient gnupg/gpgme. We have lots of reasons to want to do this, and we've put in a fair bit of effort recently to make it possible (indeed, porting to gnupg2 turned out to be a prerequisite). The actual upgrade timeline depends on our sysadmins' availability, but we at least now have a ticket in to get the staging upgrade going and we intend to expedite that as much as we can - getting off xenial will make our lives much easier.

YE Tar Oo (goffery)
Changed in launchpad:
status: In Progress → Invalid
Colin Watson (cjwatson)
Changed in launchpad:
status: Invalid → In Progress
Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote (last edit ):

Hi @cjwatson, is there any update on the actual timeline you mentioned or have the sysadmins been unavailble since?

Revision history for this message
Guruprasad (lgp171188) wrote :

Hi Jan-Philipp, we are still waiting on our sysadmin team to get the upgrade process started and we do not have an ETA that we can share at the moment.

Revision history for this message
LEE, Jong Hoon (leejh76) wrote :

is this solved?
I'm can't register to OpenGPG on launcped.

Revision history for this message
Jan-Philipp Jürgens (seemax1991) wrote :

@leejh76 as per #12 it is not.

Revision history for this message
Olivier Herau (oherau) wrote :

this is a workaround I found using the first post:
1- export your public key in a file (ex: key.asc)
2- go to https://keyserver.ubuntu.com/pks and submit your public key in text format
3- go to launchpad (https://launchpad.net/<username>/+editpgpkeys) and submit the fingerprint
Now the key should be accepted for validation

Revision history for this message
Jing Luo (del111) wrote :

Hi @oherau I can confirm this does not work.

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote :

#16 doesn't work

Revision history for this message
Peter Wilbrink (figuratum) wrote (last edit ):

When I try to add my ed25519 fingerprint to Launchpad, i get this error ID: OOPS-e173261a359d2fae76cd204232bf3266

EDIT: It could be that the keyserver did not yet provide the key, as the key was just uploaded and not yet visible on the keyserver. After waiting a bit, I can find my key on the keyserver, but the error persist. This time the error ID is: OOPS-56aca45144fad99eb8898110f04c203b.

Revision history for this message
Guruprasad (lgp171188) wrote :

Hi Peter, since this issue is still open, it is expected to get errors when trying to add ed25519 OpenPGP keys.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.