<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-morrison-ywing-01" category="info" submissionType="independent" version="3">
  <front>
    <title abbrev="Y-Wing">Y-Wing: A Three-Family Hybrid Sealed Box</title>
    <seriesInfo name="Internet-Draft" value="draft-morrison-ywing-01"/>
    <author fullname="Blake Morrison">
      <organization>Alter Meridian Pty Ltd</organization>
      <address>
        <email>blake@truealter.com</email>
      </address>
    </author>
    <date year="2026" month="December" day="4"/>
    <abstract>
      <t>Data encrypted today can be recorded today and decrypted once any
algorithm protecting it is broken.  Some data must stay secret for
longer than anyone can vouch for a single family of mathematics.</t>
      <t>This document specifies Y-Wing, a sealed box that encrypts one
message to one recipient under three key encapsulations from three
unrelated families at once: X25519 (elliptic curves), ML-KEM-1024
(module lattices) and HQC-5 (quasi-cyclic codes in the Hamming
metric).  The three shared secrets, every ciphertext and every public
key, the two post-quantum keys by their digests, are hashed with
SHA3-256, under a fixed label, into
one content key.  That key seals the message with XChaCha20-Poly1305.
With SHA3-256 modelled as a random oracle, the content key stays
secret while any one of the three shared secrets stays unknown.  The
document describes the construction exactly as a running
implementation builds it, byte for byte, and states what its security
argument covers and what it does not.</t>
    </abstract>
  </front>
  <middle>
    <section anchor="introduction">
      <name>Introduction</name>
      <t>A hybrid key encapsulation mechanism combines a post-quantum
component with a traditional one, and stays secure while either holds.
X-Wing <xref target="I-D.connolly-cfrg-xwing-kem"/> is the best-known
design of that kind.  It joins ML-KEM-768 and X25519 with one SHA3-256
call, and <xref target="I-D.irtf-cfrg-hybrid-kems"/> generalises the
pattern into four frameworks for one post-quantum and one traditional
component.</t>
      <t>Two components answer one question: what if the post-quantum
algorithm is broken before quantum computers arrive, or the
traditional one after?  They do not answer a second.  ML-KEM rests on module lattices, a structured problem with a far shorter record of study than the data some systems must protect will need.  A break of that family would leave a two-component hybrid with only its quantum-vulnerable leg.  Data recorded now and kept for
decades has to survive that case too.</t>
      <t>Y-Wing adds a third leg from a third family.  HQC
<xref target="HQC"/> rests on the hardness of decoding quasi-cyclic
codes in the Hamming metric, a structured case of the decoding problem
for random linear codes that has been studied since 1978.  Its
quasi-cyclic structure has its own, shorter record of study, and it is
a different problem from module lattices.  Version 5.1 of HQC raised
the weights of its parameter sets in answer to recent cryptanalysis.  NIST selected HQC for standardisation in March
2025 as a second KEM beside ML-KEM, from another family.  Its public key is 7,237
octets at the parameter set used here, and this document carries the
key bundle by digest (<xref target="carriage"/>).</t>
      <t>The name follows X-Wing.  X-Wing combines two families, and Y-Wing
combines three, one for each stroke of the Y.  The construction owes
its shape to X-Wing, to the UniversalCombiner of
<xref target="I-D.irtf-cfrg-hybrid-kems"/>, and to the KEM-combiner
analysis of <xref target="GHP18"/> on which that document draws.
<xref target="rationale"/> sets out where it departs from X-Wing and
from that document, and why.</t>
      <t>This document is written from running code.  Every length, byte
order and input to the combiner below matches what the implementation in
<xref target="impl-status"/> produces, and the test vectors of
<xref target="vectors"/> come from it.</t>
      <section anchor="scope">
        <name>Scope</name>
        <t>Y-Wing is a public key encryption scheme for one recipient.  It
gives confidentiality and integrity of the sealed message against an
adversary who does not hold the recipient's private key.  It does not
authenticate the sender, it does not give forward secrecy against
later compromise of the recipient's key, and it is not an interactive
key agreement.  It takes no application context and no associated
data, and it gives no separation between purposes that share one key
bundle (<xref target="sec-purpose"/>).  It defines no new primitive.
It does not define a generic three-component combiner for arbitrary
KEMs.</t>
      </section>
    </section>
    <section anchor="terminology">
      <name>Conventions and Terminology</name>
      <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
"<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>",
"<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>",
"<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>",
"<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and
"<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/>
when, and only when, they appear in all capitals, as shown here.</t>
      <dl>
        <dt>Leg:</dt>
        <dd>One of the three key encapsulations in a box.  The X25519 leg,
the ML-KEM leg and the HQC leg.</dd>
        <dt>Family:</dt>
        <dd>The mathematical problem a leg rests on.  Elliptic-curve
discrete logarithms, module lattices and quasi-cyclic codes in the
Hamming metric.</dd>
        <dt>Key bundle:</dt>
        <dd>The recipient's public key, the concatenation of the three
public keys of <xref target="keys"/>.</dd>
        <dt>Box:</dt>
        <dd>The output of sealing, laid out as in <xref target="wire"/>.</dd>
      </dl>
      <t>In the terms of <xref target="RFC9794"/>, Y-Wing is a post-quantum
traditional (PQ/T) hybrid scheme with two post-quantum component
algorithms and one traditional component algorithm.</t>
      <t><tt>||</tt> denotes concatenation of octet strings.
<tt>SHA3-256(x)</tt> denotes the 32-octet output of SHA3-256 over the
whole of <tt>x</tt>.  All lengths are in octets.</t>
    </section>
    <section anchor="dependencies">
      <name>Cryptographic Dependencies</name>
      <dl>
        <dt>X25519:</dt>
        <dd>The function of <xref target="RFC7748"/> Section 5.  Public
and private keys are 32 octets, and the shared secret is the 32-octet
output.</dd>
        <dt>ML-KEM-1024:</dt>
        <dd>The parameter set of <xref target="FIPS203"/> at NIST security
category 5.  Encapsulation key 1,568 octets, ciphertext 1,568 octets,
shared secret 32 octets.  The decapsulation key is kept in its 64-octet
seed form, <tt>d || z</tt>, from which ML-KEM.KeyGen_internal derives
both halves of the key pair.</dd>
        <dt>HQC-5:</dt>
        <dd>The HQC-KEM parameter set at NIST security category 5, as
version 5.1 of the HQC specification <xref target="HQC"/> gives it
(n = 57,637).  Encapsulation key 7,237 octets,
ciphertext 14,421 octets, shared secret 32 octets.  The decapsulation
key is the 32-octet seed <tt>seed_KEM</tt>, the default form from
version 5.1, from which HQC-KEM key generation derives both halves of
the key pair.  Version 5.1 changes the scheme from version 5.0, and the
keys and ciphertexts of the two versions do not interoperate.  Y-Wing
uses version 5.1 only.</dd>
        <dt>SHA3-256:</dt>
        <dd>The hash function of <xref target="FIPS202"/>, with 32 octets
