<?xml version="1.0"?>
<?rfc symrefs="yes"?>
<?rfc compact="yes"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<rfc ipr="trust200902"
     updates="4253"
     category="std"
     docName="draft-dbider-sha2-mac-for-ssh-05">
  <front>
    <title abbrev="SHA-2 MAC for SSH">SHA-2 Data Integrity Verification for the Secure Shell (SSH) Transport Layer Protocol</title>
    <author initials="d." surname="bider" fullname="denis bider">
      <organization>Bitvise Limited</organization>
      <address>
        <postal>
          <street>Suites 41/42, Victoria House</street>
          <street>26 Main Street</street>
          <city>Gibraltar</city>
          <country>GI</country>
        </postal>
        <phone>+1 869 762 1410</phone>
        <email>ietf-ssh2@denisbider.com</email>
        <uri>http://www.bitvise.com/</uri>
      </address>
    </author>
    <author initials="M. D." surname="Baushke" fullname="Mark D. Baushke">
      <organization>Juniper Networks, Inc.</organization>
      <address>
        <postal>
          <street>1194 N Mathilda Av</street>
          <city>Sunnyvale</city>
          <region>CA</region>
          <code>94089-1206</code>
          <country>US</country>
        </postal>
        <phone>+1 408 745 2952</phone>
        <email>mdb@juniper.net</email>
        <uri>http://www.juniper.net/</uri>
      </address>
    </author>
    <date month="January" year="2012"/>
    <abstract>
      <t>This memo defines algorithm names and parameters for use of
        some of the SHA-2 family of secure hash algorithms for data
        integrity verification in the Secure Shell (SSH) protocol.
	It also updates RFC4253 by specifying a new RECOMMENDED data
	integrity algorithm.
      </t>
    </abstract>
  </front>
  <middle>
    <section title="Overview and Rationale">
      <t><xref target="RFC4251">Secure Shell (SSH)</xref> is a very
	common protocol for secure remote login on the Internet.
        Currently, SSH defines data integrity verification using
        SHA-1 and MD5 algorithms <xref target="RFC4253"/>. Due
        to recent security concerns with these two
        algorithms <xref target="RFC6151"/><xref target="RFC6194"/>,
        implementors and users request support for data
        integrity verification using some of the SHA-2 family of
         of secure hash algorithms.
      </t>
      <t>Please send comments on this draft to ietf-ssh@NetBSD.org.
      </t>
      <section title="Requirements Terminology">
	<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"/>.
	</t>
      </section>
    </section>
    <section title="Data Integrity Algorithms">
      <t>This memo adopts the style and conventions of
	<xref target="RFC4253"/> in defining new data integrity
	algorithms.
      </t>
      <figure anchor="figure.algs">
        <preamble>The following new data integrity algorithms are defined:</preamble>
        <artwork>
hmac-sha2-256     RECOMMENDED   HMAC-SHA2-256
                                (digest length = 32 bytes,
                                 key length    = 32 bytes)

hmac-sha2-256-96  OPTIONAL      first 96 bits of HMAC-SHA2-256
                                (digest length = 12 bytes,
                                 key length    = 32 bytes)

hmac-sha2-512     OPTIONAL      HMAC-SHA2-512
                                (digest length = 64 bytes,
                                 key length    = 64 bytes)

