<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.14 (Ruby 3.3.7) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>


<rfc ipr="trust200902" docName="draft-ietf-openpgp-persistent-symmetric-keys-04" category="std" consensus="true" submissionType="IETF" updates="9580" tocDepth="4" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title>Persistent Symmetric Keys in OpenPGP</title>

    <author initials="D." surname="Huigens" fullname="Daniel Huigens" role="editor">
      <organization>Proton AG</organization>
      <address>
        <postal>
          <street>Route de la Galaise 32</street>
          <city>Plan-les-Ouates</city>
          <code>1228</code>
          <country>Switzerland</country>
        </postal>
        <email>d.huigens@protonmail.com</email>
      </address>
    </author>

    <date year="2026" month="September" day="15"/>

    <area>sec</area>
    
    <keyword>Internet-Draft</keyword>

    <abstract>


<?line 49?>

<t>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.</t>



    </abstract>

    <note title="About This Document" removeInRFC="true">
      <t>
        The latest revision of this draft can be found at <eref target="https://twisstle.gitlab.io/openpgp-persistent-symmetric-keys/"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-openpgp-persistent-symmetric-keys/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        OpenPGP Working Group mailing list (<eref target="mailto:openpgp@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/openpgp/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/openpgp/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://gitlab.com/twisstle/openpgp-persistent-symmetric-keys"/>.</t>
    </note>


  </front>

  <middle>


<?line 54?>

<section anchor="introduction"><name>Introduction</name>

<t>The OpenPGP standard <xref target="RFC9580"></xref> 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 <xref target="RFC9580"></xref>.</t>

<t>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.</t>

</section>
<section anchor="conventions-used-in-this-document"><name>Conventions Used in This Document</name>

<t>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 <xref target="RFC2119"></xref>.
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 <xref target="RFC9580"></xref>.
Any <xref target="RFC2119"></xref> keyword within this document applies to compliant applications only.</t>

</section>
<section anchor="motivation"><name>Motivation</name>

<t>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.</t>

<t>Additionally, the asymmetric algorithms defined in <xref target="RFC9580"></xref> are vulnerable to attacks that might become possible on quantum computers <xref target="Shor"></xref>.
While quantum-secure asymmetric cryptography in OpenPGP has been defined in <xref target="RFC9980"></xref>, 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.</t>

</section>
<section anchor="creating-and-reusing-packets"><name>Creating and Reusing Packets</name>

<t>For storing persistent symmetric keys, we introduce a new packet (see <xref target="key-packet"/>), 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 <xref target="tsk-grammar"/>).</t>

<t>For storing session keys encrypted with persistent symmetric keys, while a Symmetric-Key Encrypted Session Key packet exists, its semantics don't match our requirements, 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, we reuse the Public-Key Encrypted Session Key packet instead, which does offer the desired semantics.</t>

<t>Similarly, we reuse the Signature packet for "symmetric signatures".</t>

<t>For these use cases, no new packet is required as the handling of these packets requires no special care.</t>

<t>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.</t>

</section>
<section anchor="key-packet"><name>Persistent Symmetric Key Packet</name>

<t>This document defines a new OpenPGP packet, extending table 3 of <xref target="RFC9580"></xref>.</t>

<texttable title="Persistent Symmetric Key Packet registration" anchor="key-packet-registration">
      <ttcol align='right'>ID</ttcol>
      <ttcol align='left'>Critical</ttcol>
      <ttcol align='left'>Packet Type Description</ttcol>
      <ttcol align='left'>Shorthand</ttcol>
      <c>40</c>
      <c>No</c>
      <c>Persistent Symmetric Key Packet</c>
      <c>PSK</c>
</texttable>

<t>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.</t>

<t>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 <xref target="RFC9580"></xref>.
It may only be used with the persistent symmetric algorithm defined below, with special algorithm ID value 0.</t>