of output.</dd>
        <dt>XChaCha20-Poly1305:</dt>
        <dd>The AEAD of <xref target="I-D.irtf-cfrg-xchacha"/>, built on
<xref target="RFC8439"/>.  Key 32 octets, nonce 24 octets, tag 16
octets.</dd>
      </dl>
    </section>
    <section anchor="keys">
      <name>Keys</name>
      <section anchor="key-bundle">
        <name>Public Key Bundle</name>
        <t>The recipient's public key is the three component public keys in
a fixed order, 8,837 octets in all:</t>
        <artwork><![CDATA[
offset        length    field
0             32        x25519_pk   X25519 public key
32            1568      mlkem_ek    ML-KEM-1024 encapsulation key
1600          7237      hqc_ek      HQC-5 encapsulation key
]]></artwork>
        <t>Each field is the encoding that its own specification gives the
key.  A sealer <bcp14>MUST</bcp14> refuse a bundle of any other length.  It
<bcp14>MUST</bcp14> also refuse a bundle whose <tt>mlkem_ek</tt> fails the
encapsulation key check of <xref target="FIPS203"/> Section 7.2.  The implementation relies on its runtime for that check.  The runtime refuses such a key before any encapsulation.  This document adds no check on <tt>hqc_ek</tt> beyond the length of the bundle.</t>
      </section>
      <section anchor="private-key">
        <name>Private Key</name>
        <t>The recipient holds three seeds, 128 octets in all:</t>
        <artwork><![CDATA[
field         length    content
x25519_sk     32        X25519 private key
mlkem_seed    64        ML-KEM-1024 seed d || z
hqc_seed      32        HQC-5 decapsulation key seed_KEM
]]></artwork>
        <t>The opener recomputes <tt>x25519_pk</tt> from
<tt>x25519_sk</tt>, <tt>mlkem_ek</tt> from <tt>mlkem_seed</tt> and
<tt>hqc_ek</tt> from <tt>hqc_seed</tt>.  Recomputing <tt>hqc_ek</tt>
costs one HQC-5 key generation.  The private key carries no lead byte
or length prefix of its own.  How it is stored is a local matter.</t>
      </section>
      <section anchor="keygen">
        <name>Key Generation</name>
        <t>The three component key pairs are generated independently, each by
its own algorithm with its own randomness: an X25519 key pair, an
ML-KEM-1024 key pair from a fresh 64-octet seed, and an HQC-5 key
pair from a fresh 32-octet seed.  The key bundle is assembled as in
<xref target="key-bundle"/>.  A component key pair <bcp14>MUST NOT</bcp14> be used
outside Y-Wing.  A key pair generated for another purpose
<bcp14>MUST NOT</bcp14> be used as a Y-Wing component.  The
implementation of <xref target="impl-status"/> does not enforce either
rule itself.</t>
        <t>Y-Wing does not derive the three key pairs from one shared seed.
Its private key is three independent seeds.
<xref target="I-D.irtf-cfrg-hybrid-kems"/> makes one shared seed the
default decapsulation key.  It allows separate key generation where
that cannot be instantiated, and says it should be used only where
component implementations do not allow decapsulation keys to be
imported or exported, with further measures against key reuse where
they do.  The implementation of <xref target="impl-status"/> allows
both, and a shared seed could be instantiated there.</t>
        <t>Y-Wing keeps separate key generation, as the implementation does.
Whether a later revision moves to one shared seed is open
(<xref target="why-own"/>).  The two reuse rules above are those that
<xref target="I-D.irtf-cfrg-hybrid-kems"/> sets for separate key
generation.  This document adds no further measure, and
<xref target="sec-binding"/> states what the choice costs.</t>
      </section>
    </section>
    <section anchor="seal">
      <name>Sealing</name>
      <section anchor="wire">
        <name>Wire Format</name>
        <t>A box is the following, with no other framing:</t>
        <artwork><![CDATA[
offset   length   field
0        1        version     the octet 0x04
1        32       epk         ephemeral X25519 public key
33       1568     ct_k        ML-KEM-1024 ciphertext
1601     14421    ct_h        HQC-5 ciphertext
16022    24       nonce       XChaCha20-Poly1305 nonce
16046    L        ciphertext  encrypted message, L = len(plaintext)
16046+L  16       tag         Poly1305 tag
]]></artwork>
        <t>The fixed overhead is 16,062 octets, and a box is always 16,062
octets longer than the message it seals.  The lead octet 0x04 names
the whole construction: the three algorithms, their parameter sets,
the combiner and the AEAD.  A different choice of any of them is a
different construction and takes a different lead octet.  No registry
of lead octets exists.  The lead octet is not an input to the
combiner, and the label of <xref target="combiner"/> separates the
construction.</t>
        <t>-00 of this document used 0x03 for a construction this document
withdraws, and Y-Wing does not reuse 0x03.  The implementation of
<xref target="impl-status"/> no longer reads -00 keys.</t>
      </section>
      <section anchor="combiner">
        <name>Content Key</name>
        <t>The 32-octet content key is:</t>
        <artwork><![CDATA[
K = SHA3-256( ss_k || ss_h || ss_x
           || ct_k || ct_h || epk
           || SHA3-256(mlkem_ek) || SHA3-256(hqc_ek) || x25519_pk
           || label )
]]></artwork>
        <t>where <tt>ss_k</tt>, <tt>ss_h</tt> and <tt>ss_x</tt> are the
three 32-octet shared secrets and <tt>label</tt> is the 21 ASCII
octets <tt>MLKEM1024-HQC5-X25519</tt>, with no length prefix and no
terminator.  Every input has a fixed length, and the transcript is
always 16,234 octets.  An implementation <bcp14>MUST</bcp14> refuse to
compute <tt>K</tt> over a transcript of any other length.</t>
        <t>This is the field order of the UniversalCombiner of
<xref target="I-D.irtf-cfrg-hybrid-kems"/>: shared secrets, then
ciphertexts, then public keys, then the label, with the post-quantum
component before the traditional one.  Here the post-quantum component
is the pair of ML-KEM-1024 and HQC-5, in wire order, and
X25519 is the traditional component, a nominal group whose ciphertext
is <tt>epk</tt>.  The X25519 public key goes in whole.  The two
post-quantum public keys go in as their SHA3-256 digests
(<xref target="why-own"/>).</t>
        <t>The label names the three algorithms, post-quantum first.
<xref target="I-D.irtf-cfrg-hybrid-kems"/> separates constructions
that share a hash by asking that their labels form a suffix-free set.
The Y-Wing label is not a suffix of the X-Wing label, and the X-Wing
label is not a suffix of it.</t>
      </section>
      <section anchor="seal-proc">
        <name>Seal Procedure</name>
        <t>To seal plaintext <tt>P</tt> to a key bundle:</t>
        <ol spacing="normal" type="1">
          <li>Split the bundle as in <xref target="key-bundle"/>, refusing a
bundle of the wrong length.</li>
          <li>Generate an ephemeral X25519 key pair <tt>(esk, epk)</tt>.
