[Docs] [txt|pdf] [Tracker] [Email] [Nits]

Versions: 00 01 02 03 RFC 5647

Network Working Group                                          K.M. Igoe
Internet Draft                                  National Security Agency
Intended Status: Informational                              J.A. Solinas
Expires: December 27, 2008                      National Security Agency
                                                           June 27, 2008


  AES Galois Counter Mode for the Secure Shell Transport Layer Protocol
                       draft-igoe-secsh-aes-gcm-00


Status of this Memo

   By submitting this Internet-Draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as Internet-
   Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/ietf/1id-abstracts.txt.

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html.

   This Internet-Draft will expire on December 06, 2008
Copyright Notice

   Copyright (C) The IETF Trust (2008).














Igoe and Solinas                 Informational                  [Page 1]

Internet Draft          draft-igoe-secsh-aes-gcm-00        June 27, 2008


Abstract

   Secure Shell (SSH) [RFC4251] is a secure remote-login protocol.  SSH
   provides for algorithms that provide authentication , key agreement.
   confidentiality and data integrity services.  This purpose of this
   document is to show how the AES Galois/Counter Mode can be used to
   provide both confidentiality and data integrity.


Table of Contents

   1. Introduction.....................................................1
   2. Requirements Terminology.........................................1
   3. Applicability Statement..........................................1
   4. Two New AEAD Algorithms..........................................1
      4.1. aead-aes-128-gcm-ssh........................................2
      4.2. aead-aes-256-gcm-ssh........................................2
   5. Size of the Message Authentication Code..........................2
   6. Maximum Payload Size.............................................3
   7. Linkage of Confidentiality and Data Integrity....................3
   8. Security Considerations..........................................3
   9. IANA Considerations..............................................4
   10. References......................................................4
      10.1. Normative References.......................................4


1. Introduction

   Galois/Counter Mode (GCM) is a block cipher mode of operation that
   provides both confidentiality and data integrity services.  The
   purpose of this document is to show how AES-GCM can be intergrated
   into the Secure Shell Transport Layer Protocol.


2. Requirements Terminology

   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 [RFC2119].


3. Applicability Statement

   Using AES-GCM to provide both confidentiality and data integrity is
   generally more efficient than using two separate algorithms to
   provide these security services.


4. Two New AEAD Algorithms




Igoe and Solinas                 Informational                  [Page 2]

Internet Draft          draft-igoe-secsh-aes-gcm-00        June 27, 2008


4.1. aead-aes-128-gcm-ssh

   aead-aes-128-gcm-ssh is a variant of the algorithm AEAD_AES_128_GCM
   specified in section 5.1 of [RFC5116].  The only differences between
   the two algorithms are in the input and output lengths.  Using the
   notation defined in [RFC5116], the input and output lengths for
   aead-aes-128-gcm-ssh are as follows:

      PARAMETER   Meaning                          Value

      K_LEN       AES key length                   16 octets
      P_MAX       maximum plaintext length         2^32 octets
      A_MAX       maximum additional               0 octets
                  authenticated data length
      N_MIN       minimum nonce (IV) length        12 octets
      N_MAX       maximum nonce (IV) length        12 octets
      C_MAX       maximum cipher length            2^32 octets

   Test cases are provided in the appendix of [GCM].

   The reader is reminded that due to the presence of length fields and
   padding in SSH packets, the plaintext length is not the same as the
   payload length.  See section 6 below.


4.2. aead-aes-256-gcm-ssh

   aead-aes-256-gcm-ssh is a variant of the algorithm AEAD_AES_256_GCM
   specified in section 5.2 of [RFC5116].  The only differences between
   the two algorithms are in the input and output lengths.  Using the
   notation defined in [RFC5116], the input and output lengths for
   aead-aes-256-gcm-ssh are as follows:

      PARAMETER   Meaning                          Value
      K_LEN       AES key length                   32 octets
      P_MAX       maximum plaintext length         2^32 octets
      A_MAX       maximum additional               0 octets
                  authenticated data length
      N_MIN       minimum nonce (IV) length        12 octets
      N_MAX       maximum nonce (IV) length        12 octets
      C_MAX       maximum cipher length            2^32 octets

   Test cases are provided in the appendix of [GCM].

   The reader is reminded that due to the presence of length fields and
   padding in SSH packets, the plaintext length is not the same as the
   payload length.  See section 6 below.


5. Size of the Message Authentication Code



Igoe and Solinas                 Informational                  [Page 3]

Internet Draft          draft-igoe-secsh-aes-gcm-00        June 27, 2008


   Both aead-aes-128-gcm-ssh and aead-aes-256-gcm-ssh produce a 16-octet
   message authentication code.  ([RFC5116] calls this an
   "authentication tag" rather than a "message authentication code".)


6. Maximum Payload Size

   The value of P_MAX and C_MAX listed above are determined by
   constraints on the structure of an SSH packet.  Referring to [RFC
   4253], one finds that an SSH packet consists of five fields:

   uint32    packet_length;  // 0 <= packet_length < 2^32
   byte      padding_length; // 4 <= padding_length < 256
   byte[n1]  payload;        // n1 = packet_length - padding_length - 1
   byte[n2]  random_padding; // n2 = padding_length
   byte[m]   mac;            // m  = mac_length
                                (= 16 for aes128/256_gcm)

   All save the mac field are encrypted, and the total length of the
   data to be encrypted (plaintext length) must be a multiple of the
   block length.  When using either aead-aes-128-gcm-ssh or
   aead-aes-256-gcm-ssh (or any other algorithm with either a 16 octet
   or 8 octet block size) the largest possible payload is achieved when

      payload length   = 2^32-9 octets
      padding length   = 4 octets
      packet length    = 1 + (2^32-9) + 4 = 2^32 - 4 octets
      plaintext length = 4 + 1 + (2^32 - 9) + 4 = 2^32 octets.


