scd:piv: Ed25519 and X25519 support for YubiKey 5.7, would a patch be welcome?

Josh Quinlan josh at quinlan.cloud
Sat Oct 3 00:30:42 CEST 2026


Hi all,

YubiKey firmware 5.7 supports Ed25519 and X25519 keys in the PIV
applet, but scd/app-piv.c only handles RSA 2048/3072 and NIST
P-256/P-384.

With an Ed25519 key in slot 9A (tested with GnuPG 2.5.24 on a
YubiKey 5.7.4):

- readkey falls back to the certificate, so the public key comes
  through with the curve as its OID, 1.3.101.112
- gpg-agent with enable-ssh-support offers the key as the card's
  auth key, and the whole SSH listing then fails:
  "error fetching identities: invalid format"
- get_key_algorithm_by_dobj rejects the curve, so signing fails
  as well

Master as of 2026-09-16 has no Ed25519 code in app-piv.c, and I
could not find an existing task on dev.gnupg.org.

I'd like to write a patch for:

1. Key types 0xE0 (Ed25519) and 0xE1 (X25519)
2. readkey returning the key in the EdDSA form gpg-agent expects
   (curve Ed25519, flags eddsa)
3. Ed25519 signing: the message passed through unhashed, and the
   raw 64-byte signature returned
4. Key generation and import
5. X25519 decryption

It would be tested on a real card, against master, with a DCO
sign-off.

Questions:

- Is anyone already working on this?
- Anything to know about how you'd want the curve handled, for
  example normalising it in app-help.c rather than app-piv.c?

Thanks,
Josh


More information about the Gnupg-devel mailing list