Compute <tt>ss_x = X25519(esk, x25519_pk)</tt>.</li>
          <li>Compute <tt>(ss_k, ct_k) = ML-KEM.Encaps(mlkem_ek)</tt> per
<xref target="FIPS203"/>, refusing an encapsulation key that fails the
check of <xref target="key-bundle"/>.</li>
          <li>Compute <tt>(ss_h, ct_h)</tt> by HQC-5 encapsulation to
<tt>hqc_ek</tt> per <xref target="HQC"/>.</li>
          <li>Draw a 24-octet <tt>nonce</tt> uniformly at random.</li>
          <li>Compute <tt>K</tt> as in <xref target="combiner"/>, hashing
<tt>mlkem_ek</tt> and <tt>hqc_ek</tt> to their digests.</li>
          <li>Compute <tt>C || tag = XChaCha20-Poly1305-Encrypt(K, nonce,
P, "")</tt>, with empty associated data.</li>
          <li>Output <tt>0x04 || epk || ct_k || ct_h || nonce || C ||
tag</tt>.</li>
          <li>Erase <tt>esk</tt>, <tt>K</tt> and the three shared
secrets.</li>
        </ol>
        <t>A sealer that seals the same message to the same key bundle twice
produces two unrelated boxes, since <tt>epk</tt>, both post-quantum
ciphertexts and the nonce are all fresh.</t>
      </section>
    </section>
    <section anchor="open">
      <name>Opening</name>
      <t>To open a box with a private key:</t>
      <ol spacing="normal" type="1">
        <li>If the box is shorter than 16,062 octets, or its first octet is
not 0x04, fail.</li>
        <li>Parse <tt>epk</tt>, <tt>ct_k</tt>, <tt>ct_h</tt>, <tt>nonce</tt>
and the remainder by the offsets of <xref target="wire"/>.</li>
        <li>Compute <tt>ss_x = X25519(x25519_sk, epk)</tt>.  If that
computation fails, including when its output is all zero, mark the box
failed and set <tt>ss_x</tt> to 32 random octets.</li>
        <li>Compute <tt>ss_k = ML-KEM.Decaps(mlkem_seed, ct_k)</tt> per
<xref target="FIPS203"/>.  If it fails, mark the box failed and set
<tt>ss_k</tt> to 32 random octets.</li>
        <li>Compute <tt>ss_h</tt> by HQC-5 decapsulation of
<tt>ct_h</tt> with <tt>hqc_seed</tt> per <xref target="HQC"/>.  If it
fails, mark the box failed and set <tt>ss_h</tt> to 32 random
octets.</li>
        <li>Compute <tt>K</tt> as in <xref target="combiner"/>, with
<tt>x25519_pk</tt>, <tt>mlkem_ek</tt> and <tt>hqc_ek</tt> recomputed
from the private key.</li>
        <li>Decrypt the remainder with XChaCha20-Poly1305 under <tt>K</tt>
and <tt>nonce</tt> with empty associated data.</li>
        <li>If decryption fails, or the box was marked failed, erase any
plaintext and fail.  Otherwise return the plaintext.</li>
        <li>Erase <tt>K</tt> and the three shared secrets.</li>
      </ol>
      <t>All three legs run on every box, whatever happened to the leg
before.  An opener <bcp14>MUST</bcp14> report every failure that the box
can cause, from any step, as one and the same error, and
<bcp14>MUST NOT</bcp14> say which leg or step failed.  A malformed
private key or a runtime without one of the algorithms is a local fault,
independent of the box, and <bcp14>MAY</bcp14> be reported
separately.  ML-KEM and HQC-KEM both decapsulate with implicit
rejection.  A well-formed but corrupted ciphertext therefore yields a
pseudorandom secret with no error.  The box then fails at the tag.
The explicit failure branches catch malformed input and runtime
errors.  HQC-KEM can also fail to decrypt an honestly made
ciphertext, with probability below 2^-256 for HQC-5
(<xref target="HQC"/>, Table 8).  Such a box fails at the tag and is
reported by the same error.</t>
      <t>The opener does not verify that the box was sealed to its own key
bundle by any means other than the tag.  A box sealed to another
bundle, or with any octet altered, fails the tag check and is reported
by the same error.</t>
    </section>
    <section anchor="carriage">
      <name>Key Carriage</name>
      <t>A Y-Wing key bundle is 8,837 octets, and its base64url encoding,
without padding, is 11,783 characters.  That fits the 65,535 octets a
DNS message over TCP can hold (<xref target="RFC1035"/> Section
4.2.2), and that encoding is more than nine times the 1232-octet UDP
budget that
<xref target="I-D.morrison-mcp-dns-discovery"/> writes its records to.
Carried in line, the bundle would be in every response for the owner
name, retrieved over TCP after a truncated UDP response, by every
resolver that asks for the record for any reason.  It would also count
against the 65,535-octet bound that the whole RRset at that owner name
shares.  A sender needs the bundle once and can reuse it for as long
as it is unchanged.  A bundle is therefore carried by digest, as
<xref target="I-D.morrison-mcp-dns-discovery"/> carries an ML-DSA-87
key in its Section 7.7 (Post-Quantum Key Carriage), and a record names
it in 43 characters.</t>
      <ol spacing="normal" type="1">
        <li>The record carries the SHA-256 digest of the whole 8,837-octet
bundle, in base64url without padding <xref target="RFC4648"/>.  It is 43 characters long.</li>
        <li>The bundle is served at
<tt>https://&lt;zone&gt;/.well-known/alter-pk/&lt;digest&gt;</tt>
<xref target="RFC8615"/> as the raw octets with media type
<tt>application/octet-stream</tt>.</li>
        <li>A sender <bcp14>MUST</bcp14> fetch the bundle only from a record that
has passed DNSSEC validation, <bcp14>MUST</bcp14> accept only a body of
exactly 8,837 octets, <bcp14>MUST</bcp14> stop reading at one octet past
that length, and <bcp14>MUST</bcp14> compare the SHA-256 digest of the body
with the record over all 32 octets before sealing anything to it.</li>
        <li>The resource is named by its own digest and never changes.  A
sender <bcp14>SHOULD</bcp14> fetch it once and cache it, and
<bcp14>MAY</bcp14> seal to a cached bundle whose digest it has already
checked for as long as the record still names that digest.</li>
      </ol>
      <t>Every other retrieval rule of that section applies unchanged,
including its refusal of a redirect to another host, and so do the
rules of its Section 7.7.1 (Size Budget) on records split across
character-strings and the retry over TCP when a UDP response is
truncated.  <xref target="I-D.morrison-mcp-dns-discovery"/> defines its
key field for signature verification keys, and defines no record field
or registry entry under which a zone names a Y-Wing encryption key.  A
revision of that document <bcp14>MAY</bcp14> define them.  This document
fixes only the octets that the digest covers.</t>
      <t>A sender that seals many boxes to one recipient fetches the bundle