7. Linkage of Confidentiality and Data Integrity

   When either aead-aes-128-gcm-ssh or aead-aes-256-gcm-ssh is being
   employed it SHOULD be used both as the confidentiality mechanism and
   as the data integrity mechanism.


8. Security Considerations

   The security considerations in [RFC4251] apply.













Igoe and Solinas                 Informational                  [Page 4]

Internet Draft          draft-igoe-secsh-aes-gcm-00        June 27, 2008



9. IANA Considerations

   IANA will add the following two entries to the AEAD Registry
   described in [RFC5116]:

          +----------------------+-------------+--------------------+
          |                      |             |      Proposed      |
          | Name                 |  Reference  | Numeric Identifier |
          +----------------------+-------------+--------------------+
          | aead-aes-128-gcm-ssh | Section 4.1 |          5         |
          |                      |             |                    |
          | aead-aes-256-gcm-ssh | Section 4.2 |          6         |
          +----------------------+-------------+--------------------+

   IANA will add the following two entries to the Secure Shell
   Encryption Algorithm name Registry described in [RFC4250]:

                   +----------------------+-------------+
                   |                      |             |
                   | Name                 |  Reference  |
                   +----------------------+-------------+
                   | aead-aes-128-gcm-ssh | Section 4.1 |
                   |                      |             |
                   | aead-aes-256-gcm-ssh | Section 4.2 |
                   +----------------------+-------------+

   IANA will add the following two entries to the Secure Shell MAC
   Algorithm name Registry described in [RFC4250]:

                   +----------------------+-------------+
                   |                      |             |
                   | Name                 |  Reference  |
                   +----------------------+-------------+
                   | aead-aes-128-gcm-ssh | Section 4.1 |
                   |                      |             |
                   | aead-aes-256-gcm-ssh | Section 4.2 |
                   +----------------------+-------------+


10. References


10.1. Normative References


   [GCM]      Dworkin, M, "Recommendation for Block Cipher Modes of
              Operation: Galois/Counter Mode (GCM) and GMAC", NIST
              Special Publication 800-30D, November 2007.

   [RFC2119]  Bradner, S., "Key words for use in RFCs to Indicate


Igoe and Solinas                 Informational                  [Page 5]

Internet Draft          draft-igoe-secsh-aes-gcm-00        June 27, 2008


              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC4250]  Lehtinen, S. and C. Lonvick, Ed., "The Secure Shell (SSH)
              Protocol Assigned Numbers", RFC 4250, January 2006.

   [RFC4251]  Ylonen, T. and C. Lonvick, Ed., "The Secure Shell (SSH)
              Protocol Architecture", RFC 4251, January 2006.

   [RFC5116]  McGrew, D., "An Interface and Algorithms for Authenticated
              Encryptions", RFC 5116, January 2008.











































Igoe and Solinas                 Informational                  [Page 6]

Internet Draft          draft-igoe-secsh-aes-gcm-00        June 27, 2008


Author's Addresses

   Kevin M. Igoe
   NSA/CSS Commercial Solutions Center
   National Security Agency
   EMail: kmigoe@nsa.gov

   Jerome A. Solinas
   National Information Assurance Research Laboratory
   National Security Agency
   EMail: jasolin@orion.ncsc.mil


Trademark Notice

   "SSH" is a registered trademark in the United States.


Full Copyright Statement

   Copyright (C) The IETF Trust (2008).

   This document is subject to the rights, licenses and restrictions
   contained in BCP 78, and except as set forth therein, the authors
   retain all their rights.

   This document and the information contained herein are provided on an
   "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
   OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
   THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
   THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

Intellectual Property

   The IETF takes no position regarding the validity or scope of any
   Intellectual Property Rights or other rights that might be claimed to
   pertain to the implementation or use of the technology described in
   this document or the extent to which any license under such rights
   might or might not be available; nor does it represent that it has
   made any independent effort to identify any such rights.  Information
   on the procedures with respect to rights in RFC documents can be
   found in BCP 78 and BCP 79.

   Copies of IPR disclosures made to the IETF Secretariat and any
   assurances of licenses to be made available, or the result of an
   attempt made to obtain a general license or permission for the use of
   such proprietary rights by implementers or users of this


Igoe and Solinas                 Informational                  [Page 7]

Internet Draft          draft-igoe-secsh-aes-gcm-00        June 27, 2008


   specification can be obtained from the IETF on-line IPR repository at
   http://www.ietf.org/ipr.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights that may cover technology that may be required to implement
   this standard.  Please address the information to the IETF at
   ietf-ipr@ietf.org.

Acknowledgement

   Funding for the RFC Editor function is provided by the IETF
   Administrative Support Activity (IASA).









































Igoe and Solinas                 Informational                  [Page 8]


Html markup produced by rfcmarkup 1.107, available from http://tools.ietf.org/tools/rfcmarkup/