<?xml version='1.0' encoding='ascii'?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<!-- used by XSLT processors -->
<!-- For a complete list and description of processing instructions (PIs), 
     please see http://xml.resource.org/authoring/README.html. -->
<!-- Below are generally applicable Processing Instructions (PIs) that most I-Ds might want to use.
     (Here they are set differently than their defaults in xml2rfc v1.32) -->
<?rfc strict="yes" ?>
<!-- give errors regarding ID-nits and DTD validation -->
<!-- control the table of contents (ToC) -->
<?rfc toc="yes"?>
<!-- generate a ToC -->
<?rfc tocdepth="4"?>
<!-- the number of levels of subsections in ToC. default: 3 -->
<!-- control references -->
<?rfc symrefs="yes"?>
<!-- use symbolic references tags, i.e, [RFC2119] instead of [1] -->
<?rfc sortrefs="yes" ?>
<!-- sort the reference entries alphabetically -->
<!-- control vertical white space 
     (using these PIs as follows is recommended by the RFC Editor) -->
<?rfc compact="yes" ?>
<!-- do not start each main section on a new page -->
<?rfc subcompact="no" ?>
<!-- keep one blank line between list items -->
<!-- end of list of popular I-D processing instructions -->
<rfc category="std" docName="draft-short-pkinit-freshness-00" ipr="trust200902" obsoletes="" updates="" submissionType="IETF" xml:lang="en">
  <!--category values: std, bcp, info, exp, and historic ipr values: full3667, noModification3667, noDerivatives3667 you can add the attributes updates="NNNN" and obsoletes="NNNN" they will automatically be output with "(if approved)" -->
  <!--***** FRONT MATTER ***** -->
  <front>
    <!--The abbreviated title is used in the page header - it is only necessary if the full title is longer than 39 characters -->
    <title abbrev="PKInit Freshness">Public Key Cryptography for Initial Authentication in Kerberos (PKINIT) Freshness Extension</title>
    <!--add 'role="editor"' below for the editors if appropriate -->
    <!--Another author who claims to be an editor -->
    <author fullname="Michiko Short" initials="M.S." role="editor" surname="Short">
      <organization>Microsoft Corporation</organization>
      <address>
        <postal>
          <street/>
          <!--Reorder these if your country does things differently -->
          <city/>
          <region/>
          <code/>
          <country>USA</country>
        </postal>
        <phone/>
        <email>michikos@microsoft.com</email>
        <!--uri and facsimile elements may also be added -->
      </address>
    </author>
    <author fullname="Seth Moore" initials="S.M." surname="Moore">
      <organization>Microsoft Corporation</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country>USA</country>
        </postal>
        <phone/>
        <email>sethmo@microsoft.com</email>
        <!--uri and facsimile elements may also be added -->
      </address>
    </author>
    <author fullname="Paul Miller" initials="P.M." surname="Miller">
      <organization>Microsoft Corporation</organization>
      <address>
        <postal>
          <street/>
          <city/>
          <region/>
          <code/>
          <country>USA</country>
        </postal>
        <phone/>
        <email>paumil@microsoft.com</email>
        <!--uri and facsimile elements may also be added -->
      </address>
    </author>
    <date month="October" year="2014"/>
    <!--If the month and year are both specified and are the current ones, xml2rfc will fill in the current day for you. If only the current year is specified, xml2rfc will fill in the current day and month for you. If the year is not the current one, it is necessary to specify at least a month (xml2rfc assumes day="1" if not specified for the purpose of calculating the expiry date).  With drafts it is normally sufficient to specify just the year. -->
    <!--Meta-data Declarations -->
    <area>Security</area>
    <workgroup>Kitten Working Group</workgroup>
    <!--WG name at the upperleft corner of the doc, IETF is fine for individual submissions.  If this element is not present, the default is "Network Working Group", which is used by the RFC Editor as a nod to the history of the IETF. -->
    <keyword>Internet-Draft</keyword>
    <!--Keywords will be incorporated into HTML output files in a meta tag but they have no effect on text or nroff output. If you submit your draft to the RFC Editor, the keywords will be used for the search engine. -->
    <abstract>
      <t>This document describes how to extend Public Key Cryptography for Initial Authentication in Kerberos (PKINIT) extension <xref target="RFC4556" pageno="false" format="default"/> to exchange an opaque data blob which a KDC can validate to ensure that the client is currently in possession of the private key during a PKInit AS exchange.</t>
    </abstract>
  </front>
  <middle>
    <section title="Introduction" toc="default">
      <t>Kerberos PKINIT <xref target="RFC4556" pageno="false" format="default"/> defines two schemes to use asymmetric cryptography in a Kerberos preauthenticator.  One uses Diffie-Hellman key exchange and the other depends on public key encryption.  The public key encryption scheme is less commonly used for two reasons:<list style="symbols"><t>Elliptic Curve Cryptography (ECC) Support <xref target="RFC5349" pageno="false" format="default"/> only supports Elliptic Curve Diffie-Hellman (ECDH) key agreement.</t><t>Requires certificates with an encryption key which is not deployed on many existing smart cards.</t></list> </t>
      <t>In the Diffie-Hellman exchange, the client uses its private key only to sign the AuthPack specified in Section 3.2.1 of <xref target="RFC4556" pageno="false" format="default"/> which is performed before any traffic is sent to the KDC.  Thus a client can generate requests with future times in the PKAuthenticator, and then send those requests at the future times. Unless the time is outside the validity period of the client's certificate, the KDC will validate it and return a TGT the client can use without possessing the private key.</t>
      <t>As a result, a client performing PKINIT with the Diffie-Hellman key exchange does not prove current possession of the private key being used for authentication.  It proves only prior use of that key.  Ensuring that the client has current possession of the private key requires that the signed PKAuthenticator data include information that the client could not have predicted in advance.</t>
      <section title="Kerberos message flow using KRB_AS_REQ without pre-authentication" toc="default">
        <t>Today some password-based AS exchanges <xref target="RFC4120" pageno="false" format="default"/> depend on the client sending a KRB_AS_REQ without pre-authentication to trigger the KDC to provide the Kerberos client with information needed to complete an AS exchange such as the supported encryption types and salt value (see message flow below):</t>
        <figure align="center" anchor="PKInit_message_flow" title="" suppress-title="false" alt="" width="" height="">
          <preamble/>
          <artwork align="left" xml:space="preserve" name="" type="" alt="" width="" height="">
