<?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-00" indexInclude="true" ipr="trust200902" scripts="Common,Latin" sortRefs="true" submissionType="IETF" symRefs="true" tocDepth="4" tocInclude="true" xml:lang="en">
  <front>

    <title abbrev="SHA512(sntrup761 || x25519)">
      Hybrid Streamlined NTRU Prime sntrup761 and X25519 with SHA-512:
      sntrup761+x25519+sha512
    </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>
        We document a widely deployed hybrid key exchange method based
        on Streamlined NTRU Prime sntrup761 and X25519 with SHA-512.
      </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 SHA-512 <xref target="RFC6234" />.
      </t>

      <t>
	This hybrid construction was introduced for the Secure Shell
	protocol as sntrup761x25519-sha512, and we offer this document
	for other protocols that desire to use an established hybrid
	key exchange method.
      </t>

    </section>

    <section>

      <name>Key Exchange Method: sntrup761+x25519+sha512</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 using
	SHA-512 <xref target="RFC6234" /> as SHA512(K1||K2) where ||
	denote concatenation.  The output is 64 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 using SHA-512 <xref target="RFC6234" /> as
	SHA512(K1||K2) where || denote concatenation.  The output is
	64 bytes.
      </t>

      <t>
	Alice and Bob has now established a shared key.
      </t>
      
    </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.
      </t>

    </section>

    <section>

      <name>Security Considerations</name>

      <t>
	The security considerations of <xref target="RFC7748" />,
	<xref target="NTRUPrimePQCS"/> and <xref target="RFC6234" />
	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 depends on the security of the
	SHA-512 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.6234.xml"/>
	<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>

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