Secure Shell Working Group                                  J. Galbraith
Internet-Draft                                          VanDyke Software
Expires: September 18, 2005                                    R. Thayer
                                                     The Tillerman Group
                                                          March 17, 2005


                       SSH Public Key File Format
                 draft-ietf-secsh-publickeyfile-06.txt

Status of this Memo

   This document is an Internet-Draft and is subject to all provisions
   of Section 3 of RFC 3667.  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 become aware will be disclosed, in accordance with
   RFC 3668.

   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 September 18, 2005.

Copyright Notice

   Copyright (C) The Internet Society (2005).

Abstract

   This document formally documents the existing public key file format
   in use for exchanging public keys between different SSH
   implementations.





Galbraith & Thayer     Expires September 18, 2005               [Page 1]


Internet-Draft         SSH Public Key File Format             March 2005


Table of Contents

   1.  Conventions used in this document  . . . . . . . . . . . . . .  3
   2.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  4
   3.  Key File Format  . . . . . . . . . . . . . . . . . . . . . . .  5
     3.1   Line termination Characters  . . . . . . . . . . . . . . .  5
     3.2   Begin and end markers  . . . . . . . . . . . . . . . . . .  5
     3.3   Key File Header  . . . . . . . . . . . . . . . . . . . . .  5
       3.3.1   Subject Header . . . . . . . . . . . . . . . . . . . .  6
       3.3.2   Comment Header . . . . . . . . . . . . . . . . . . . .  6
     3.4   Public Key File Body . . . . . . . . . . . . . . . . . . .  6
     3.5   Examples . . . . . . . . . . . . . . . . . . . . . . . . .  7
   4.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . .  8
   5.  Security Considerations  . . . . . . . . . . . . . . . . . . .  9
   6.  Normative References . . . . . . . . . . . . . . . . . . . . .  9
       Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . 10
       Intellectual Property and Copyright Statements . . . . . . . . 11


































Galbraith & Thayer     Expires September 18, 2005               [Page 2]


Internet-Draft         SSH Public Key File Format             March 2005


1.  Conventions used in this document

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














































Galbraith & Thayer     Expires September 18, 2005               [Page 3]


Internet-Draft         SSH Public Key File Format             March 2005


2.  Introduction

   In order to use public key authentication, public keys must be
   exchanged between client and server.  This document formally
   describes the existing public key file format, with few exceptions.

   Where this document departs from current practice, it also suggests a
   mechanism for backwards compatibility.











































Galbraith & Thayer     Expires September 18, 2005               [Page 4]


Internet-Draft         SSH Public Key File Format             March 2005


3.  Key File Format

   SSH implementations must share public key files between the client
   and the server in order to interoperate.

   A key file is a text file, containing a sequence of lines.  Each line
   in the file MUST NOT be longer than 72 bytes.

3.1  Line termination Characters

   In order to achieve the goal of being able to exchange public key
   files between servers, implementations are REQUIRED to read files
   using any of the common line termination sequence, <CR>, <LF> or
   <CR><LF>.

   Implementations may generate files using which ever line termination
   convention is most convenient

3.2  Begin and end markers

   The first line of a conforming key file MUST be a begin marker, which
   is the literal text:

   ---- BEGIN SSH2 PUBLIC KEY ----

   The last line of a conforming key file MUST be a end marker, which is
   the literal text:

   ---- END SSH2 PUBLIC KEY ----

3.3  Key File Header

   The key file header section consists of multiple RFC822 - style
   header fields.  Each field is a line of the following format:

   Header-tag ':' ' ' Header-value

   The Header-tag MUST NOT be more than 64 bytes.  The Header-value MUST
   NOT be more than 1024 bytes.  Each line in the header MUST NOT be
   more than 72 bytes.

   A line is continued if the last character in the line is a '\'.  If
   the last character of a line is a '\', then the logical contents of
   the line is formed by removing the '\' and appending the contents of
   the next line.

   The Header-tag MUST be US-ASCII.  The Header-value MUST be encoded in
   UTF-8. [RFC2044]



Galbraith & Thayer     Expires September 18, 2005               [Page 5]


Internet-Draft         SSH Public Key File Format             March 2005


   A line that is not a continuation line that has no ':' in it is
   assumed to be the first line of the base 64 encoded body (Section 8)

   Compliant implementations MUST ignore unrecognized header fields.
   Implementations SHOULD preserve unrecognized header fields when
   manipulating the key file.

   Existing implementations may not correctly handle unrecognized
   fields.  During a transition period, implementations SHOULD generate
   key file headers that contain only a Subject field followed by a
   Comment field.

3.3.1  Subject Header

   This field currently is used to store the login-name that the key was
   generated under.  For example:

   Subject: user

3.3.2  Comment Header

   Contain a user specified comment which will be displayed when using
   the key.

   It is suggested that this field default to user@hostname for the user
   and machine used to generate the key.  For example:

   Comment: user@mycompany.com

   Currently, common practice is to quote the Header-value of the
   Comment, and some existing implementations fail if these quotes are
   omitted.

   Compliant implementations MUST function correctly if the quotes are
   omitted.

   During an interim period implementations MAY include the quotes.  If
   the first and last characters of the Header-value are matching
   quotes, implementations SHOULD remove them before using the value.

3.4  Public Key File Body

   The body of a public key file consists of the public key blob as
   described in the SSH transport draft [I-D.ietf-secsh-transport],
   section 4.6, "Public Key Algorithms", encoded in base 64 as specified
   in RFC-2045, section 6.8, "Base64 Content-Transfer-Encoding".
   [RFC2045]




Galbraith & Thayer     Expires September 18, 2005               [Page 6]