KDC                     Client           Application Server

              &lt;----     AS-REQ without pre-authentication
KRB-ERROR     ----&gt;

              &lt;----     AS-REQ
AS-REP        ----&gt;

              &lt;----     TGS-REQ
TGS-REP       ----&gt;
            </artwork>
          <postamble/>
        </figure>
        <t>We can use this mechanism in PKInit for KDCs to provide data which the client returns as part of the KRB_AS_REQ to ensure that the PA_PK_AS_REQ <xref target="RFC4556" pageno="false" format="default"/> was not pregenerated.</t>
      </section>
      <section title="Requirements Language" toc="default">
        <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" pageno="false" format="default">RFC 2119</xref>.</t>
      </section>
    </section>
    <!--This PI places the pagebreak correctly (before the section title) in the text output. -->
    <?rfc needLines="8" ?>
    <section title="Message Exchanges" toc="default">
      <t>This following summarizes the message flow with extensions to <xref target="RFC4120" pageno="false" format="default"/> and <xref target="RFC4556" pageno="false" format="default"/> required to support a KDC provided freshness token during the initial request for a ticket:<list style="numbers"><t>The client generates a KRB_AS_REQ with the OPT-HARDWARE-AUTH option specified in Section 2.9.3 <xref target="RFC4120" pageno="false" format="default"/> to the KDC.</t><t>The KDC generates a KRB_ERROR as specified in Section 3.1.3 of <xref target="RFC4120" pageno="false" format="default"/> providing a freshness token.</t><t>The client receives the error as specified in Section 3.1.4 of <xref target="RFC4120" pageno="false" format="default"/> and includes the freshness token as part of the KRB_AS_REQ as specified in <xref target="RFC4120" pageno="false" format="default"/> and <xref target="RFC4556" pageno="false" format="default"/>.</t><t>The KDC receives and validates the KRB_AS_REQ as specified in Section 3.2.2 <xref target="RFC4556" pageno="false" format="default"/> then additionally validates the freshness token.</t><t>The KDC and client continue as specified in <xref target="RFC4120" pageno="false" format="default"/> and <xref target="RFC4556" pageno="false" format="default"/>.</t></list> </t>
      <section title="Generation of KRB_ERROR Message" toc="default">
        <t>The KDC will indicate support by adding to the METHOD-DATA object the PA-PK-AS-KDCTOKEN with padata-type is PA_PK_AS_KDCTOKEN.</t>
      </section>
      <section title="Generation of KRB_AS_REQ Message" toc="default">
        <t>After the client receives the KRB-ERROR message, when generating the PKInit AS-REQ it extracts PA-PK-AS-KDCTOKEN as an opaque data blob. When generating the PKAuthenticator, the PA-PK-AS-KDCTOKEN SHALL be added as an opaque blob in the kdcToken field so it becomes part of the signed data in the KRB_AS_REQ.</t>
      </section>
      <section title="Receipt of KRB_AS_REQ Message" toc="default">
        <t>After validating the PA_PK_AS_REQ message normally, the KDC will validate the PA-PK-AS-KDCTOKEN in an implementation specific way. If the freshness token is not valid, the KDC MUST return KDC_ERR_PREAUTH_FAILED with PA-PK-AS-KDCTOKEN. Since the freshness tokens are validated by KDCs in the same realm, standardizing the contents of the freshness token is not a concern for interoperability. </t>
      </section>
    </section>
    <section title="PreAuthentication Data Types" toc="default">
      <texttable title="" suppress-title="false" align="center" style="full">
        <preamble>The following are the new PreAuthentication data types:</preamble>
        <ttcol align="center">Padata and Data Type</ttcol>
        <ttcol align="center">Padata-type Value</ttcol>
        <c>PA_PK_AS_KDCTOKEN</c>
        <c>TBD</c>
        <postamble/>
      </texttable>
    </section>
    <section title="PA-PK-AS-KDCTOKEN" toc="default">
      <figure title="" suppress-title="false" align="left" alt="" width="" height="">
        <preamble>The PA-PK-AS-KDCTOKEN structure specifies an freshness token. Its structure is defined using ASN.1 notation. The syntax is as follows:</preamble>
        <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