hmac-sha2-512-96  OPTIONAL      first 96 bits of HMAC-SHA2-512
                                (digest length = 12 bytes,
                                 key length    = 64 bytes)
        </artwork>
      </figure>
      <t>The HMAC mechanism was originally defined in <xref
         target="RFC2104"/> and has been updated in <xref target="RFC6151"/>.
      </t>
      <t>The SHA-2 family of secure hash algorithms are defined in
	<xref target="FIPS-180-3"/>.
      </t>
      <t>Sample code for the SHA-based HMAC algorithms are available
        in <xref target="RFC6234"/>. The variants HMAC-SHA2-224 and
        HMAC-SHA2-384 algorithms were considered, but not added to this
        list as they have the same computational requirements of
        HMAC-SHA2-256 and HMAC-SHA2-512 respectively and do not seem to
        be much used in practice.
      </t>
      <t>The truncated -96 OPTIONAL forms are present to allow
	applications which may be space restricted to still
	interoperate and make use of the new hashes.
      </t>
      <t>Test vectors for use of HMAC with SHA-2 are provided in
	<xref target="RFC4231"/>.
      </t>
      <t>Users, implementors, and administrators may choose to put
	these new Macs into the proposal ahead of the REQUIRED
	hmac-sha1 algorithm defined in <xref target="RFC4253"/> so
	that they would be negotiated first.
      </t>
    </section>
    <section title="IANA Considerations">
      <t>This document augments the MAC Algorithm Names in
        <xref target="RFC4253"/> and <xref target="RFC4250"/>.</t>
      <figure anchor="figure.iana">
        <preamble>IANA is requested to update the SSH algorithm
        registry with the following entries:</preamble>
        <artwork>
