| Internet-Draft | OpenPGP smart card extensions | November 2026 |
| Schäfer | Expires 22 May 2027 | [Page] |
This document describes extensions for the OpenPGP smart card application. It adds algorithm support for PQC composite algorithms, as well as support for additional key storage.¶
This note is to be removed before publishing as an RFC.¶
The latest revision of this draft can be found at https://openpgp-card.codeberg.page/spec/. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-hko-openpgp-card/.¶
Discussion of this document takes place on the OpenPGP Working Group mailing list (mailto:openpgp@ietf.org), which is archived at https://mailarchive.ietf.org/arch/browse/openpgp/. Subscribe at https://www.ietf.org/mailman/listinfo/openpgp/.¶
Source for this draft and an issue tracker can be found at https://codeberg.org/openpgp-card/spec/.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 22 May 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document describes a set of extensions to the OpenPGP smart card application ([OPENPGP-SMARTCARD]). The extensions are based on version 3.4.1.¶
The goals of these extensions are:¶
Adding support for modern algorithms, including for PQC mechanisms¶
Support more keys than the current limit of 3¶
Support additional metadata for extended keys (OpenPGP key packet version, modern fingerprint size)¶
Full backward compatibility with the existing smart card API¶
Vendor-agnostic, based on IETF-standardized OpenPGP¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.¶
TODO¶
If this extension were added into the upstream version of the spec, the following note should be added to the document history.¶
V3.4.1 to 3.5:¶
Add support for Post-Quantum Cryptography, based on RFC 9980. This introduces support for composite encryption schemes (ECDH + ML-KEM) and signature schemes (EdDSA/ECDSA + ML-DSA), and stand-alone PQC signatures (SLH-DSA).¶
Add OIDs for Curve448 and Ed448¶
And details about use of Curve 25519 with ECDH (private key upload in little endian)¶
Add information about use of the EdDSA algorithm (id 0x16)¶
This section extends the existing set of algorithms in OpenPGP card to encompass additional classic ECC algorithms, as well as PQC algorithms. Those new algorithms act largely analogously to the pre-existing algorithms.¶
"C1-C3: 1 Byte Algorithm ID, according to RFC 4880/6637/9580/9980"¶
(add RFCs 9580/9980 as sources of algorithm ids)¶
Also see https://www.iana.org/assignments/openpgp/openpgp.xhtml#openpgp-public-key-algorithms¶
Add to table (and adjust text over table to say "ECC:"):¶
"0x16 (decimal 22) = EdDSA for PSO:CDS and INT-AUT"¶
EdDSA 256 bit or higher for PSO:COMPUTE DIGITAL SIGNATURE and INTERNAL AUTHENTICATE¶
Add Ed25519 as a recommended variant of EdDSA, and Ed448 as an optional variant.¶
Note: In OpenPGP card, pure EdDSA keys always use algorithm id 0x16, combined with the OID of the curve. Algorithm ids 0x1b and 0x1c are not used by the OpenPGP card application (these ids are designated "Ed25519" and "Ed448" in RFC 9580).¶
Add Curve 25519 as a recommended curve for ECDH, and Curve 448 as an optional curve for ECDH.¶
Note: Pure ECDH over Curve 25519 and Curve 448 always uses algorithm id 0x12 in OpenPGP card, combined with the OID of the curve used. Algorithm ids 0x19 and 0x1a are not used by the OpenPGP card application (these ids are designated "X25519" and "X448" in RFC 9580).¶
When importing ECDH key material that uses Curve 25519, the scalar must be uploaded in little endian byte ordering. This specific case is handled differently from all other ECC scalars in OpenPGP card!¶
This special case applies exclusively to ECDH over Curve25519 (also known as X25519). Note: Gnuk already implements X448, and uses "normal" big endian ordering for it.¶
Refer to https://www.rfc-editor.org/info/rfc7748/ and https://www.rfc-editor.org/info/rfc8032/ for more details about these curves, and the EdDSA algorithm.¶
See https://www.rfc-editor.org/info/rfc9580/#table-19 for the "OpenPGP ECC Curve OIDs and Usage Registry"¶
Ed25519 (used with algorithm EdDSA, id 0x16):
0x2B, 0x06, 0x01, 0x04, 0x01, 0xDA, 0x47, 0x0F, 0x01
= 1.3.6.1.4.1.11591.15.1¶
Curve25519 (used with algorithm ECDH, id 0x12):
0x2b, 0x06, 0x01, 0x04, 0x01, 0x97, 0x55, 0x01, 0x05, 0x01
= 1.3.6.1.4.1.3029.1.5.1¶
Ed448 (used with algorithm EdDSA, id 0x16):
0x2b, 0x65, 0x71
= '1.3.101.113'¶
Curve 448 (used with algorithm ECDH, id 0x12):
0x2b, 0x65, 0x6f
= '1.3.101.111'¶
This section adds support for algorithms from RFC 9980 (PQC in OpenPGP).¶
PQC composite algorithms are modeled as a combined key in OpenPGP card, internally such keys are handled as two distinct cryptographic keys.¶
This representation mirrors OpenPGP key packets, and allows annotating key material on the card with key packet fingerprints, to aid interoperable use of key material on the card between applications.¶
Once draft-ietf-openpgp-nist-bp-comp is finalized, its algorithm ids should be added to this spec as a minor update (with guidance to point out which ids should be prioritized by implementers).¶
(Note that this design is also fully usable by implementations of the PQC format outlined in draft-koch-librepgp.)¶
Byte Length Value
01 01 Algorithm ID (RFC 9980)
30: ML-DSA-65+Ed25519
31: ML-DSA-87+Ed448
32: SLH-DSA-SHAKE-128s
33: SLH-DSA-SHAKE-128f
34: SLH-DSA-SHAKE-256s
35: ML-KEM-768+X25519
36: ML-KEM-1024+X448
02 01 Import-Format, optional (00 is standard, and used if this value is not present)
00: standard: scalar value of ECC private key (optional, only for composite ML-KEM or ML-DSA), and scalar value for PQC private key
01: scalar value of ECC private key, and seed for PQC key (Import-Format only applicable for composite schemes with ML-KEM or ML-DSA)
02: scalar value of ECC private and public key (optional, only for composite ML-KEM or ML-DSA), and scalar value for PQC private key
03: scalar value of ECC private and public key, and seed for PQC key (Import-Format only applicable for composite schemes with ML-KEM or ML-DSA)
¶
Note: No OIDs are needed for the ECC component when using these PQC algorithm IDs¶
TODO (future minor update to this spec): Add IDs from draft-ietf-openpgp-nist-bp-comp-03, once finalized¶
NOTE: OIDs for PQC algorithms are not required in the OpenPGP card application. Both the cryptographic algorithm(s) and parameter size(s) are inferred directly from the algorithm id, as set in the algorithm attributes.¶
Optional to implement: Combinations of ML-KEM and ECDH, as specified for use with OpenPGP.¶
Products that offer any PQC support should usually offer support for at least ML-KEM-768+X25519 (RFC 9980 defines ML-KEM-768+X25519 as a "MUST" algorithm).¶
Note: The OpenPGP smart card application handles the two component KEM algorithms within one DEC key on the card. However, only the two individual decryption operations are performed on the card. The KEM combination step must be performed on the host system!¶
Optional to implement: Combinations of ML-DSA and EdDSA or ECDSA, as specified for use with OpenPGP.¶
Products that offer any PQC support should usually offer support for at least ML-DSA-65+Ed25519 (RFC 9980 defines ML-DSA-65+Ed25519 as a "MUST" algorithm).¶
Note: The OpenPGP smart card application handles the two component signature algorithms of a PQC composite within a single SIG or AUT key on the card.¶
Optional: Stand alone PQC signature algorithms, as specified for use with OpenPGP.¶
SLH-DSA may be implemented in the variants SLH-DSA-SHAKE-128s, SLH-DSA-SHAKE-128f, SLH-DSA-SHAKE-256s.¶
Under "7F48 xx Cardholder private key template":¶
92 xx Private ECC key (optional, present for composite schemes) 99 xx Public ECC key (optional, present for composite schemes if Import-Format is 02 or 03) 9a xx PQC private key (optional, present if Import-Format is 00 or 02) 9b xx PQC private key in seed form (optional, present if Import-Format is 01 or 03)¶
For PQC composite signature algorithms, the return value represents the concatenation of the two individual cryptographic signatures.¶
The ECC signature is returned first (if the algorithm is a composite signature), followed by the PQC signature. Both values are always returned in big-endian format, each value zero-padded to the signature size.¶
The input data consists of the concatenation of the "ecdhCipherText" and "mlkemCipherText", with fixed octet sizes as specified for the algorithm for the key slot.¶
For PQC composite KEM algorithms, the return value represents the concatenation of the two individual decapsulated key shares, first "ecdhKeyShare", then "mlkemKeyShare", both in big-endian format.¶
Internally, the card performs the two operations "ECDH-KEM.Decaps" and "ML-KEM.Decaps" as specified in https://www.rfc-editor.org/info/rfc9980/#name-composite-kem-schemes¶
For PQC composite signature algorithms, the return value represents the concatenation of the two individual cryptographic signatures.¶
See "7.2.10 PSO: COMPUTE DIGITAL SIGNATURE" for details about the return format.¶
Public key parameters for PQC algorithms are returned analogously to RSA and ECC. The additional parameter type 0x9c is used for PQC public key parameters:¶
0x9c xx PQC public key component (ML-KEM, ML-DSA or SLH-DSA)¶
TODO¶
This document is based on significant work by many people, including implementations and guidance:¶
The people acknowledged in this section are not responsible for any proposals, errors, or omissions in this document.¶