PA-PK-AS-KDCTOKEN ::= OCTET STRING
            </artwork>
      </figure>
    </section>
    <section title="Extended PKAuthenticator" toc="default">
      <figure title="" suppress-title="false" align="left" alt="" width="" height="">
        <preamble>The PKAuthenticator structure specified in Section 3.2.1 <xref target="RFC4556" pageno="false" format="default"/> is extended to include a new kdcToken as follows:</preamble>
        <artwork xml:space="preserve" name="" type="" align="left" alt="" width="" height="">
PKAuthenticator ::= SEQUENCE {
   cusec        [0] INTEGER (0..999999),
   ctime        [1] KerberosTime,
             -- cusec and ctime are used as in [RFC4120], for
             -- replay prevention.
   nonce        [2] INTEGER (0..4294967295),
             -- Chosen randomly;  this nonce does not need to
             -- match with the nonce in the KDC-REQ-BODY.
   paChecksum   [3] OCTET STRING OPTIONAL,
             -- MUST be present.
             -- Contains the SHA1 checksum, performed over
             -- KDC-REQ-BODY.
   ...,
   kdcToken     [4] PA-PK-AS-KDCTOKEN OPTIONAL,
             -- MUST be present if sent by KDC
   ...
}

            </artwork>
      </figure>
    </section>
    <section anchor="Acknowledgements" title="Acknowledgements" toc="default">
      <t>Nathan Ide and Magnus Nystrom reviewed the document and provided suggestions for improvements.</t>
    </section>
    <!--Possibly a 'Contributors' section ... -->
    <section anchor="IANA" title="IANA Considerations" toc="default">
      <texttable title="" suppress-title="false" align="center" style="full">
        <preamble>IANA is requested to assign numbers for PA_PK_AS_KDCTOKEN listed in the Kerberos Parameters registry Pre-authentication and Typed Data as follows:</preamble>
        <ttcol align="center">Type</ttcol>
        <ttcol align="center">Value</ttcol>
        <ttcol align="center">Reference</ttcol>
        <c>TBD</c>
        <c>PA_PK_AS_KDCTOKEN</c>
        <c>[This RFC]</c>
        <postamble/>
      </texttable>
    </section>
    <section anchor="Security" title="Security Considerations" toc="default">
      <t>The freshness token SHOULD include either signing or sealing data from the KDC to prevent tampering. Kerberos error messages are not integrity protected unless authenticated using Kerberos FAST <xref target="RFC6113" pageno="false" format="default"/>.</t>
      <t>The freshness token SHOULD include signing, encrypting or sealing data from the KDC to determine authenticity. Even if FAST is required to provide integrity protection, a different KDC would not be able to validate freshness tokens without some kind of shared database.</t>
      <t>Since the client treats the KDC provided data blob as opaque, changing the contents will not impact existing clients. Thus extensions to the freshness token do not impact client interoperability.</t>
    </section>
  </middle>
  <!--*****BACK MATTER ***** -->
  <back>
    <!--References split into informative and normative -->
    <!--There are 2 ways to insert reference entries from the citation libraries: 1. define an ENTITY at the top, and use "ampersand character"RFC2629; here (as shown) 2. simply use a PI "less than character"?rfc include="reference.RFC.2119.xml"?> here (for I-Ds: include="reference.I-D.narten-iana-considerations-rfc2434bis.xml") Both are cited textually in the same manner: by using xref elements.  If you use the PI option, xml2rfc will, by default, try to find included files in the same directory as the including file. You can also define the XML_LIBRARY environment variable with a value containing a set of directories to search.  These can be either in the local filing system or remote ones accessed by http (http://domain/dir/... ).-->
    <references title="Normative References"><!--?rfc include="http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml"?--><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><address><postal><street>1350 Mass. Ave.</street><street>Cambridge</street><street>MA 02138</street></postal><phone>- +1 617 495 3864</phone><email>sob@harvard.edu</email></address></author><date year="1997" month="March"/><area>General</area><keyword>keyword</keyword><abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized.  This document defines these words as they should be interpreted in IETF documents.  Authors who follow these guidelines should incorporate this phrase near the beginning of their document: <list><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 RFC 2119.  </t></list></t><t>Note that the force of these words is modified by the requirement level of the document in which they are used.  </t></abstract></front><seriesInfo name="BCP" value="14"/><seriesInfo name="RFC" value="2119"/><format type="TXT" octets="4723" target="http://www.rfc-editor.org/rfc/rfc2119.txt"/><format type="HTML" octets="17970" target="http://xml.resource.org/public/rfc/html/rfc2119.html"/><format type="XML" octets="5777" target="http://xml.resource.org/public/rfc/xml/rfc2119.xml"/></reference> <reference anchor="RFC4556"><front><title>Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)</title><author initials="L." surname="Zhu" fullname="L. Zhu"><organization/></author><author initials="B." surname="Tung" fullname="B. Tung"><organization/></author><date year="2006" month="June"/><abstract><t>This document describes protocol extensions (hereafter called PKINIT) to the Kerberos protocol specification.  These extensions provide a method for integrating public key cryptography into the initial authentication exchange, by using asymmetric-key signature and/or encryption algorithms in pre-authentication data fields. [STANDARDS-TRACK]</t></abstract></front><seriesInfo name="RFC" value="4556"/><format type="TXT" octets="100339" target="http://www.rfc-editor.org/rfc/rfc4556.txt"/></reference> <reference anchor="RFC5349"><front><title>Elliptic Curve Cryptography (ECC) Support for Public Key Cryptography for Initial Authentication in Kerberos (PKINIT)</title><author initials="L." surname="Zhu" fullname="L. Zhu"><organization/></author><author initials="K." surname="Jaganathan" fullname="K. Jaganathan"><organization/></author><author initials="K." surname="Lauter" fullname="K. Lauter"><organization/></author><date year="2008" month="September"/><abstract><t>This document describes the use of Elliptic Curve certificates, Elliptic Curve signature schemes and Elliptic Curve Diffie-Hellman (ECDH) key agreement within the framework of PKINIT -- the Kerberos Version 5 extension that provides for the use of public key cryptography.  This memo provides information for the Internet community.</t></abstract></front><seriesInfo name="RFC" value="5349"/><format type="TXT" octets="19706" target="http://www.rfc-editor.org/rfc/rfc5349.txt"/></reference> <reference anchor="RFC4120"><front><title>The Kerberos Network Authentication Service (V5)</title><author initials="C." surname="Neuman" fullname="C. Neuman"><organization/></author><author initials="T." surname="Yu" fullname="T. Yu"><organization/></author><author initials="S." surname="Hartman" fullname="S. Hartman"><organization/></author><author initials="K." surname="Raeburn" fullname="K. Raeburn"><organization/></author><date year="2005" month="July"/><abstract><t>This document provides an overview and specification of Version 5 of the Kerberos protocol, and it obsoletes RFC 1510 to clarify aspects of the protocol and its intended use that require more detailed or clearer explanation than was provided in RFC 1510.  This document is intended to provide a detailed description of the protocol, suitable for implementation, together with descriptions of the appropriate use of protocol messages and fields within those messages. [STANDARDS-TRACK]</t></abstract></front><seriesInfo name="RFC" value="4120"/><format type="TXT" octets="340314" target="http://www.rfc-editor.org/rfc/rfc4120.txt"/></reference> </references>
    <references title="Informative References"><reference anchor="RFC6113"><front><title>A Generalized Framework for Kerberos Pre-Authentication</title><author initials="S." surname="Hartman" fullname="S. Hartman"><organization/></author><author initials="L." surname="Zhu" fullname="L. Zhu"><organization/></author><date year="2011" month="April"/><abstract><t>Kerberos is a protocol for verifying the identity of principals (e.g., a workstation user or a network server) on an open network. The Kerberos protocol provides a facility called pre-authentication. Pre-authentication mechanisms can use this facility to extend the Kerberos protocol and prove the identity of a principal.&lt;/t&gt;&lt;t&gt; This document describes a more formal model for this facility. The model describes what state in the Kerberos request a pre-authentication mechanism is likely to change. It also describes how multiple pre-authentication mechanisms used in the same request will interact.&lt;/t&gt;&lt;t&gt; This document also provides common tools needed by multiple pre-authentication mechanisms. One of these tools is a secure channel between the client and the key distribution center with a reply key strengthening mechanism; this secure channel can be used to protect the authentication exchange and thus eliminate offline dictionary attacks. With these tools, it is relatively straightforward to chain multiple authentication mechanisms, utilize a different key management system, or support a new key agreement algorithm. [STANDARDS-TRACK]</t></abstract></front><seriesInfo name="RFC" value="6113"/><format type="TXT" octets="121122" target="http://www.rfc-editor.org/rfc/rfc6113.txt"/></reference> </references>
  </back>
</rfc>