<t>When storing encrypted symmetric key material in a Persistent Symmetric Key Packet, AEAD encryption (S2K usage octet 253, see <xref section="3.7.2.1" sectionFormat="of" target="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.</t>

</section>
<section anchor="tsk-grammar"><name>Extended Transferable Secret Key Grammar</name>

<t>The Transferable Secret Key grammar defined in <xref section="10.2" sectionFormat="of" target="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 <xref section="7.3" sectionFormat="of" target="SOP"/>).</t>

<t>Note that the Transferable Public Key grammar defined in <xref section="10.1" sectionFormat="of" target="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 <xref section="7.2" sectionFormat="of" target="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.</t>

</section>
<section anchor="key-algo"><name>Persistent Symmetric Key Algorithm</name>

<t>This document defines one new algorithm for use with OpenPGP, updating table 18 of <xref target="RFC9580"></xref>.</t>

<texttable title="Persistent Symmetric Key Algorithm registration" anchor="key-algo-registration">
      <ttcol align='right'>ID</ttcol>
      <ttcol align='left'>Algorithm</ttcol>
      <ttcol align='left'>Public Key Format</ttcol>
      <ttcol align='left'>Secret Key Format</ttcol>
      <ttcol align='left'>Signature Format</ttcol>
      <ttcol align='left'>PKESK Format</ttcol>
      <c>0</c>
      <c>AEAD</c>
      <c>sym. algo, fingerprint seed [<xref target="key-fields"/>]</c>
      <c>key material</c>
      <c>AEAD algo, salt, authentication tag [<xref target="sig-fields"/>]</c>
      <c>AEAD algo, salt, ciphertext [<xref target="pkesk-fields"/>]</c>
</texttable>

<t>This algorithm ID can be used to store symmetric key material in a Persistent Symmetric Key Packet (see <xref target="key-packet"/>).
It can also be used to store a session key encrypted using AEAD in a PKESK packet (see <xref section="5.1" sectionFormat="of" target="RFC9580"/>).
It can also be used to store an AEAD authentication tag in a Signature packet (see <xref section="5.2" sectionFormat="of" target="RFC9580"/>).</t>

<t>Implementations MUST NOT use the symmetric algorithm ID in Public-Key Packets, Public-Subkey Packets, Secret-Key Packets or Secret-Subkey Packets.</t>

<section anchor="key-fields"><name>Algorithm-Specific Fields for Persistent Symmetric Keys</name>

<t>The public key material consists of this series of values:</t>

<t><list style="symbols">
  <t>A 1-octet symmetric algorithm ID (see <xref section="9.3" sectionFormat="of" target="RFC9580"/>).</t>
  <t>A 32-octet random seed to randomize the key fingerprint.</t>
</list></t>

<t>The secret key material consists of this single value:</t>

<t><list style="symbols">
  <t>Symmetric key material of the appropriate length for the given symmetric algorithm.</t>
</list></t>

<t>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.</t>

</section>
<section anchor="pkesk-fields"><name>Algorithm-Specific Fields for Persistent Symmetric Encryption</name>

<t>The encrypted session key consists of this series of values:</t>

<t><list style="symbols">
  <t>A 1-octet AEAD algorithm ID (see <xref section="9.6" sectionFormat="of" target="RFC9580"/>).</t>
  <t>32 octets of salt.
The salt is used to derive the key-encryption key and MUST be securely generated (see <xref section="13.10" sectionFormat="of" target="RFC9580"/>).</t>
  <t>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 <xref target="key-iv-derivation"/>, and as additional data the empty string.
The following values are concatenated and then encrypted:  <list style="symbols">
      <t>The 1-octet algorithm identifier, if it was passed (in the case of a v3 PKESK packet).</t>
      <t>The session key described in <xref section="5.1" sectionFormat="of" target="RFC9580"/>.</t>
    </list></t>
</list></t>

</section>
<section anchor="sig-fields"><name>Algorithm-Specific Fields for Persistent Symmetric Signatures</name>

<t>The signature consists of this series of values:</t>

<t><list style="symbols">
  <t>A 1-octet AEAD algorithm ID (see <xref section="9.6" sectionFormat="of" target="RFC9580"/>).</t>
  <t>32 octets of salt.
The salt is used to derive the message authentication key and MUST be securely generated (see <xref section="13.10" sectionFormat="of" target="RFC9580"/>).</t>
  <t>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 <xref target="key-iv-derivation"/>, and as additional data the hash digest described in <xref section="5.2.4" sectionFormat="of" target="RFC9580"/>.</t>
</list></t>

<t>Although not required by AEAD algorithms, to maintain consistency with existing signature algorithms, AEAD authentication tags are produced from appropriately hashed data, as per <xref section="5.2.4" sectionFormat="of" target="RFC9580"/>.</t>

</section>
<section anchor="key-iv-derivation"><name>Key and IV derivation</name>

<t>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.</t>

<t>M + N bits are derived using HKDF (see <xref target="RFC5869"></xref>).
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 (<xref target="RFC6234"></xref>) 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.</t>

<t>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.</t>

</section>
</section>
<section anchor="security-considerations"><name>Security Considerations</name>

<t>Security considerations are discussed throughout the document where appropriate.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<section anchor="updates-to-packet-types"><name>Updates to Packet Types</name>

<t>IANA is requested to add a row to the "OpenPGP Packet Types" registry with the entry in <xref target="key-packet-registration"/>.
The new row's Reference column should point to this document.</t>

</section>
<section anchor="updates-to-public-key-algorithms"><name>Updates to Public Key Algorithms</name>

<t>IANA is requested to update the "OpenPGP Public Key Algorithms" registry by amending the row
with ID 0 to the values in <xref target="key-algo-registration"/>.
The Reference column of that row should be updated to point to this document.</t>

</section>
</section>
<section anchor="acknowledgements"><name>Acknowledgements</name>

<t>An initial version of this draft was written by Dan Ristea (Proton AG), with guidance from Dr Philipp Jovanovic (University College London) and the editor.</t>

<t>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.</t>

</section>


  </middle>

  <back>


    <references title='Normative References' anchor="sec-normative-references">



<reference anchor="RFC2119">
  <front>
    <title>Key words for use in RFCs to Indicate Requirement Levels</title>
    <author fullname="S. Bradner" initials="S." surname="Bradner"/>
    <date month="March" year="1997"/>
    <abstract>
      <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
    </abstract>
  </front>
  <seriesInfo name="BCP" value="14"/>
  <seriesInfo name="RFC" value="2119"/>
  <seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>
<reference anchor="RFC5869">
  <front>
    <title>HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
    <author fullname="H. Krawczyk" initials="H." surname="Krawczyk"/>
    <author fullname="P. Eronen" initials="P." surname="Eronen"/>
    <date month="May" year="2010"/>
    <abstract>
      <t>This document specifies a simple Hashed Message Authentication Code (HMAC)-based key derivation function (HKDF), which can be used as a building block in various protocols and applications. The key derivation function (KDF) is intended to support a wide range of applications and requirements, and is conservative in its use of cryptographic hash functions. This document is not an Internet Standards Track specification; it is published for informational purposes.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="5869"/>
  <seriesInfo name="DOI" value="10.17487/RFC5869"/>
</reference>
<reference anchor="RFC6234">
  <front>
    <title>US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)</title>
    <author fullname="D. Eastlake 3rd" initials="D." surname="Eastlake 3rd"/>
    <author fullname="T. Hansen" initials="T." surname="Hansen"/>
    <date month="May" year="2011"/>
    <abstract>
      <t>Federal Information Processing Standard, FIPS</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="6234"/>
  <seriesInfo name="DOI" value="10.17487/RFC6234"/>