MAC Algorithm Name      Reference       Note
hmac-sha2-256           This draft      Section 2
hmac-sha2-256-96        This draft      Section 2
hmac-sha2-512           This draft      Section 2
hmac-sha2-512-96        This draft      Section 2
        </artwork>
      </figure>
    </section>
    <section title="Security Considerations">
      <t>The security considerations of
        <xref target="RFC4253">RFC 4253</xref> apply to this
        document.
      </t>
      <t>The National Institute of Standards and Technology (NIST)
        publications: <xref target="800-107">NIST Special Publication
        (SP) 800-107</xref> and
        <xref target="800-131A">NIST SP 800-131A</xref>
        suggest that HMAC-SHA1 and HMAC-SHA2-256 have a security
        strength of 128 bits and 256 bits respectively which are
	considered acceptable key lengths.
      </t>
      <t>Many users seem to be interested in the perceived
        safety of using the SHA2-based algorithms for hashing.
      </t>
    </section>
  </middle>
  <back>
    <references title="Normative References">
      <reference anchor="FIPS-180-3" target="http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf">
        <front>
          <title>Secure Hash Standard (SHS)</title>
          <author><organization>National Institute of Standards and
	  Technology (NIST), United States of America</organization></author>
          <date month="October" year="2008"/>
        </front>
        <seriesInfo name="FIPS PUB" value="180-3"/>
      </reference>
      <reference anchor="RFC2104">
        <front>
          <title>HMAC: Keyed-Hashing for Message Authentication</title>
          <author initials="H." surname="Krawczyk" fullname="Hugo Krawczyk"><organization>IBM T.J. Watson Research Center</organization></author>
          <author initials="M." surname="Bellare" fullname="Mihir Bellare"><organization>University of California at San Diego</organization></author>
          <author initials="R." surname="Canetti" fullname="Ran Canetti"><organization>IBM T.J. Watson Research Center</organization></author>
          <date month="February" year="1997"/>
        </front>
        <seriesInfo name="RFC" value="2104"/>
      </reference>
      <reference anchor="RFC2119">
	<front>
	  <title abbrev="RFC Key Words">Key words for use in RFCs to Indicate Requirement Levels</title>
	  <author initials="S." surname="Bradner" fullname="Scott Bradner"><organization>Harvard University</organization></author>
	  <date month="March" year="1997"/>
	</front>
	<seriesInfo name="BCP" value="14"/>
	<seriesInfo name="RFC" value="2119"/>
      </reference>
      <reference anchor="RFC4231">
        <front>
          <title>Identifiers and Test Vectors for HMAC-SHA-224, HMAC-SHA-256, HMAC-SHA-384, and HMAC-SHA-512</title>
          <author initials="M." surname="Nystrom" fullname="Magnus Nystrom"><organization>RSA Security</organization></author>
          <date month="December" year="2005"/>
        </front>
        <seriesInfo name="RFC" value="4231"/>
      </reference>
      <reference anchor="RFC4253">
        <front>
          <title>The Secure Shell (SSH) Transport Layer Protocol</title>
          <author initials="T." surname="Ylonen" fullname="Tatu Ylonen"><organization>SSH Communications Security Corp</organization></author>
          <author initials="C." surname="Lonvick" fullname="Chris Lonvick"><organization>Cisco Systems, Inc.</organization></author>
          <date month="January" year="2006"/>
        </front>
        <seriesInfo name="RFC" value="4253"/>
      </reference>
    </references>
    <references title="Informative References">
      <reference anchor="800-107"
		 target="http://csrc.nist.gov/publications/nistpubs/800-107/NIST-SP-800-107.pdf">
        <front>
          <title>Recommendation for Applications Using Approved Hash Algorithms</title>
          <author><organization>National Institute of Standards and Technology (NIST)</organization></author>
          <date month="February" year="2009"/>
        </front>
        <seriesInfo name="NIST Special Publication" value="800-107"/>
      </reference>
      <reference anchor="800-131A"
		 target="http://csrc.nist.gov/publications/nistpubs/800-131A/sp800-131A.pdf">
        <front>
          <title>Transitions: Recommendation for the Transitioning of
          the Use of Cryptographic Algorithms and Key Lengths</title>
          <author><organization>National Institute of Standards and Technology (NIST)</organization></author>
          <date month="January" year="2011"/>
        </front>
        <seriesInfo name="DRAFT NIST Special Publication" value="800-131A"/>
      </reference>
      <reference anchor="RFC4250">
        <front>
          <title>SSH Protocol Assigned Numbers</title>
          <author initials="S." surname="Lehtinen" fullname="Sami Lehtinen"><organization>SSH Communications Security Corp</organization></author>
          <author initials="C." surname="Lonvick" fullname="Chris Lonvick"><organization>SSH Communications Security Corp</organization></author>
          <date month="January" year="2006"/>
        </front>
        <seriesInfo name="RFC" value="4250"/>
      </reference>
      <reference anchor="RFC4251">
        <front>
          <title>The Secure Shell (SSH) Protocol Architecture</title>
          <author initials="T." surname="Ylonen" fullname="Tatu Ylonen"><organization>SSH Communications Security Corp</organization></author>
          <author initials="C." surname="Lonvick" fullname="Chris Lonvick"><organization>Cisco Systems, Inc.</organization></author>
          <date month="January" year="2006"/>
        </front>
        <seriesInfo name="RFC" value="4251"/>
      </reference>
      <reference anchor="RFC6151">
        <front>
          <title>Updated Security Considerations for
            the MD5 Message-Digest and the HMAC-MD5 Algorithms</title>
          <author initials="S." surname="Turner" fullname="Sean Turner"><organization>IECA, Inc.</organization></author>
          <author initials="L." surname="Chen" fullname="Lily Chen"><organization>National Institute of Standards and Technology</organization></author>
          <date month="March" year="2011"/>
        </front>
        <seriesInfo name="RFC" value="6151"/>
      </reference>
      <reference anchor="RFC6194">
        <front>
          <title>Security Considerations for the SHA-0 and SHA-1 Message-Digest Algorithms</title>
          <author initials="T." surname="Polk" fullname="Tim Polk"><organization>National Institute of Standards and Technology</organization></author>
          <author initials="L." surname="Chen" fullname="Lily Chen"><organization>National Institute of Standards and Technology</organization></author>
          <author initials="S." surname="Turner" fullname="Sean Turner"><organization>IECA, Inc.</organization></author>
          <author initials="P." surname="Hoffman" fullname="Paul Hoffman"><organization>VPN Consortium</organization></author>
          <date month="March" year="2011"/>
        </front>
        <seriesInfo name="RFC" value="6194"/>
      </reference>
      <reference anchor="RFC6234">
        <front>
          <title>US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)</title>
          <author initials="D." surname="Eastlake" fullname="Donald Eastlake 3rd"><organization>Huawei</organization></author>
          <author initials="T." surname="Hansen" fullname="Tony Hansen"><organization>AT&amp;T Laboratories</organization></author>
          <date month="May" year="2011"/>
        </front>
        <seriesInfo name="RFC" value="6234"/>
      </reference>
    </references>
  </back>
</rfc>