once.  After that, each box costs 16,062 octets of overhead.</t>
    </section>
    <section anchor="rationale">
      <name>Design Rationale</name>
      <section anchor="why-three">
        <name>Why Three Families</name>
        <t>A two-component hybrid survives the loss of one family.  For data
whose secrecy must outlast the confidence anyone can place in a
single post-quantum family, that is one family too few.  SIKE was a
NIST fourth-round candidate when a classical key-recovery attack broke
it in 2022.  A hybrid that paired SIKE with X25519 would then have stood on X25519 alone.  A quantum adversary holding recorded traffic breaks that leg later.  Y-Wing keeps two post-quantum families so that
the loss of either leaves a post-quantum leg standing.</t>
        <t>The two post-quantum legs are both at NIST category 5.  ML-KEM-1024
is the standardised lattice KEM.  HQC-5 is the code-based KEM that
NIST selected beside it.  Its cost sits in its ciphertext, 14,421
octets in every box, and its key is small enough to regenerate from a
32-octet seed.  Y-Wing takes the code-based KEM on the NIST standards
track and pays for it in box size.</t>
      </section>
      <section anchor="why-own">
        <name>Why Not an Existing Combiner</name>
        <t>A reader who knows <xref target="I-D.irtf-cfrg-hybrid-kems"/> and
X-Wing will ask why Y-Wing does not use one of their combiners.  It
uses the hash, the field order and the label convention of the first.
It departs from both in two places, and only the first is a
necessity.</t>
        <t>First, neither applies as written.
<xref target="I-D.irtf-cfrg-hybrid-kems"/> restricts itself to one
post-quantum and one traditional component, and lists more than two
components as out of scope.  X-Wing fixes its components to ML-KEM-768
and X25519.  Its combiner also leaves the ML-KEM ciphertext out of the
hash, which rests on the ciphertext second-preimage resistance (C2PRI)
of ML-KEM.  That property is not established for HQC.  Y-Wing relies
on it for neither post-quantum leg, and hashes every ciphertext as the UniversalCombiner of
<xref target="I-D.irtf-cfrg-hybrid-kems"/> does.  The Y-Wing combiner is,
in structure, that UniversalCombiner with a second post-quantum leg
joined to the first, and with the post-quantum public keys replaced by
their digests.  It uses SHA3-256, the KDF for which that document cites
indifferentiability results against classical and quantum adversaries,
and a fixed label placed last.</t>
        <t><xref target="I-D.josefsson-chempat"/> hashes the concatenated
public keys of its components to a digest before combining.  That is
the precedent for the digest step of Y-Wing.  Chempat has two
components, and the case of <xref target="why-three"/> is outside
it.</t>
        <t>Second, the digests.  The UniversalCombiner hashes each
encapsulation key whole.  Y-Wing hashes a SHA3-256 digest of each
post-quantum key in its place.  With the hash modelled as a random
oracle, the digest binds the key as firmly as the key itself, and under
collision resistance a change of either key changes <tt>K</tt>.  The
analysis of <xref target="I-D.irtf-cfrg-hybrid-kems"/> does not cover
this step, and <xref target="sec-unproved"/> says so.</t>
        <t>HQC-KEM version 5.1 derives its shared secret from a hash of its
encapsulation key, as ML-KEM does.  No published binding analysis
covers HQC-KEM version 5.1, and Y-Wing does not rely on that
derivation.  The digest in the transcript binds each post-quantum key
whatever its KEM provides.  Y-Wing keeps the digest step, as the
implementation does.
A sealer computes each digest once per bundle and reuses it for every
box to that bundle.  X-Wing warns that leaving a post-quantum
ciphertext out of the combiner is not known to be safe in general, and
Y-Wing leaves none out.</t>
        <t>Moving Y-Wing the rest of the way onto
<xref target="I-D.irtf-cfrg-hybrid-kems"/> would take two more changes:
the post-quantum keys hashed whole, and key pairs derived from one
shared seed, which both ML-KEM and HQC key generation permit, since
each is driven by a short seed.  Neither change has a cost that rules
it out.  Either change would make a new
construction under a new lead octet, and whether to make it is
open.</t>
      </section>
    </section>
    <section anchor="impl-status" removeInRFC="true">
      <name>Implementation Status</name>
      <t>This section records the status of known implementations of the
protocol defined by this specification at the time of posting of
this Internet-Draft, and is based on a proposal described in
<xref target="RFC7942"/>.  The description of implementations in this section is
intended to assist the IETF in its decision processes in progressing
drafts to RFCs.  Please note that the listing of any individual
implementation here does not imply endorsement by the IETF.
No effort has been spent to verify the information
presented here that was supplied by IETF contributors.  This is not
intended as, and must not be construed to be, a catalog of available
implementations or their features.  Readers are advised to note that
other implementations may exist.</t>
      <t>According to <xref target="RFC7942"/>, "this will allow reviewers and working
groups to assign due consideration to documents that have the
benefit of running code, which may serve as evidence of valuable
experimentation and feedback that have made the implemented
protocols more mature.  It is up to the individual working groups
to use this information as they see fit".</t>
      <t>~alter, the identity infrastructure operated by Alter Meridian Pty
Ltd, deploys Y-Wing.  Its MCP connector, a TypeScript program on
Node.js, performs key generation, sealing and opening as this document
describes them.  The connector generates a Y-Wing key pair for its device once
and keeps it, opens boxes led by 0x04, and seals to a recipient device
when it is given that device's key bundle.  X25519, ML-KEM-1024 and
SHA3-256 come from the runtime's own cryptographic library.  ML-KEM
there needs Node.js 24.7 or later.  The HQC-5 leg is the HQC team's
reference implementation at tag v5.1.0, compiled to WebAssembly.  The
build changes one line of one header: a mask written as
<tt>1UL</tt>, which is 64 bits on the hosts the reference targets and
32 bits on a 32-bit WebAssembly target, is compiled as
<tt>1ULL</tt>.  The value is the same on a 64-bit host.</t>
      <t>The WebAssembly build reproduces all 100 entries of the
known-answer test file that the reference carries for HQC-5, byte for
byte, and the implementation's tests repeat that check on every run.
The HQC-5 values in the test vectors of <xref target="vectors"/> come
from the reference built natively and unchanged.  The vectors were
checked independently against Python's SHA3-256, libsodium's
XChaCha20-Poly1305, a separate X25519 implementation and a separate
ML-KEM implementation, and the tests replay them byte for byte in both
directions.  The HQC ciphertexts and shared secrets have not been
checked against a second implementation of HQC-KEM version 5.1.</t>
      <t>Measured in WebAssembly under Node.js on a desktop machine, an
HQC-5 key generation takes about 9 milliseconds, encapsulation about
18 milliseconds and decapsulation about 36 milliseconds.</t>
      <t>truealter.com serves the key bundle of its zone at the path of
<xref target="carriage"/>.  Contact: Blake Morrison, blake@truealter.com.</t>
    </section>
    <section anchor="security">
      <name>Security Considerations</name>
      <section anchor="sec-claim">
        <name>The Claim</name>
        <t>Model SHA3-256 as a random oracle.  Then the content key