</reference>
<reference anchor="RFC9580">
  <front>
    <title>OpenPGP</title>
    <author fullname="P. Wouters" initials="P." role="editor" surname="Wouters"/>
    <author fullname="D. Huigens" initials="D." surname="Huigens"/>
    <author fullname="J. Winter" initials="J." surname="Winter"/>
    <author fullname="Y. Niibe" initials="Y." surname="Niibe"/>
    <date month="July" year="2024"/>
    <abstract>
      <t>This document specifies the message formats used in OpenPGP. OpenPGP provides encryption with public key or symmetric cryptographic algorithms, digital signatures, compression, and key management.</t>
      <t>This document is maintained in order to publish all necessary information needed to develop interoperable applications based on the OpenPGP format. It is not a step-by-step cookbook for writing an application. It describes only the format and methods needed to read, check, generate, and write conforming packets crossing any network. It does not deal with storage and implementation questions. It does, however, discuss implementation issues necessary to avoid security flaws.</t>
      <t>This document obsoletes RFCs 4880 ("OpenPGP Message Format"), 5581 ("The Camellia Cipher in OpenPGP"), and 6637 ("Elliptic Curve Cryptography (ECC) in OpenPGP").</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9580"/>
  <seriesInfo name="DOI" value="10.17487/RFC9580"/>
</reference>



    </references>

    <references title='Informative References' anchor="sec-informative-references">



<reference anchor="RFC9980">
  <front>
    <title>Post-Quantum Cryptography in OpenPGP</title>
    <author fullname="S. Kousidis" initials="S." surname="Kousidis"/>
    <author fullname="J. Roth" initials="J." surname="Roth"/>
    <author fullname="F. Strenzke" initials="F." surname="Strenzke"/>
    <author fullname="A. Wussler" initials="A." surname="Wussler"/>
    <date month="June" year="2026"/>
    <abstract>
      <t>This document defines a post-quantum public key algorithm extension for the OpenPGP protocol, extending RFC 9580. Given the generally assumed threat of a cryptographically relevant quantum computer, this extension provides a basis for long-term secure OpenPGP signatures and ciphertexts. Specifically, it defines composite public key encryption based on ML-KEM (formerly CRYSTALS-Kyber), composite public key signatures based on ML-DSA (formerly CRYSTALS-Dilithium), both in combination with Elliptic Curve Cryptography (ECC), and SLH-DSA (formerly SPHINCS+) as a standalone public key signature scheme.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="9980"/>
  <seriesInfo name="DOI" value="10.17487/RFC9980"/>
