<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="info" consensus="true" docName="draft-josefsson-ntruprime-hybrid-01" indexInclude="true" ipr="trust200902" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="4" tocInclude="true" xml:lang="en">
  <front>

    <title abbrev="Chempat: X25519+sntrup761+SHA3-256">
      Hybrid X25519 and Streamlined NTRU Prime sntrup761 with
      SHA3-256: Chempat-X
    </title>

    <author initials="S." surname="Josefsson" fullname="Simon Josefsson">
      <address>
        <email>simon@josefsson.org</email>
        <uri>https://blog.josefsson.org/</uri>
      </address>
    </author>

    <date/>
    <workgroup>Internet Engineering Task Force</workgroup>

    <abstract>
      <t>
        This memo define Chempat-X, a post-quantum/traditional hybrid
        key exchange method (PQ/T KEM) based on X25519 and Streamlined
        NTRU Prime sntrup761 with SHA3-256.
      </t>
    </abstract>
  </front>

  <middle>
    <section>

      <name>Introduction</name>

      <t>
	Streamlined NTRU Prime <xref target="NTRUPrime"/> <xref
	target="NTRUPrimePQCS"/> provides post-quantum small
	lattice-based key-encapsulation mechanisms.  The variant
	sntrup761 instance has been implemented widely.
      </t>

      <t>
        The pre-quantum elliptic-curve Diffie-Hellman X25519 function
        <xref target="RFC7748"/> has been widely implemented.
      </t>
      
      <t>
	To hedge against attacks on either of sntrup761 or X25519 a
	hybrid construction may be used, with the intention that the
	hybrid would be secure if either of the involved algorithms
	are flawed.
      </t>

      <t>
        This document describes how to implement key exchange based on
        a hybrid between Streamlined NTRU Prime sntrup761 and X25519
        with SHA3-256 <xref target="NIST_FIPS_202" />.
      </t>

      <t>
	This design is based on the Secure Shell protocol
	"sntrup761x25519-sha512", but we use a stronger combiner of
	the resulting shared secret.  We offer this document for other
	protocols that desire to use a hybrid key exchange method
	based on established mechanisms.
      </t>

    </section>

    <section>

      <name>Chempat-X Key Exchange Method</name>

      <t>
        The key-agreement is done by the X25519 Diffie-Hellman
        protocol as described in section <xref target="RFC7748"
        sectionFormat="bare" section="6.1" format="default"
        derivedLink="https://rfc-editor.org/rfc/rfc7748#section-6.1"
        derivedContent="RFC7748">Curve25519</xref> of <xref
        target="RFC7748"/>, and the key encapsulation method described
        in <xref target="NTRUPrimePQCS"/>.
      </t>

      <t>
	Alice sends a concatenation of the 1158 byte public key output
	from the key generator of sntrup761 with the 32 byte K_A =
	X25519(a, 9) as described in <xref target="NTRUPrimePQCS"/>
	and <xref target="RFC7748"/>.  The output value is thus 1190
	bytes.
      </t>

      <t>
	Bob sends a concatenation of the 1039 byte ciphertext output
	from the key encapsulation mechanism of sntrup761 with the 32
	byte K_B = X25519(b, 9) as described in <xref
	target="NTRUPrimePQCS"/> and <xref target="RFC7748"/>.  The
	output value is thus 1071 bytes.
      </t>

      <t>
	Alice derive the 32 byte shared K1 based on the X25519 values
	as described in <xref target="RFC7748"/> and performs the
	sntrup761 key decapsulation operation as described in <xref
	target="NTRUPrimePQCS"/> to yield the 32 byte shared secret
	K2.  Alice derives the final hybrid shared secret key K as
	described below..  The output is 32 bytes.
      </t>

      <t>
	Bob derive the 32 byte shared K1 based on the X25519 values as
	described in <xref target="RFC7748"/> and takes the 32 byte
	shared secret key K2 from the earlier key encapsulation method
	of sntrup761.  Bob derives the final hybrid shared secret
	secret key K as described below.  The output is 32 bytes.
      </t>

      <t>
	Alice and Bob has now established a shared key.
      </t>
      
    </section>

    <section>

      <name>Key Combiner</name>

      <t>The final hybrid shared secret key "hybridss" is derived
      using SHA3-256 as follows:</t>

      <figure>
        <artwork><![CDATA[
   H = SHA3-256,
   hybridpk = (receiverpkECDH,receiverpkKEM),
   hybridct = (senderpkECDH,senderctKEM),
   hybridss = H(ssECDH,ssKEM,H(hybridct),H(hybridpk),context)
   ]]></artwork>
      </figure>

    </section>

    <section>

      <name>Acknowledgements</name>

      <t>
	This work is a simple generalization of the
	sntrup761x25519-sha512 mechanism due to <xref target="OpenSSH"
	/> and TinySSH <xref target="TinySSH" /> documented in
	draft-josefsson-ntruprime-ssh-00, but modified to use a
	stronger combiner function suggested by Daniel J. Bernstein.
      </t>

    </section>

    <section>

      <name>Security Considerations</name>

      <t>
	The security considerations of <xref target="RFC7748" />,
	<xref target="NTRUPrimePQCS"/> and <xref
	target="NIST_FIPS_202" /> are inherited.
      </t>

      <t>
	While the construct should remain secure if either X25519 or
	sntrup761 is found to be insecure, the security of the
	combined hybrid construction also depends on the security of
	the combiner algorithm.
      </t>

    </section>

    <section>

      <name>IANA Considerations</name>

      <t>
	This document has no IANA actions.
      </t>

    </section>
  </middle>

  <back>
    <references>

      <name>References</name>

      <references>

	<name>Normative References</name>

	<xi:include href="https://xml2rfc.ietf.org/public/rfc/bibxml/reference.RFC.7748.xml"/>
	
	<reference anchor="NTRUPrimePQCS">
	  <front>
	    <title>NTRU Prime: round 3</title>
	    <author initials="D.J." surname="Bernstein" fullname="D.J. Bernstein"/>
	    <author fullname="Billy Bob Brumley"/>
	    <author fullname="Ming-Shing Chen,"/>
	    <author fullname="Chitchanok Chuengsatiansup"/>
	    <author fullname="Tanja Lange"/>
	    <author fullname="Adrian Marotzke"/>
	    <author fullname="Bo-Yuan Peng"/>
	    <author fullname="Nicola Tuveri"/>
	    <author fullname="Christine van Vredendaal"/>
	    <author fullname="Bo-Yin Yang"/>
	    <date month="October" year="2020" />
	  </front>
	  <seriesInfo name="WWW"
		      value="https://ntruprime.cr.yp.to/nist/ntruprime-20201007.pdf" />
	</reference>

	<xi:include href="https://bib.ietf.org/public/rfc/bibxml-nist/reference.NIST.FIPS.202.xml"/>

      </references>

      <references>

        <name>Informative References</name>

	<reference anchor="NTRUPrime">
	  <front>
	    <title>NTRU Prime: reducing attack surface at low cost</title>
	    <author initials="D.J." surname="Bernstein" fullname="D.J. Bernstein"/>
	    <author initials="C." surname="Chuengsatiansup" fullname="Chitchanok Chuengsatiansup"/>
	    <author initials="T." surname="Lange" fullname="Tanja Lange"/>
	    <author initials="C." surname="van Vredendaal" fullname="Christine van Vredendaal"/>
	    <date month="August" year="2017" />
	  </front>
	  <seriesInfo name="WWW"
		      value="https://ntruprime.cr.yp.to/ntruprime-20170816.pdf" />
	</reference>

        <reference anchor="TinySSH" target="https://www.tinyssh.org/" quoteTitle="true" derivedAnchor="TinySSH">
          <front>
            <title>TinySSH - minimalistic SSH server which implements only a subset of SSHv2 features</title>
            <author>
              <organization showOnFrontPage="true">TinySSH</organization>
            </author>
            <date month="" year=""/>
          </front>
        </reference>

        <reference anchor="OpenSSH" target="https://www.openssh.com/" quoteTitle="true" derivedAnchor="OpenSSH">
          <front>
            <title>The OpenSSH Project</title>
            <author>
              <organization showOnFrontPage="true">OpenSSH group of OpenBSD</organization>
            </author>
            <date month="" year=""/>
          </front>
        </reference>

      </references>
    </references>

  </back>
</rfc>