<tt>K</tt> of a box is indistinguishable from random to any adversary
for whom at least one of <tt>ss_k</tt>, <tt>ss_h</tt> and <tt>ss_x</tt>
of that box stays unknown.  This holds while any one of the following
holds: the strong Diffie-Hellman problem in the X25519 group, in the
sense of <xref target="I-D.irtf-cfrg-hybrid-kems"/> Section 6.1.3; the
IND-CCA security of ML-KEM-1024; the IND-CCA security of
HQC-5.  With <tt>K</tt> pseudorandom and used once, the
AEAD makes the box confidential against an adversary who may open
other boxes (IND-CCA), and any alteration of a box makes it fail to
open.  Anyone holding the key bundle can seal a new, valid box.
Y-Wing does not show who sealed one (<xref target="scope"/>).</t>
        <t>The argument is the KEM-combiner argument of <xref target="GHP18"/>
for n components, with the X25519 leg treated as a nominal group, as in
the UG framework of <xref target="I-D.irtf-cfrg-hybrid-kems"/>, whose
IND-CCA analysis is <xref target="CG26"/>.
The adversary learns nothing about <tt>K</tt> unless it queries the
oracle on the exact transcript, and the transcript contains the
unknown secret.  Each ciphertext is in the transcript.  An open
query on any box that differs in <tt>epk</tt>, <tt>ct_k</tt> or
<tt>ct_h</tt> hashes a different input and yields an independent key.
This is why no leg needs ciphertext second-preimage resistance.  The
strong Diffie-Hellman reductions of X-Wing and of <xref target="CG26"/>
need the X25519 public key and the ephemeral key in the transcript, and
both are there.  The label, fixed and last, separates the transcript
from that of any other construction whose label forms a suffix-free
set with it (<xref target="combiner"/>).  The digests
of the two post-quantum public keys bind the box to one key bundle: a
leg lifted out of one box and placed into a box for another bundle
changes the transcript and fails.</t>
        <t>A box therefore stays closed until X25519, ML-KEM-1024 and
HQC-5 have all fallen, provided the hash holds.</t>
      </section>
      <section anchor="sec-unproved">
        <name>What Is Not Proved</name>
        <ul spacing="normal">
          <li>No published proof covers this exact transcript.  The argument
above adapts published proofs for two components and for n generic
KEMs.  It has not been written out as a full reduction or checked by
machine.  <xref target="I-D.irtf-cfrg-hybrid-kems"/> warns that any
change to its algorithms is not guaranteed to produce secure results,
and the third leg and the public key digests are such changes.</li>
          <li>The argument needs SHA3-256 to behave as a random oracle.
<xref target="I-D.irtf-cfrg-hybrid-kems"/> cites indifferentiability
results for SHA-3 against classical and quantum adversaries.  The
argument above is in the classical random-oracle model, and no
quantum-random-oracle analysis of this construction exists.</li>
          <li>Binding against an adversary who chooses the recipient's keys is
not claimed (<xref target="sec-binding"/>).</li>
          <li>Constant-time behaviour of the WebAssembly HQC code is
inherited from the reference sources and has not been measured after
compilation and just-in-time translation.</li>
          <li>HQC-KEM is not yet published as a NIST standard.  Y-Wing follows
version 5.1 of its specification.  A standard that differs from
version 5.1 in any key, ciphertext or derivation would need a new
construction under a new lead octet.</li>
        </ul>
      </section>
      <section anchor="sec-binding">
        <name>Binding and Key Generation</name>
        <t>The three component key pairs are generated independently.
<xref target="I-D.irtf-cfrg-hybrid-kems"/> states that independent key
generation reduces its binding guarantees from an adversary who can
craft the decapsulation key to one who can only read it.  The same
holds here.  Y-Wing claims that the content key binds the ciphertexts
and the public keys against an adversary who learns the private key
(the LEAK binding notions of that document), and claims nothing
against one who chooses it.  Every ciphertext and every public key,
the two post-quantum keys by their digests, is in the transcript, and
in that model binding of <tt>K</tt> to them reduces to the collision
resistance of SHA3-256, 128 bits against a classical adversary.  The
opener recomputes every public key from its own seed, and holds no
public key or digest that could disagree with its private key.
<xref target="keygen"/> says why -01 keeps the weaker notion and that
the choice is open.</t>
      </section>
      <section anchor="sec-nonce">
        <name>Nonce and Key Reuse</name>
        <t>Every box has a fresh content key, because <tt>epk</tt> and both
post-quantum ciphertexts are fresh.  The random 24-octet nonce is a
second safeguard against a sealer whose ephemeral randomness repeats.
A sealer that repeats all of its randomness repeats its box, and
nothing in Y-Wing defends against that.</t>
      </section>
      <section anchor="sec-oracle">
        <name>Failure Reporting</name>
        <t>All three legs run on every open and all failures share one error.
An opener that reported which leg failed, or that stopped at the first
failed leg, would hand an adversary an oracle on each leg separately
and weaken the claim of <xref target="sec-claim"/> toward the weakest leg.
Implementations <bcp14>MUST</bcp14> follow <xref target="open"/> in both
respects.</t>
      </section>
      <section anchor="sec-purpose">
        <name>One Key Bundle, One Purpose</name>
        <t>The transcript carries one fixed label and no input from the
application, and the AEAD has empty associated data.  A box sealed for
one purpose therefore opens for any other purpose that uses the same
key bundle, and nothing in the box tells the opener which purpose it
was sealed for.  An application that seals for more than one purpose
<bcp14>SHOULD</bcp14> give each purpose its own key bundle, or carry
the purpose inside the sealed message and check it after opening.</t>
      </section>
      <section anchor="sec-fetch">
        <name>Key Retrieval</name>
        <t>A sender fetches a key bundle from a host it reaches through a
record.  The size bound and early stop of <xref target="carriage"/> limit
what a hostile host can make it read.  The digest check means a host
can withhold a key and cannot substitute one.  A sender that cannot
retrieve and check a bundle does not seal to it.</t>
      </section>
    </section>
    <section anchor="iana">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.  The lead octet 0x04 is defined