</reference>

<reference anchor="SOP">
   <front>
      <title>Stateless OpenPGP Command Line Interface</title>
      <author fullname="Daniel Kahn Gillmor" initials="D. K." surname="Gillmor">
         <organization>American Civil Liberties Union</organization>
      </author>
      <author fullname="Daniel Huigens" initials="D." surname="Huigens">
         <organization>Proton AG</organization>
      </author>
      <date day="26" month="June" year="2026"/>
      <abstract>
	 <t>   This document defines a generic stateless command-line interface for
   dealing with OpenPGP messages, certificates, and secret key material,
   known as sop.  It aims for a minimal, well-structured API covering
   OpenPGP object security and maintenance of credentials and secrets.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-dkg-openpgp-stateless-cli-16"/>
   
</reference>

<reference anchor="Shor" target="http://dx.doi.org/10.1137/S0097539795293172">
  <front>
    <title>Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer</title>
    <author initials="P." surname="Shor">
      <organization></organization>
    </author>
    <date year="1997" month="October"/>
  </front>
</reference>


    </references>


<?line 217?>

<section anchor="test-vectors"><name>Test Vectors</name>

<t>To help implementing this specification a set of non-normative examples follow here.</t>

<section anchor="sample-sk"><name>Transferable Secret Key</name>

<t>Here is a Transferable Secret Key consisting of:</t>

<t><list style="symbols">
  <t>A v6 Persistent Symmetric Key packet</t>
</list></t>

<figure><sourcecode type="application/pgp-keys" name="secret-key.asc"><![CDATA[
-----BEGIN PGP PRIVATE KEY BLOCK-----

6DwGaXu4NQAAAAAhB778G6ol+0zgePhnCmEi6PdPZm/BNNe8ao/8MxvEOPno
AE+GgapnjN6EZboLhSVqQL0=
-----END PGP PRIVATE KEY BLOCK-----
]]></sourcecode></figure>

<t>The key has the fingerprint <spanx style="verb">eeea1e834ed8aacf3d938a5ccc6a177fcb7775c290eb02c3c17e5fdaa559b2a5</spanx>.</t>

<t>The raw key material is <spanx style="verb">4f8681aa678cde8465ba0b85256a40bd</spanx> (for AES-128).</t>

</section>
<section anchor="v6-encrypted-message"><name>V6 Encrypted Message</name>

<t>Here is the message "Hello World" encrypted using the secret key in <xref target="sample-sk"/>, consisting of:</t>

<t><list style="symbols">
  <t>A v6 PKESK packet</t>
  <t>A v2 SEIPD packet</t>
</list></t>

<figure><sourcecode type="application/octet-stream" name="v6-message.asc"><![CDATA[
-----BEGIN PGP MESSAGE-----

wXUGIQbu6h6DTtiqzz2TilzMahd/y3d1wpDrAsPBfl/apVmypQACWjxc6uw6
l22qqqSVwJBxSZ03nXQYghPddk5PQJGHQ8L2bADc0Me4GKcpz1SEfGaRxAqt
fkmO2J4WRfPr3ciaacmwbL2EE4TWbUC3nKnyaeHSVwIJAwzL9pRdO5Sazs1T
1f6fl9MfUD/3NqbADxVAiGMbw7e3QbKrMsX0ulYJRsi61DQVummllYExiVnt
K7uBUriICKUzqo+8Q2V8HpMeyV+audJkp62Yuw==
-----END PGP MESSAGE-----
]]></sourcecode></figure>

<t>The session key is encrypted using AES-128 in OCB mode.
The HKDF info is <spanx style="verb">c1060702</spanx>.
The key-encryption key is <spanx style="verb">a64e6ac3aa262e42da23d5a14470857b</spanx>.
The IV is <spanx style="verb">2d9c726a1b01f60f3b05b89cb887f9</spanx>.
The additional data is the empty string.</t>

<t>The encrypted session key is <spanx style="verb">25e5884dc13bcf40d5ab41b3bc23306ebb1907b4d586b2d678e21c496a8bf35a</spanx>.
The message is encrypted using AES-256 in GCM mode.</t>

</section>
<section anchor="v3-encrypted-message"><name>V3 Encrypted Message</name>

