gpg 2.5.24: PQC interoperability observations (PKESK encoding with v4 keys and ML-KEM subkeys)

Park, Jaehwan jpark127 at utk.edu
Tue Nov 17 17:18:03 CET 2026


Hi there!!

While testing post-quantum OpenPGP and S/MIME keys with GnuPG 2.5.24
and several mail clients that use it as their backend, I ran into
three things I would like to report or ask about.

1. Messages encrypted to a v4 key with an ML-KEM subkey cannot be
   decrypted

   When gpg 2.5.24 encrypts to a v4 key that has an ML-KEM encryption
   subkey, it writes the 20-octet v4 fingerprint in the PKESK packet
   followed by twelve zero octets, as if the field were sized for a
   32-octet fingerprint. The recipient then reads a zero octet where
   the algorithm identifier should be, and decryption fails. This
   also affects the sender: the same gpg that produced the message
   cannot decrypt it.

   I saw this with three different v4 keys. If I remove the twelve
   octets from the packet by hand, the message decrypts correctly.
   Because the problem is in gpg itself, every client I tested on top
   of 2.5.24 shows the same failure.

2. Some PQC OpenPGP keys are not recognized on import

   Of the PQC test keys I tried, three are rejected because the
   public-key algorithm is unknown, and two more already fail at
   packet parsing. I assume these are formats or algorithm IDs that
   GnuPG does not implement. Is that intended, and is support
   planned?

3. gpgsm does not import a PKCS#12 file with an ML-KEM key

   Importing an S/MIME certificate with an ML-KEM key from a PKCS#12
   file fails in gpgsm (seen through Claws Mail and KMail). Is ML-KEM
   in gpgsm planned?

Item 1 looks like a bug to me. Items 2 and 3 may simply be features
that are not there yet, so please read them as questions.

I can send the test keys, sample messages, and gpg --list-packets
output for any of these.

Thanks,
Jaehwan Park

Get Outlook for Mac<https://aka.ms/GetOutlookForMac>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20261117/4e45f244/attachment-0001.html>


More information about the Gnupg-devel mailing list