| Internet-Draft | Persistent Symmetric Keys in OpenPGP | November 2026 |
| Huigens | Expires 20 May 2027 | [Page] |
This document defines a new packet and algorithm for the OpenPGP standard (RFC 9580) to support persistent symmetric keys, for message encryption using authenticated encryption with additional data (AEAD) and for message authentication using AEAD authentication tags. This enables the use of symmetric cryptography for data storage (and other contexts that do not require asymmetric cryptography), for improved performance, smaller keys, and improved resistance to quantum computing.¶
This note is to be removed before publishing as an RFC.¶
The latest revision of this draft can be found at https://twisstle.gitlab.io/openpgp-persistent-symmetric-keys/. Status information for this document may be found at https://datatracker.ietf.org/doc/draft-ietf-openpgp-persistent-symmetric-keys/.¶
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://gitlab.com/twisstle/openpgp-persistent-symmetric-keys.¶
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 20 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.¶
The OpenPGP standard [RFC9580] has supported symmetric encryption for data packets using session keys since its inception, as well as symmetric encryption using password-derived keys. This document extends the use of symmetric cryptography by adding support for persistent symmetric keys which can be stored in a transferable secret key, and used to symmetrically encrypt session keys, for long-term storage and archival of messages. This document uses authenticated encryption with associated data (AEAD) as defined by [RFC9580].¶
The OpenPGP standard also supports the use of digital signatures for authentication and integrity but no similar symmetric mechanism exists in the standard. This document introduces the use of AEAD authentication tags as a symmetric counterpart to digital signatures, for long-term storage and archival of attestations of authenticity and certification.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. Any implementation that adheres to the format and methods specified in this document is called a compliant application. Compliant applications are a subset of the broader set of OpenPGP applications described in [RFC9580]. Any [RFC2119] keyword within this document applies to compliant applications only.¶
When compared to asymmetric cryptography, symmetric cryptography can provide improved performance and equivalent security with smaller keys. In contexts that do not require asymmetric cryptography, such as secure data storage where the same user encrypts and decrypts data, symmetric cryptography can be used to take advantage of these benefits.¶
Additionally, the asymmetric algorithms defined in [RFC9580] are vulnerable to attacks that might become possible on quantum computers [Shor]. While quantum-secure asymmetric cryptography in OpenPGP has been defined in [RFC9980], and is required to secure communications, there is a large body of existing messages encrypted with classical algorithms. Once persistent symmetric keys are available, these messages can be protected against future compromises efficiently by symmetrically re-encrypting the session key, and storing the message symmetrically encrypted for long-term storage and archival.¶
For storing persistent symmetric keys, this document introduces a new packet (see Section 5), rather than reusing the Secret Key Packet, as its semantics are different, and the handling of persistent symmetric key material requires some care. For example, it's not possible to extract a public key from a persistent symmetric key, unlike from an asymmetric secret key (see Section 6).¶
For storing session keys encrypted with persistent symmetric keys, while a Symmetric-Key Encrypted Session Key packet exists, it doesn't have the required semantics, as it's intended to encrypt the session key with a user-provided password, and doesn't offer a way to store a reference to a persistent key. Therefore, this document reuses the Public-Key Encrypted Session Key packet instead, which does offer the desired semantics.¶
Similarly, this document reuses the Signature packet for "symmetric signatures".¶
For these use cases, no new packet is required as the handling of these packets requires no special care.¶
To indicate the type of keys in the new and existing packets, a special persistent symmetric algorithm ID value 0 is registered, which can be used in the place of a public-key algorithm ID.¶
This document defines a new OpenPGP packet, extending table 3 of [RFC9580].¶
| ID | Critical | Packet Type Description | Shorthand |
|---|---|---|---|
| 40 | No | Persistent Symmetric Key Packet | PSK |
The Persistent Symmetric Key Packet (Type ID 40) has identical fields to the Secret Key Packet (Type ID 5). However, only version 6 of the packet is defined. Earlier versions of the Secret Key Packet format MUST NOT be used with the Persistent Symmetric Key Packet.¶
The Persistent Symmetric Key Packet MUST NOT be used with asymmetric algorithms, i.e. any of the public key algorithms defined in table 18 of [RFC9580]. It may only be used with the persistent symmetric algorithm defined below, with special algorithm ID value 0.¶
When storing encrypted symmetric key material in a Persistent Symmetric Key Packet, AEAD encryption (S2K usage octet 253, see Section 3.7.2.1 of [RFC9580]) MUST be used, to ensure that the secret key material is bound to the fingerprint. Implementations MUST NOT decrypt symmetric key material in a Persistent Symmetric Key Packet that was encrypted using a different method.¶
The Transferable Secret Key grammar defined in Section 10.2 of [RFC9580] is updated to additionally allow a single Persistent Symmetric Key Packet to constitute a valid Transferable Secret Key. Persistent Symmetric Keys MUST NOT include any subkeys, User IDs or Attributes, or direct-key or binding signatures, and implementations MUST reject Persistent Symmetric Keys that do include them. However, Persistent Symmetric Keys MAY be concatenated together with other (asymmetric or symmetric) Transferable Secret Keys in a single sequence of Transferable Secret Keys (such as the KEYS object defined by Section 7.3 of [SOP]).¶
Note that the Transferable Public Key grammar defined in Section 10.1 of [RFC9580] is not updated to allow a Persistent Symmetric Key Packet. A Transferable Public Key MUST NOT contain a Persistent Symmetric Key Packet, and implementations MUST reject a Transferable Public Key that does contain it. Therefore, extracting a Transferable Public Key from a Transferable Secret Key consisting of a Persistent Symmetric Key Packet is not possible. When extracting a sequence of Transferable Public Keys (such as the CERTS object defined by Section 7.2 of [SOP]) from a sequence of Transferable Secret Keys containing a mix of symmetric and asymmetric keys, implementations MUST ignore the Persistent Symmetric Keys and return a sequence of Transferable Public Keys corresponding to the asymmetric keys, only.¶
Because a Persistent Symmetric Key cannot have a direct-key signature, there is no place to include a Key Flags subpacket (as defined in Section 5.2.3.29 of [RFC9580]) to indicate the permissible key usages. Instead, Persistent Symmetric Keys are implicitly allowed to be used for all usages (certification, signing, encrypting communications and storage, and authentication). If a keyholder or application developer wishes to restrict the key usages, they may add metadata external to the key indicating the intended usages, instead (and process it before passing the key to the OpenPGP implementation).¶
Additionally, Persistent Symmetric Keys cannot expire, nor be revoked. If a keyholder or application developer no longer wishes to use a given key, they may either add metadata external to the key indicating that it should no longer be used, or destroy the key material (after re-encrypting and re-authenticating any data that is still relevant with a new key) if that is practical.¶
This document defines one new algorithm for use with OpenPGP, updating table 18 of [RFC9580].¶
| ID | Algorithm | Public Key Format | Secret Key Format | Signature Format | PKESK Format |
|---|---|---|---|---|---|
| 0 | AEAD | sym. algo, fingerprint seed [Section 7.1] | key material | AEAD algo, salt, authentication tag [Section 7.3] | AEAD algo, salt, ciphertext [Section 7.2] |
This algorithm ID can be used to store symmetric key material in a Persistent Symmetric Key Packet (see Section 5). It can also be used to store a session key encrypted using AEAD in a PKESK packet (see Section 5.1 of [RFC9580]). It can also be used to store an AEAD authentication tag in a Signature packet (see Section 5.2 of [RFC9580]), and in the corresponding One-Pass Signature packet.¶
Because only version 6 of the Persistent Symmetric Key Packet is defined, and version 6 keys can only generate version 6 signatures (see Section 5.2 of [RFC9580]), this algorithm can only be used in version 6 Signature packets. However, this algorithm MAY be used with all versions of the PKESK packet, which aligns with the version of the SEIPD packet rather than the key packet (see Section 10.3.2.1 of [RFC9580]). This enables encrypting to a mix of recipient key versions, as well as symmetrically re-encrypting existing messages without re-encrypting the SEIPD packet.¶
Implementations MUST NOT use the symmetric algorithm ID in Public-Key Packets, Public-Subkey Packets, Secret-Key Packets or Secret-Subkey Packets.¶
The public key material consists of this series of values:¶
A 1-octet symmetric algorithm ID (see Section 9.3 of [RFC9580]).¶
A 32-octet random seed to randomize the key fingerprint.¶
The secret key material consists of this single value:¶
Symmetric key material of the appropriate length for the given symmetric algorithm.¶
Implementations MUST NOT generate or use (i.e. encrypt, decrypt, sign, or verify with) persistent symmetric keys using a symmetric algorithm other than AES-128, AES-192, AES-256, Camellia-128, Camellia-192, Camellia-256, or other future algorithms defined for OpenPGP that are at least as strong as one of those algorithms.¶
The encrypted session key consists of this series of values:¶
A 1-octet AEAD algorithm ID (see Section 9.6 of [RFC9580]).¶
32 octets of salt. The salt is used to derive the key-encryption key and MUST be securely generated (see Section 13.10 of [RFC9580]).¶
The ciphertext and authentication tag resulting from a symmetric key encryption performed using the symmetric-key cipher of the key and the indicated AEAD mode, with the key-encryption key and IV computed as described in Section 7.4, and as additional data the empty string. The following values are concatenated and then encrypted:¶
The 1-octet algorithm identifier, if it was passed (in the case of a v3 PKESK packet).¶
The session key described in Section 5.1 of [RFC9580].¶
The signature consists of this series of values:¶
A 1-octet AEAD algorithm ID (see Section 9.6 of [RFC9580]).¶
32 octets of salt. The salt is used to derive the message authentication key and MUST be securely generated (see Section 13.10 of [RFC9580]).¶
The authentication tag resulting from encrypting the empty string using the symmetric-key cipher of the key and the indicated AEAD mode, with the message authentication key and IV computed as described in Section 7.4, and as additional data the hash digest described in Section 5.2.4 of [RFC9580].¶
Although not required by AEAD algorithms, to maintain consistency with existing signature algorithms, AEAD authentication tags are produced from appropriately hashed data, as per Section 5.2.4 of [RFC9580].¶
When encrypting a session key or authenticating a message using a persistent symmetric key, the persistent key material and the salt are used to derive an M-bit key and N bits used as initialization vector, where M is the key size of the symmetric algorithm and N is the nonce size of the AEAD algorithm.¶
M + N bits are derived using HKDF (see [RFC5869]). The left-most M bits are used as symmetric algorithm key, the remaining N bits are used as initialization vector. HKDF is used with SHA512 ([RFC6234]) as hash algorithm, the persistent key material as Initial Keying Material (IKM), the salt as salt, and the Packet Type ID in OpenPGP format encoding (bits 7 and 6 set, bits 5-0 carry the packet type ID), packet version number, cipher algorithm ID and AEAD algorithm ID as info parameter.¶
For example, for a version 6 PKESK packet, when using AES-128 in OCB mode, the info parameter would be the octets 0xC1, 0x06, 0x07, 0x02. For a version 6 Signature packet, when using AES-256 in GCM mode, the info parameter would be the octets 0xC2, 0x06, 0x09, 0x03.¶
The following pseudocode describes the Key and IV derivation:¶
def derive_key_and_iv(
psk_key_material, salt, key_size, iv_size, # Key material and derivation parameters
packet_type_ID, packet_version, sym_algo, aead_algo, # Context parameters
):
info = [packet_type_ID, packet_version, sym_algo, aead_algo]
output_size = key_size + iv_size
hkdf_output = HKDF_SHA512(psk_key_material, salt, info, output_size)
key = hkdf_output[0..key_size]
iv = hkdf_output[key_size..output_size]
return key, iv
¶
While PSKs can be used in many OpenPGP contexts, Some additional guidance is helpful for different use cases.¶
Any certification (signature class 0x10-0x13) created by a PSK SHOULD be marked "non-exportable" (see Section 5.2.3.19 of [RFC9580]). This marking helps an implementation avoid leaking the presence of the PSK to anyone but the keyholder themselves.¶
When re-encrypting a session key to a PSK for the sake of defending an archived messagee against a future asymmetric key compromise, it is imperative to also destroy all copies of the session key encrypted to the vulnerable asymmetric key.¶
That is, for a message with a session key X encrypted to a normal asymmetric key A, like so:¶
PKESK(A,X) SEIPD(X,M)
¶
It is insufficient to introduce a PSK B and rewrite the message on storage as:¶
PKESK(B,X) PKESK(A,X) SEIPD(X,M)
¶
Rather, it must be rewritten as:¶
PKESK(B,X) SEIPD(X,M)
¶
Actually destroying all copies of the original PKESKs may or may not be possible, depending on the application's level of control over the storage and transmission media used.¶
Security considerations are discussed throughout the document where appropriate.¶
IANA is requested to add a row to the "OpenPGP Packet Types" registry with the entry in Table 1. The new row's Reference column should point to this document.¶
IANA is requested to update the "OpenPGP Public Key Algorithms" registry by amending the row with ID 0 to the values in Table 2. The Reference column of that row should be updated to point to this document.¶
An initial version of this document was written by Dan Ristea (University College London, Proton AG), with guidance from Dr Philipp Jovanovic (University College London) and the editor.¶
Parts of this document were contributed by Daniel Kahn Gillmor.¶
Thanks to feedback and suggestions from Andrew Gallagher, Heiko Schäfer, Justus Winter, Falko Strenzke, Daniel Kahn Gillmor, and Lara Bruseghini, in no particular order.¶
To help implementing this specification a set of non-normative examples follow here.¶
Here is a Transferable Secret Key consisting of:¶
A v6 Persistent Symmetric Key packet¶
-----BEGIN PGP PRIVATE KEY BLOCK----- 6DwGaXu4NQAAAAAhB778G6ol+0zgePhnCmEi6PdPZm/BNNe8ao/8MxvEOPno AE+GgapnjN6EZboLhSVqQL0= -----END PGP PRIVATE KEY BLOCK-----¶
The key has the fingerprint eeea1e834ed8aacf3d938a5ccc6a177fcb7775c290eb02c3c17e5fdaa559b2a5.¶
The raw key material is 4f8681aa678cde8465ba0b85256a40bd (for AES-128).¶
Here is the message "Hello World" encrypted using the secret key in Appendix A.1, consisting of:¶
-----BEGIN PGP MESSAGE----- wXUGIQbu6h6DTtiqzz2TilzMahd/y3d1wpDrAsPBfl/apVmypQACWjxc6uw6 l22qqqSVwJBxSZ03nXQYghPddk5PQJGHQ8L2bADc0Me4GKcpz1SEfGaRxAqt fkmO2J4WRfPr3ciaacmwbL2EE4TWbUC3nKnyaeHSVwIJAwzL9pRdO5Sazs1T 1f6fl9MfUD/3NqbADxVAiGMbw7e3QbKrMsX0ulYJRsi61DQVummllYExiVnt K7uBUriICKUzqo+8Q2V8HpMeyV+audJkp62Yuw== -----END PGP MESSAGE-----¶
The session key is encrypted using AES-128 in OCB mode.
The salt is 5a3c5ceaec3a976daaaaa495c09071499d379d74188213dd764e4f40918743c2.
The HKDF info is c1060702.
The key-encryption key is a64e6ac3aa262e42da23d5a14470857b.
The IV is 2d9c726a1b01f60f3b05b89cb887f9.
The additional data is the empty string.¶
The encrypted session key is 25e5884dc13bcf40d5ab41b3bc23306ebb1907b4d586b2d678e21c496a8bf35a.
The message is encrypted using AES-256 in GCM mode.¶
Here is the message "Hello World" encrypted using the secret key in Appendix A.1, consisting of:¶
-----BEGIN PGP MESSAGE----- wVwD7uoeg07Yqs8AAuvkkq5zcghyUHMUZa6aZS90Ro/C+7vJFoRjkKCUKRCa DcKFbmZ3oFj3lq28Ibe8hkTfqr8SLDTcl0P7TnkufzeHBvH6AwPYNCEhvPKS yyoL/tI8AThJZhgKkUZDFTKhU8CY4r7dCpbAUGz4wjVMseFDKZOAc+ywKt4s nrX5PNU9VtHTO1ceJmJJq2DKrH+Y =+t4C -----END PGP MESSAGE-----¶
The session key is encrypted using AES-128.
The salt is ebe492ae7372087250731465ae9a652f74468fc2fbbbc916846390a09429109a.
The HKDF info is c1030702.
The key-encryption key is 0c233981b8481ff68d253e78e9d7fc1b.
The IV is 6186c39f7673f2d540f193e05ecab0.
The additional data is the empty string.¶
The encrypted session key is 5f43304125ba1728aab843c0a6d4ce75bd8eb3961a2025c3131e58223ecafee2.
The message is encrypted using AES-256.¶
Here is the message "Hello World" encrypted and signed using the secret key in Appendix A.1, consisting of:¶
-----BEGIN PGP MESSAGE----- wWUGIQbu6h6DTtiqzz2TilzMahd/y3d1wpDrAsPBfl/apVmypQABvm+Cw7/SE3eT bP/pn3KNJ8u2vOz1ngmG42x9Hd0y/rjGG2ACNf1re9WYp3HnilZNkuW4t69aRa0W o2FNpUDFANLAagIHAgwZ1BR2ZAUJNUDaJgC85e1yIG/fA1ctO0jqVxpNEkGnMr3C B6CCIQaLGZJL8CWXUB5YXHdxdriaX341UGia4q5CJXyeXShsHNXBuc3+seGZ7iyX id2/maFn3GGRBRzEEVOsbwQafvL5JLlyHguqj8Anirwr4TM6OXlSteo2ZBOWAB2L 9XGkxJEudzJilXwaHTSts+T/SB5hblLx4tRYCiT+MIFkxX7hTBXIVm9fM9iaSKac py+cNk/cqP50J0XDzQvMKgXK5QSMcyWb8iMWFP1u1ux25OOJnDOXPUtmVqoklLlq 6dqw6yIV/5t1QR/qnNnuPoTNqcwMrAA8+pnX9HpFpic3iXUsxPzCs+TmelAWy/aI q6YhnLECprMCfUJE8Rq8+5HLlz8= -----END PGP MESSAGE-----¶
The session key is encrypted using AES-256 in EAX mode.
The salt is be6f82c3bfd21377936cffe99f728d27cbb6bcecf59e0986e36c7d1ddd32feb8.
The HKDF info is c1060701.
The key-encryption key is 58f3298050f0f82048a19119ef8a45e6.
The IV is aafbced1cb62ac221f0816de86990c4a.
The additional data is the empty string.¶
The encrypted session key is 97bf5ced572e681ba54c7c3ed6927f86.
The message is encrypted using AES-128 in OCB mode.¶
The message is authenticated using AES-256 in GCM mode.
The salt is 76499d47fc8d5d6b75cf176dade2d9a9a41d585d6b2344d090f299fbdb753f11.
The HKDF info is c2060703.
The authentication key is a7b03b6af7b7e17bbd5264b8266d9138.
The IV is b6c860f09a6ab0d4718bcc40.
The additional data is 6f776a0a93df0883c1d31792037a065bd2818fb6f23abc66a0e8c4e98a943c002f871b10e512c4dca83e025e94e67c6de7a6024e4428a56fe458374998d81eed.
The authentication tag is 0ce9cbb832f0a65f96f9cbe6c06168a8.¶
Here is a detached signature over the message "Hello World" signed using the secret key in Appendix A.1, consisting of:¶
A v6 Signature packet¶
-----BEGIN PGP SIGNATURE----- wnkGAAAIAAAAKQWCaXu9QCKhBu7qHoNO2KrPPZOKXMxqF3/Ld3XCkOsCw8F+ X9qlWbKlAAAAADI0EHT4wSYfRzYXBKpTBs1pmc0Cb+a1BVcMwGMjrKgN1hS4 4R9cgg2C385fWUj4w2KGk7dVXpMKX1Yj+WvErkO5slZd -----END PGP SIGNATURE-----¶
The message is authenticated using AES-128 in OCB mode.
The salt is 6fe6b505570cc06323aca80dd614b8e11f5c820d82dfce5f5948f8c3628693b7.
The HKDF info is c2060702.
The authentication key is 31988c7b45116e19b24ff29a1b93d4c2.
The IV is 682aa0b80b031fe8882cecf1b6dca6.
The additional data is 32342abfe99d053a5ea192b9192fb88210f6c479bc6a7be6e653e34147593bac.
The authentication tag is 555e930a5f5623f96bc4ae43b9b2565d.¶