by this document alone.  A record field and registry entry for
carrying a Y-Wing key by digest would belong to
<xref target="I-D.morrison-mcp-dns-discovery"/>
(<xref target="carriage"/>).</t>
    </section>
  </middle>
  <back>
    <references anchor="sec-references">
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <reference anchor="RFC2119" target="https://www.rfc-editor.org/info/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"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174" target="https://www.rfc-editor.org/info/rfc8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
        <reference anchor="RFC7748" target="https://www.rfc-editor.org/info/rfc7748">
          <front>
            <title>Elliptic Curves for Security</title>
            <author fullname="A. Langley" initials="A." surname="Langley"/>
            <author fullname="M. Hamburg" initials="M." surname="Hamburg"/>
            <author fullname="S. Turner" initials="S." surname="Turner"/>
            <date month="January" year="2016"/>
          </front>
          <seriesInfo name="RFC" value="7748"/>
          <seriesInfo name="DOI" value="10.17487/RFC7748"/>
        </reference>
        <reference anchor="RFC8439" target="https://www.rfc-editor.org/info/rfc8439">
          <front>
            <title>ChaCha20 and Poly1305 for IETF Protocols</title>
            <author fullname="Y. Nir" initials="Y." surname="Nir"/>
            <author fullname="A. Langley" initials="A." surname="Langley"/>
            <date month="June" year="2018"/>
          </front>
          <seriesInfo name="RFC" value="8439"/>
          <seriesInfo name="DOI" value="10.17487/RFC8439"/>
        </reference>
        <reference anchor="RFC4648" target="https://www.rfc-editor.org/info/rfc4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <date month="October" year="2006"/>
          </front>
          <seriesInfo name="RFC" value="4648"/>
          <seriesInfo name="DOI" value="10.17487/RFC4648"/>
        </reference>
        <reference anchor="RFC8615" target="https://www.rfc-editor.org/info/rfc8615">
          <front>
            <title>Well-Known Uniform Resource Identifiers (URIs)</title>
            <author fullname="M. Nottingham" initials="M." surname="Nottingham"/>
            <date month="May" year="2019"/>
          </front>
          <seriesInfo name="RFC" value="8615"/>
          <seriesInfo name="DOI" value="10.17487/RFC8615"/>
        </reference>
        <reference anchor="FIPS203" target="https://csrc.nist.gov/pubs/fips/203/final">
          <front>
            <title>Module-Lattice-Based Key-Encapsulation Mechanism Standard</title>
            <author>
              <organization>National Institute of Standards and Technology</organization>
            </author>
            <date month="August" year="2024"/>
          </front>
          <seriesInfo name="FIPS" value="203"/>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.203"/>
        </reference>
        <reference anchor="HQC" target="https://pqc-hqc.org/doc/hqc_specifications_v5.1.pdf">
          <front>
            <title>Hamming Quasi-Cyclic (HQC), Version 5.1</title>
            <author fullname="Philippe Gaborit" initials="P." surname="Gaborit"/>
            <author fullname="Carlos Aguilar-Melchor" initials="C." surname="Aguilar-Melchor"/>
            <author fullname="Nicolas Aragon" initials="N." surname="Aragon"/>
            <author fullname="Slim Bettaieb" initials="S." surname="Bettaieb"/>
            <author fullname="Loic Bidoux" initials="L." surname="Bidoux"/>
            <author fullname="Olivier Blazy" initials="O." surname="Blazy"/>
            <author fullname="Jean-Christophe Deneuville" initials="J.-C." surname="Deneuville"/>
            <author fullname="Edoardo Persichetti" initials="E." surname="Persichetti"/>
            <author fullname="Gilles Zemor" initials="G." surname="Zemor"/>
            <author fullname="Jurjen Bos" initials="J." surname="Bos"/>
            <author fullname="Arnaud Dion" initials="A." surname="Dion"/>
            <author fullname="Jerome Lacan" initials="J." surname="Lacan"/>
            <author fullname="Jean-Marc Robert" initials="J.-M." surname="Robert"/>
            <author fullname="Pascal Veron" initials="P." surname="Veron"/>
            <author fullname="Paulo L. Barreto" initials="P. L." surname="Barreto"/>
            <author fullname="Santosh Ghosh" initials="S." surname="Ghosh"/>
            <author fullname="Shay Gueron" initials="S." surname="Gueron"/>
            <author fullname="Tim Gueneysu" initials="T." surname="Gueneysu"/>
            <author fullname="Rafael Misoczki" initials="R." surname="Misoczki"/>
            <author fullname="Jan Richter-Brockmann" initials="J." surname="Richter-Brockmann"/>
            <author fullname="Nicolas Sendrier" initials="N." surname="Sendrier"/>
            <author fullname="Jean-Pierre Tillich" initials="J.-P." surname="Tillich"/>
            <author fullname="Valentin Vasseur" initials="V." surname="Vasseur"/>
            <date month="November" day="9" year="2026"/>
          </front>
          <refcontent>Specification, with the reference implementation at tag v5.1.0 of https://gitlab.com/pqc-hqc/hqc</refcontent>
        </reference>
        <reference anchor="FIPS202" target="https://csrc.nist.gov/pubs/fips/202/final">
          <front>
            <title>SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions</title>
            <author>
              <organization>National Institute of Standards and Technology</organization>
            </author>
            <date month="August" year="2015"/>
          </front>
          <seriesInfo name="FIPS" value="202"/>
          <seriesInfo name="DOI" value="10.6028/NIST.FIPS.202"/>
        </reference>
        <reference anchor="I-D.irtf-cfrg-hybrid-kems" target="https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hybrid-kems-12">
          <front>
            <title>Hybrid PQ/T Key Encapsulation Mechanisms</title>
            <author fullname="Deirdre Connolly" initials="D." surname="Connolly"/>
            <author fullname="Richard Barnes" initials="R." surname="Barnes"/>
            <author fullname="Paul Grubbs" initials="P." surname="Grubbs"/>
            <date month="July" day="6" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-irtf-cfrg-hybrid-kems-12"/>
        </reference>
        <reference anchor="I-D.irtf-cfrg-xchacha" target="https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-xchacha-03">
          <front>
            <title>XChaCha: eXtended-nonce ChaCha and AEAD_XChaCha20_Poly1305</title>
            <author fullname="Scott Arciszewski" initials="S." surname="Arciszewski"/>
            <date month="January" year="2020"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-irtf-cfrg-xchacha-03"/>
        </reference>
        <reference anchor="I-D.morrison-mcp-dns-discovery" target="https://datatracker.ietf.org/doc/html/draft-morrison-mcp-dns-discovery-11">
          <front>
            <title>Discovery of Model Context Protocol Servers via DNS</title>
            <author fullname="Blake Morrison" initials="B." surname="Morrison"/>
            <date month="December" day="3" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-morrison-mcp-dns-discovery-11"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="I-D.connolly-cfrg-xwing-kem" target="https://datatracker.ietf.org/doc/html/draft-connolly-cfrg-xwing-kem-11">
          <front>
            <title>X-Wing: general-purpose hybrid post-quantum KEM</title>
            <author fullname="Deirdre Connolly" initials="D." surname="Connolly"/>
            <author fullname="Peter Schwabe" initials="P." surname="Schwabe"/>
            <author fullname="Bas Westerbaan" initials="B. E." surname="Westerbaan"/>
            <date month="September" day="23" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-connolly-cfrg-xwing-kem-11"/>
        </reference>
        <reference anchor="I-D.josefsson-chempat" target="https://datatracker.ietf.org/doc/html/draft-josefsson-chempat-05">
          <front>
            <title>Chempat: Generic Instantiated PQ/T Hybrid Key Encapsulation Mechanisms</title>
            <author fullname="Simon Josefsson" initials="S." surname="Josefsson"/>
            <date month="June" day="24" year="2026"/>
          </front>
          <seriesInfo name="Internet-Draft" value="draft-josefsson-chempat-05"/>
        </reference>
        <reference anchor="CDM23" target="https://eprint.iacr.org/2023/1933">
          <front>
            <title>Keeping Up with the KEMs: Stronger Security Notions for KEMs and automated analysis of KEM-based protocols</title>
            <author fullname="Cas Cremers" initials="C." surname="Cremers"/>
            <author fullname="Alexander Dax" initials="A." surname="Dax"/>
            <author fullname="Niklas Medinger" initials="N." surname="Medinger"/>
            <date year="2023"/>
          </front>
          <refcontent>Cryptology ePrint Archive, Paper 2023/1933</refcontent>
        </reference>
        <reference anchor="CG26" target="https://doi.org/10.62056/ahmp-49p1">
          <front>
            <title>StarFortress: Hybrid KEMs with Diffie-Hellman Inlining</title>
            <author fullname="Deirdre Connolly" initials="D." surname="Connolly"/>
            <author fullname="Paul Grubbs" initials="P." surname="Grubbs"/>
            <date month="May" year="2026"/>
          </front>
          <refcontent>IACR Communications in Cryptology, vol. 3, no. 1</refcontent>
          <seriesInfo name="DOI" value="10.62056/ahmp-49p1"/>
        </reference>
        <reference anchor="GHP18">
          <front>
            <title>KEM Combiners</title>
            <author fullname="Federico Giacon" initials="F." surname="Giacon"/>
            <author fullname="Felix Heuer" initials="F." surname="Heuer"/>
            <author fullname="Bertram Poettering" initials="B." surname="Poettering"/>
            <date year="2018"/>
          </front>
          <refcontent>Public-Key Cryptography - PKC 2018, LNCS 10769, pp. 190-218</refcontent>
          <seriesInfo name="DOI" value="10.1007/978-3-319-76578-5_7"/>
        </reference>
        <reference anchor="RFC9794" target="https://www.rfc-editor.org/info/rfc9794">
          <front>
            <title>Terminology for Post-Quantum Traditional Hybrid Schemes</title>
            <author fullname="F. Driscoll" initials="F." surname="Driscoll"/>
            <author fullname="M. Parsons" initials="M." surname="Parsons"/>
            <author fullname="B. Hale" initials="B." surname="Hale"/>
            <date month="June" year="2025"/>
          </front>
          <seriesInfo name="RFC" value="9794"/>
          <seriesInfo name="DOI" value="10.17487/RFC9794"/>
        </reference>
        <reference anchor="RFC7942" target="https://www.rfc-editor.org/info/rfc7942">
          <front>
            <title>Improving Awareness of Running Code: The Implementation Status Section</title>
            <author fullname="Y. Sheffer" initials="Y." surname="Sheffer"/>
            <author fullname="A. Farrel" initials="A." surname="Farrel"/>
            <date month="July" year="2016"/>
          </front>
          <seriesInfo name="BCP" value="205"/>
          <seriesInfo name="RFC" value="7942"/>
          <seriesInfo name="DOI" value="10.17487/RFC7942"/>
        </reference>
        <reference anchor="RFC1035" target="https://www.rfc-editor.org/info/rfc1035">
          <front>
            <title>Domain names - implementation and specification</title>
            <author fullname="P. Mockapetris" initials="P." surname="Mockapetris"/>
            <date month="November" year="1987"/>
          </front>
          <seriesInfo name="STD" value="13"/>
          <seriesInfo name="RFC" value="1035"/>
          <seriesInfo name="DOI" value="10.17487/RFC1035"/>
        </reference>
      </references>
    </references>
    <section anchor="vectors">
      <name>Test Vector</name>
      <t>One vector from the implementation's set, sealing the empty