Internet-Draft         SSH Public Key File Format             March 2005


   As with all other lines, each line in the body MUST NOT be longer
   than 72 characters.

3.5  Examples

   The following are some example public key files that are compliant:

   ---- BEGIN SSH2 PUBLIC KEY ----
   Comment: "1024-bit RSA, converted from OpenSSH by galb@test1"
   AAAAB3NzaC1yc2EAAAABIwAAAIEA1on8gxCGJJWSRT4uOrR13mUaUk0hRf4RzxSZ1zRb
   YYFw8pfGesIFoEuVth4HKyF8k1y4mRUnYHP1XNMNMJl1JcEArC2asV8sHf6zSPVffozZ
   5TT4SfsUu/iKy9lUcCfXzwre4WWZSXXcPff+EHtWshahu3WzBdnGxm5Xoi89zcE=
   ---- END SSH2 PUBLIC KEY ----


   ---- BEGIN SSH2 PUBLIC KEY ----
   Comment: DSA Public Key for use with MyIsp
   AAAAB3NzaC1kc3MAAACBAPY8ZOHY2yFSJA6XYC9HRwNHxaehvx5wOJ0rzZdzoSOXxbET
   W6ToHv8D1UJ/z+zHo9Fiko5XybZnDIaBDHtblQ+Yp7StxyltHnXF1YLfKD1G4T6JYrdH
   YI14Om1eg9e4NnCRleaqoZPF3UGfZia6bXrGTQf3gJq2e7Yisk/gF+1VAAAAFQDb8D5c
   vwHWTZDPfX0D2s9Rd7NBvQAAAIEAlN92+Bb7D4KLYk3IwRbXblwXdkPggA4pfdtW9vGf
   J0/RHd+NjB4eo1D+0dix6tXwYGN7PKS5R/FXPNwxHPapcj9uL1Jn2AWQ2dsknf+i/FAA
   vioUPkmdMc0zuWoSOEsSNhVDtX3WdvVcGcBq9cetzrtOKWOocJmJ80qadxTRHtUAAACB
   AN7CY+KKv1gHpRzFwdQm7HK9bb1LAo2KwaoXnadFgeptNBQeSXG1vO+JsvphVMBJc9HS
   n24VYtYtsMu74qXviYjziVucWKjjKEb11juqnF0GDlB3VVmxHLmxnAz643WK42Z7dLM5
   sY29ouezv4Xz2PuMch5VGPP+CDqzCM4loWgV
   ---- END SSH2 PUBLIC KEY ----


   ---- BEGIN SSH2 PUBLIC KEY ----
   Subject: galb
   Comment: 1024-bit rsa, created by galb@shimi Mon Jan 15 08:31:24 2001
   AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
   596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
   soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=
   ---- END SSH2 PUBLIC KEY ----















Galbraith & Thayer     Expires September 18, 2005               [Page 7]


Internet-Draft         SSH Public Key File Format             March 2005


4.  IANA Considerations

   There are non IANA registries or other considerations associated with
   this document.















































Galbraith & Thayer     Expires September 18, 2005               [Page 8]


Internet-Draft         SSH Public Key File Format             March 2005


5.  Security Considerations

   The file format described by this document provides no mechanism to
   verify the integrity or otherwise detect tampering with the data
   stored in such files.  Given the potential of an adversarial
   tampering with this data, system-specific measures (e.g.  Access
   Control Lists, UNIX permissions, other Discretionary and/or Mandatory
   Access Controls) SHOULD be used to protect these files.  Also, if the
   contents of these files are transferred it SHOULD be done over a
   trusted channel.

   The header data allowed by this file format could contain an
   unlimited range of information.  While in many environments the
   information conveyed by this header data may be considered innocuous
   public information, it may constitute a channel through which
   information about a user, a key or its use may be disclosed
   intentionally or otherwise (e.g "Comment: Mary E.  Jones, 123 Main
   St, Home Phone:...").  The presence and use of this header data
   SHOULD be reviewed by sites that deploy this file format.

6.  Normative References

   [I-D.ietf-secsh-transport]
              Rinne, T., Ylonen, T., Kivinen, T., Saarinen, M. and S.
              Lehtinen, "SSH Protocol Transport Protocol", September
              2002.

   [RFC2044]  Yergeau, F., "UTF-8, a Transformation Format of Unicode
              and ISO 10646", October 1996.

   [RFC2026]  Bradner, S., "The Internet Standards Process -- Revision
              3", October 1996.

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

   [RFC2045]  Freed and Borenstein, "Multipurpose Internet Mail
              Extensions (MIME) Part One: Format of Internet Message
              Bodies", November 1996.












Galbraith & Thayer     Expires September 18, 2005               [Page 9]


Internet-Draft         SSH Public Key File Format             March 2005


Authors' Addresses

   Joseph Galbraith
   VanDyke Software
   4848 Tramway Ridge Blvd
   Suite 101
   Albuquerque, NM  87111
   US

   Phone: +1 505 332 5700
   Email: galb-list@vandyke.com


   Rodney Thayer
   The Tillerman Group
   370 Altair Way, PMB 321
   Sunnyvale, CA  94086

   Phone: +1 408 757 9693
   Email: rodney@tillerman.to

Trademark notice

   "ssh" is a registered trademark in the United States and/or other
   countries.


























Galbraith & Thayer     Expires September 18, 2005              [Page 10]


Internet-Draft         SSH Public Key File Format             March 2005


Intellectual Property Statement

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


Disclaimer of Validity

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


Copyright Statement

   Copyright (C) The Internet Society (2005).  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.


Acknowledgment

   Funding for the RFC Editor function is currently provided by the
   Internet Society.




Galbraith & Thayer     Expires September 18, 2005              [Page 11]