<t>Here is the message "Hello World" encrypted using the secret key in <xref target="sample-sk"/>, consisting of:</t>

<t><list style="symbols">
  <t>A v3 PKESK packet</t>
  <t>A v1 SEIPD packet</t>
</list></t>

<figure><sourcecode type="application/octet-stream" name="v3-message.asc"><![CDATA[
-----BEGIN PGP MESSAGE-----

wVwD7uoeg07Yqs8AAuvkkq5zcghyUHMUZa6aZS90Ro/C+7vJFoRjkKCUKRCa
DcKFbmZ3oFj3lq28Ibe8hkTfqr8SLDTcl0P7TnkufzeHBvH6AwPYNCEhvPKS
yyoL/tI8AThJZhgKkUZDFTKhU8CY4r7dCpbAUGz4wjVMseFDKZOAc+ywKt4s
nrX5PNU9VtHTO1ceJmJJq2DKrH+Y
=+t4C
-----END PGP MESSAGE-----
]]></sourcecode></figure>

<t>The session key is encrypted using AES-128.
The HKDF info is <spanx style="verb">c1030702</spanx>.
The key-encryption key is <spanx style="verb">0c233981b8481ff68d253e78e9d7fc1b</spanx>.
The IV is <spanx style="verb">6186c39f7673f2d540f193e05ecab0</spanx>.
The additional data is the empty string.</t>

<t>The encrypted session key is <spanx style="verb">5f43304125ba1728aab843c0a6d4ce75bd8eb3961a2025c3131e58223ecafee2</spanx>.
The message is encrypted using AES-256.</t>

</section>
<section anchor="detached-signature"><name>Detached Signature</name>

<t>Here is a detached signature over the message "Hello World" signed using the secret key in <xref target="sample-sk"/>, consisting of:</t>

<t><list style="symbols">
  <t>A v6 Signature packet</t>
</list></t>

<figure><sourcecode type="application/octet-stream" name="detached-signature.asc"><![CDATA[
-----BEGIN PGP SIGNATURE-----

wnkGAAAIAAAAKQWCaXu9QCKhBu7qHoNO2KrPPZOKXMxqF3/Ld3XCkOsCw8F+
X9qlWbKlAAAAADI0EHT4wSYfRzYXBKpTBs1pmc0Cb+a1BVcMwGMjrKgN1hS4
4R9cgg2C385fWUj4w2KGk7dVXpMKX1Yj+WvErkO5slZd
-----END PGP SIGNATURE-----
]]></sourcecode></figure>

<t>The message is authenticated using AES-128 in OCB mode.
The HKDF info is <spanx style="verb">c2060702</spanx>.
The authentication key is <spanx style="verb">31988c7b45116e19b24ff29a1b93d4c2</spanx>.
The IV is <spanx style="verb">682aa0b80b031fe8882cecf1b6dca6</spanx>.
The additional data is <spanx style="verb">32342abfe99d053a5ea192b9192fb88210f6c479bc6a7be6e653e34147593bac</spanx>.</t>

</section>
</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA81b63LbuJL+z6dAeX6MU5ZkkdTVVVN1ZEm+ybJly3biZKc2
IAlKjChS5sWynGSe5rzJvth2A+BNlzgzJ1W7qUoikbg0Gl93f92AyuWyEjmR
y47IiAWhE0bMi8h4NZ+zKHBMMmCrkDgeuV4wb3Q6Uizf9OgcWlsBtaOywyK7
7MO7xWRRXqQDlMNkgPIMBihXa4pJIzbxg9URCSNLcRbBEYmCOIy0arVd1ZR4
YUGD8Ii0662qQgNGoSEzFei+9APriJx7EQs8FpV7OLESRtSz/pu6vgeyrFio
hLExd8LQ8b271QKenffvTpSFc6QQEvmmaMM/WmwRTY9IDb6FfhAFzA6TtyB1
9vWZeTHD7pPAjxdHZE+qYA+H4VPsvfeDmeNNyCm2wOdz6rjwXCrkX6idih9M
8BUNTJh1bxpFi/Do8BBb4iPnmVWSZof44NAI/GXIDuUYh9g3YAs/13cC+0WN
iunPD6MlrBl27/DNPcBxXFRxlBsp6V6RQzr+2wOBRDSOpn6AuinDXwL4AJ31
KuQsdibMC/kzgZIe9RzmFl4EPoKNWU7kB/wBrBzAF/iR75HOKX8UwrYwEPTW
jyNGLAaSk1PqUidkRNd4E9O3YBhV01riqxMBtEYu9couC8vXMS5VNoy9CHE3
XjrRKwugicVfMLFbVmUqpPv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