message.  Every random input is fixed, and an independent
implementation can reproduce every value from them.  The HQC-5 key pair
is HQC-KEM key generation from the stated 32-octet seed.  The ML-KEM
encapsulation is ML-KEM.Encaps_internal of <xref target="FIPS203"/>
with the stated <tt>m</tt>.  The HQC-5 encapsulation is HQC-KEM
encapsulation with the stated <tt>m</tt> and <tt>salt</tt>, in the
order the reference implementation reads them.  The HQC encapsulation
key, the HQC ciphertext, the key bundle and the box are given by their
SHA-256 digests.  The full set, three boxes with every intermediate
value, is available from the author.</t>
      <artwork><![CDATA[
recipient x25519_sk
  90629e551c07cdb6d190b03789826b891742ac823be4187ea65c9258b21af665
recipient x25519_pk
  520b74bd2b347c452d791a0202160bd8c971771d75c2dc288b2253bce2946a7b
recipient mlkem_seed (d || z)
  b249b03e463eeff01dc37c26aa37f06c3dc70536596015954a2a00329084b404
  8ae31537de82c6ecfb77e5b1cfceb3b6b851ec753d6fffad4f6d6d675ad8ad92
recipient hqc_seed
  93ada475dd13f149b1f8cac0b2734a5f4ce42580434cdd2c8da686e0e7bd925d
SHA3-256(mlkem_ek)
  fbf7e68057b4852633bbd05594272c76c2006fc24bcd8df094b793621345e86a
SHA3-256(hqc_ek)
  3b8c2d1312a3d0b6aef75fed96d56b30606a92ecdd4f139187fdd83345ded445
SHA-256(hqc_ek)
  b8ef7968036f8d105ad537d27ebd07b528a4909e259f65ff013febb2aec58abc
SHA-256(key bundle), the digest a record carries
  88556807a469db688f084af11796a9082d1488815d165f4e42a0657407434387
the same digest in base64url
  iFVoB6Rp22iPCErxF5apCC0UiIFdFl9OQqBldAdDQ4c
]]></artwork>
      <artwork><![CDATA[
ephemeral esk
  c1e0d66727a3dd3a07cf111a25ac303bc91a4c1b740a1f31e6209970efaef46d
epk
  e047c836ea2d0fe9f9b39f0c50b75e2010a5245f45189b69a90911ee05c27f03
ss_x
  10f12450594d4aac770b1251265f8294b7113222df89e8e2628bee0081fefb0a
ML-KEM encapsulation m
  9d8973478a254257662130104c9681577de3cdb404ddf71aa3112d3000899105
ct_k (1,568 octets), octets 0 to 799
  f1a4c3b92c805017f94f6ba99e66fb1693c93f951d5a080a6580306eb4452ec9
  f8aec3f1968adc3bfac53db933950015d9a614e1b85211786dd6ed87025e53ca
  5f6af1001d0a2a1857540a9eee1802f4b1c4853644833003b0387d00e38fff0e
  20a7dce7123fbf3cdfef4b68a12e9ef1238a2b20ffd614abb55e4041a4236d00
  1bbc6b49e954aa08f02233078f0187e74c0b4fa6f4b02924a36201f9b429b68a
  38e3b98eb51a583bba04a29680667292902ac2e7ca662821103c978e7b177aac
  76bf4117f12840c50157c56a50d439cb8ee06e7da9fc1212281ccba0c0a102c7
  a03716528983c3ec169f61fba2ed4a62770e287b7717014e2dee53fb5b62121b
  d1e30d4f10531a423345061f50b230f278d388dd31d06655a149da8086d5cdfc
  c1ee9ac407ec816bd68dd8964612ff1afca8eef3fbf5b38f12b9a777fbb735d5
  22d884fba99b41abb711488b46d4bfbe7ce907535e7c4e869fdb54c18270b682
  04697557265f1e981194020e746e2be6f676ef3ab91af28a63828135dd32e1b1
  60011963b9a7ced4860220c8627862239c0d00fcc742400111eccac1ef6c7856
  c2d2ccf2e92c38a7649e2843447a72fb9fa66c5b0bb66a24a5c847b7eb5199bc
  ef6a49d35a72c4cf720b533dd886ab924013ba68dcb1274002c6f8eb44094bea
  afca83c4322ce4483d1e959e46211b90d9fe765d1e5166cc2b5348e2b735148e
  420162c5ce9bb56d0cccbc0d566d37cb0a8b69815af51dfce95048930b97c172
  407672be51262191c25b8afb5a1627c68acaa3c1a47be7013c0bd88635c22694
  694ee8f990914fa3e14265fe72334cc3b595f28f72b8eef60ddbdde8da0c00a9
  a72175f401e2f2ebf25b8bf979cc68bacb7365a908b28df7ee12405ae8b1c0dc
  ce47f7a5b37cf183e97c11de3a1be051db33445e097d5ba3abaf042d501e366c
  024396d0bd6fdff6aa1d18cc2d8dbe71b0499859141221f799bc95d12640f537
  102d4beec20deafba033a45da71d7922eb2a4131240633627bd4e75ae39b87d1
  868274c3b33a0732c5f82eadea0df02a3ab4222122212b72a26d0b0baa61d1c0
  b3c16383b25c139d313ff47d1905cd07642ba26562da767122a2a9d86cfbb5ea
]]></artwork>
      <artwork><![CDATA[
ct_k, octets 800 to 1,567
  63ef9b56d7ace3b5a3e8075d3d531cd3961915be25196dd6e313b6fdb4f0cf51
  368820ed59169637aad18e4f958a02326387a2ba89f0c87746e3b38e01c0ee6d
  60fbc030e78edd20175c05d44143ceeb485ebb46689c393ee3e9080d639fefd5
  ef9a7f14da725849c731bebfbdab30c02c490de5f785f8adcc35eb9e2377bcfd
  3c4c11ff41ae3b250db4bd6b58980cfdfd9b747790a9899fcc139838ebfc4939
  0945d5cd2487535d457e9f0e95d66703253be8684093f3054b72a63124d033f2
  330ff78e427599c1874a7174330b63fe3a8313affe7b99adc2108d536d5601d2
  d82c21c2264c24e931b802ee485910a87be82870cee21eddc94e5c53f983997a
  228ac8b8194406a8317a707e72c042b2a233ced10383a1e579c3725319b59812
  178222769b00994ce88d3f1231a5342d8ff049a1781d4df651da3037fb71e99c
  e9fbac65757c2fc67f2d91341ff8a7f3bd5a6f6c5f28c7b03bbef548bc19dfd6
  e2a7f3cf3c9b72e179d7c83ee74f005a203eb35fb8e15f005d5a918e5bf50154
  0d2653f2c0e6137130867a9bb37b4eb4bfbb10cdc391851a44272cbe36dfbb9a
  14d3d7422de33d55ceb09ee1befbb660e64414ad1928a97e0e369d316d0b53c2
  14526b0a6311b4e0eecb8f3a2840461c70b0c0ee7906ca10095d22e9240d8503
  30d6b44016e9209237f5fee420aa9a4eb16955a4a5c69ccaf08eb2dfbc501f88
  646d2b6c43a9f6c7b75dfb0617cddd37e1ccb739d097f803557ea8be1d7406f3
  311af935af55176be69fcafc08c8031d86ec3da3eeade99f552f17a1b6ae8a7d
  89ab16025c3f28cf9e678f29c580395a4b0e280b62b4eb25d35fad2a5ac0b646
  4406f2481f389adefe425830c16da0f5ab53ae0a0f644d2c20c4435c338cf823
  94e714dc083b0b5b9f6aa1b06c651a049994e59f178bb019c989af320c0ebe6f
  8162d3a1b23565666d49baa5f796c64ec3bdf5c2758b3ba238ad054209759803
  ee35f5529e1c4066c3ef08e8cdbb5c7a7232bc9adf8217b4251da646b2c53a66
  94649d8d99aec92bcd27556586efd43087b48ed35a57fe6da1144610bd2b0acc
]]></artwork>
      <artwork><![CDATA[
ss_k
  e159b588076f6b4fda4baa811138956c23fd484f69234176ab40eea08810c416
HQC encapsulation m
  e91779ac4f63b914a4e8dc7be9c27fd57b1de24a690aab76141d4c8382b62dcd
HQC encapsulation salt
  c7dce0ce9668d7b7b36759a354d42695
SHA-256(ct_h), ct_h is 14,421 octets
  71922d7c57515aa842a2dec2c1b3470ff1a92bbc31563cfa32dc0ed53ae8d7ae
ss_h
  b2511ae3a487d3c2bb4efc30db078f3a76c67b48ee051604200b6ad54a2100b4
nonce
  2397a42d1e2adc39db7993b284cf4c8a4d6064fc29f0184d
label (21 octets, ASCII MLKEM1024-HQC5-X25519)
  4d4c4b454d313032342d485143352d583235353139
K (transcript of 16,234 octets)
  5613acca4246c661cd218642e07ecd4a2d5ff3500c71c5bf686242e73e739dd4
box length
  16062
SHA-256(box)
  de3ab0f8fb83217d060f9707bdf14383ec5748018f0b1c645b385f2d3a373815
]]></artwork>
    </section>
    <section anchor="history" numbered="false">
      <name>Document History</name>
      <t>-01: The third leg is HQC-5, HQC-KEM version 5.1, in place of
Classic McEliece mceliece6688128.  The key bundle is 8,837 octets, the
box overhead 16,062 octets, the transcript 16,234 octets and the label
<tt>MLKEM1024-HQC5-X25519</tt>.  The private key is three seeds.
-00's McEliece key was about a megabyte, cost seconds to regenerate
and gave no assurance of binding to itself <xref target="CDM23"/>.
Those were -00's reasons for carriage by digest, the digest step and
separate key generation, and none applies to HQC-5.  The rationale for
each is restated for the new leg.  Implementation status and the test
vector are from the HQC implementation.  The lead octet is 0x04, and 0x03 stays
with -00's withdrawn construction.  Decryption failure, the PQ/T terminology of
<xref target="RFC9794"/> and the check on <tt>hqc_ek</tt> are new.</t>
      <t>-00: First version.</t>
    </section>
  </back>
</rfc>
