<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
    <!ENTITY RFC2119 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml'>

    <!ENTITY RFC3279 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3279.xml'>

    <!ENTITY RFC3280 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3280.xml'>

    <!ENTITY RFC4120 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4120.xml'>

    <!ENTITY RFC3766 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3766.xml'>

    <!ENTITY RFC3852 PUBLIC '' 
     'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3852.xml'>

    <!ENTITY RFC4556 PUBLIC '' 
     'http://xml.resource.org/public/rfc/bibxml/reference.RFC.4556.xml'>

    <!ENTITY RFC3278 PUBLIC '' 
      'http://xml.resource.org/public/rfc/bibxml/reference.RFC.3278.xml'>

]>

<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>

<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes" ?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<?rfc compact="yes"?>

<rfc ipr='full3978' category="info" docName="draft-zhu-pkinit-ecc-04">
    <front>
    <title>ECC Support for PKINIT</title>
    <author initials='L.' surname="Zhu" fullname='Larry Zhu'>
        <organization>Microsoft Corporation</organization>
        <address>
        <postal>
            <street>One Microsoft Way</street>
            <city>Redmond</city> <region>WA</region>
            <code>98052</code> <country>US</country>
        </postal>
        <email>lzhu@microsoft.com</email>
        </address>
    </author>        
    
    <author initials='K.' surname="Jaganathan" fullname='Karthik Jaganathan'>
        <organization>Microsoft Corporation</organization>
        <address>
        <postal>
            <street>One Microsoft Way</street>
            <city>Redmond</city> <region>WA</region>
            <code>98052</code> <country>US</country>
        </postal>
        <email>karthikj@microsoft.com</email>
        </address>
    </author>  

    <author initials='K.' surname="Lauter" fullname='Kristin Lauter'>
        <organization>Microsoft Corporation</organization>
        <address>
        <postal>
            <street>One Microsoft Way</street>
            <city>Redmond</city> <region>WA</region>
            <code>98052</code> <country>US</country>
        </postal>
        <email>klauter@microsoft.com</email>
        </address>
    </author>  
    <date month="October" year="2007"/>

    <area>Security</area>
    <workgroup>NETWORK WORKING GROUP</workgroup>
    <keyword>Internet-Draft</keyword>

    <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.</t>

    </abstract>
    </front>

    <middle>
       <section title="Introduction"> 
        
        <t> Elliptic Curve Cryptography (ECC) is emerging as an attractive
   public-key cryptosystem that provides security equivalent to currently 
   popular public-key mechanisms such as RSA and DSA with smaller 
   key sizes <xref target="LENSTRA"/>
   <xref target="NISTSP80057"/>.</t>

       <t>
       Currently <xref target="RFC4556"/> permits the use of ECC algorithms but it does not specify
       how ECC parameters  are chosen and how to derive the shared key
       for key delivery using Elliptic Curve Diffie-Hellman (ECDH) <xref target="IEEE1363"/> <xref target="X9.63"/>.</t>

       <t>This document describes how to use Elliptic Curve certificates, Elliptic Curve signature schemes, 
       and ECDH with <xref target="RFC4556"/>. However, 
       it should be noted that there is no syntactic or semantic change to the existing <xref target="RFC4556"/> messages. Both the client and the KDC
       contribute one ECDH key pair using the key agrement protocol described in this document.</t>

       </section>

       <section title="Conventions Used in This Document">

       <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 title="Using Elliptic Curve Certificates and Elliptic Curve Signature Schemes">

    <t>ECC certificates and signature schemes can be used in   
    the Cryptographic Message Syntax (CMS) <xref target="RFC3852"/> <xref target="RFC3278"/> content type 'SignedData'.</t>

   <t> X.509 certificates <xref target="RFC3280"/> containing ECC public keys or signed using ECC signature schemes
   MUST comply with <xref target="RFC3279"/>. </t>
    
   <t> The signatureAlgorithm field of the CMS
   data type SignerInfo can contain one of the following ECC signature algorithm identifiers:</t>

   <figure>
       <artwork>
   ecdsa-with-Sha1   [RFC3279]
   ecdsa-with-Sha256 [X9.62]
   ecdsa-with-Sha384 [X9.62]
   ecdsa-with-Sha512 [X9.62]
       </artwork>
   </figure>

   <t>The corresponding digestAlgorithm field contains one of the following hash algorithm 
   identifiers respectively:</t>

   <figure>
    <artwork>
   id-sha1           [RFC3279]
   id-sha256         [X9.62]
   id-sha384         [X9.62]
   id-sha512         [X9.62]
    </artwork>
  </figure>

 <t>Namely id-sha1 MUST be used in conjunction with ecdsa-with-Sha1, id-sha256 MUST be used in conjunction with 
 ecdsa-with-Sha256, id-sha384 MUST be used in conjunction with 
 ecdsa-with-Sha384, and id-sha512 MUST be used in conjunction with 
 ecdsa-with-Sha512.</t>

   <t>Implementations of this specfication MUST support ecdsa-with-Sha256 and SHOULD support ecdsa-with-Sha1.</t> 

       </section>

        <section title="Using ECDH Key Exchange">

       <t> This section describes how ECDH can be used as the AS reply key delivery method <xref target="RFC4556"/>.  
     Note that the protocol description here is similar to that of Modular Exponential Diffie-Hellman (MODP DH), as described in <xref target="RFC4556"/>.</t>

       <t>If the client wishes to use ECDH key agreement method, 
       it encodes its ECDH public key value and the domain parameters <xref target="IEEE1363"/> <xref target="X9.63"/> for its ECDH public key in
       clientPublicValue of the PA-PK-AS-REQ message <xref target="RFC4556"/>.</t>

       <t> As described in <xref target="RFC4556"/>, the ECDH domain
       parameters for the client's public key are specified
       in the algorithm field of the type SubjectPublicKeyInfo <xref target="RFC3279"/>
       and the client's ECDH public key value is mapped to a
       subjectPublicKey (a BIT STRING) according to <xref target="RFC3279"/>.</t> 

       <t>The following algorithm identifier is used to identify the client's choice 
       of the ECDH key agreement method for key delivery.</t>

       <figure>
           <artwork>
     id-ecPublicKey  (Elliptic Curve Diffie-Hellman [RFC3279])
           </artwork>
       </figure>


       <t>If the domain parameters are not accepted by the KDC, the KDC 
       sends back an error message <xref target="RFC4120"/> with the code
   KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED <xref target="RFC4556"/>. This error 
   message contains the list of domain parameters acceptable to the KDC. 
   This list is encoded as TD-DH-PARAMETERS <xref target="RFC4556"/>, 
   and it is in the KDC's decreasing preference order. The client can then pick a set of 
   domain parameters from the list and retry the authentication.</t>

 <t>Both the client and the KDC MUST have local policy that specifies which set 
 of domain parameters are acceptable if they do not have a priori knowledge of the chosen domain parameters.
 The need for such local policy is explained in <xref target="consider"/>.</t>

  <t>If the ECDH domain parameters are accepted by the KDC, the KDC sends back 
  its ECDH public key value in 
  the subjectPublicKey field of the PA-PK-AS-REP message <xref target="RFC4556"/>.</t> 
   
  <t>As described in <xref target="RFC4556"/>, the KDC's ECDH public key value is encoded as a BIT
     STRING according to <xref target="RFC3279"/>.</t>

  <t> Note that in the steps above, the client can indicate to the KDC that it wishes to reuse ECDH keys or to 
  allow the KDC to do so, by including the clientDHNonce field in the request <xref target="RFC4556"/>,
  and the KDC can then reuse the ECDH keys and include serverDHNonce field in the reply <xref target="RFC4556"/>. 
  This logic is the same 
  as that of the Modular Exponential Diffie-Hellman key agreement method <xref target="RFC4556"/>.</t>

<t>If ECDH is negotiated as the key delivery method, then the PA-PK-AS-REP 
and AS reply key are generated as in Section 3.2.3.1 of <xref target="RFC4556"/> with the 
following difference:  The DHSharedSecret is the x-coordinate of the shared secret value (an 
elliptic curve point);  DHSharedSecret is the output of operation 
ECSVDP-DH as described in Section 7.2.1 of <xref target="IEEE1363"/>.</t> 

  <t>Both the client and KDC then proceed as described in <xref target="RFC4556"/> and <xref target="RFC4120"/>.</t>
              
  <t>Lastly it should be noted that ECDH can be used with any certificates and signature schemes.  However, a significant advantage of using ECDH together with
  ECC certificates and signature schemes is that the ECC domain parameters in the client or KDC certificates can be used. 
  This obviates the need of locally preconfigured domain parameters as described in <xref target="consider"/>.</t> 

       </section>

       <section title="Choosing the Domain Parameters and the Key Size">

       <t>
       The domain parameters and the key size should be chosen so as to provide
       sufficient cryptographic security  <xref target="RFC3766"/>.  The following table, based on
       table 2 on page 63 of NIST SP800-57 part 1 <xref target="NISTSP80057"/>, gives approximate comparable key sizes for symmetric-
       and asymmetric-key cryptosystems based on the best-known
       algorithms for attacking them. </t>

<figure>
    <artwork>

              Symmetric    |  ECC       |   RSA
              -------------+----------- +------------
                 80        |  160 - 223 |   1024
                112        |  224 - 255 |   2048
                128        |  256 - 383 |   3072
                192        |  384 - 511 |   7680
                256        |  512+      |  15360

             Table 1: Comparable key sizes (in bits)
    </artwork>
</figure>  

       <t> Thus, for example, when securing a 128-bit symmetric key, it is
prudent to use 256-bit Elliptic Curve Cryptography (ECC), e.g. group P-256 (secp256r1) as described below.</t>

       <t> A set of ECDH domain parameters is also known as a curve. A curve is a named curve if the domain paratmeters 
       are well known and can be identified by an Object Identifier, otherwise it is called a custom curve.        
       <xref target="RFC4556"/> supports both named curves and custom curves, see <xref target="consider"/>
       on the tradeoff of choosing between named curves and custom curves.</t>

       <t> The named curves recommended in this document are also recommended by
 NIST <xref target="FIPS186-2"/>.  These fifteen ECC curves are 
given in the following table <xref target="FIPS186-2"/> <xref target="SEC2"/>.</t>  

       <figure>
           <artwork>
           Description                      SEC 2 OID
           -----------------                ---------

           ECPRGF192Random  group P-192     secp192r1  
           EC2NGF163Random  group B-163     sect163r2
           EC2NGF163Koblitz group K-163     sect163k1    

           ECPRGF224Random  group P-224     secp224r1  
           EC2NGF233Random  group B-233     sect233r1
           EC2NGF233Koblitz group K-233     sect233k1

           ECPRGF256Random  group P-256     secp256r1
           EC2NGF283Random  group B-283     sect283r1
           EC2NGF283Koblitz group K-283     sect283k1

           ECPRGF384Random  group P-384     secp384r1
           EC2NGF409Random  group B-409     sect409r1
           EC2NGF409Koblitz group K-409     sect409k1

           ECPRGF521Random  group P-521     secp521r1
           EC2NGF571Random  group B-571     sect571r1
           EC2NGF571Koblitz group K-571     sect571k1
           </artwork>
       </figure>    

       </section>

       <section title="Interoperability Requirements">
       <t>Implementations conforming to this specification MUST support curve P-256 and P-384.</t>
       </section>
    
       <section anchor="consider" title="Security Considerations">

<t> When using ECDH key agreement, the recipient of an elliptic curve public key 
should perform certain checks to avoid the attacks described in <xref target="ECC-Validation"/>.  
It is especially important if the recipient is using a long-term ECDH private 
key to check that the sender's public key is a valid point on the correct 
elliptic curve, otherwise information may be leaked about the 
recipient's private key, and iterating the attack will eventually 
completely expose the recipient's private key.</t>

       <t> Kerberos error messages are not integrity protected, as a result, the domain parameters sent by the KDC as TD-DH-PARAMETERS 
       can be tampered with by an attacker so that 
       the set of domain parameters selected could be either weaker or not mutually preferred. 
       Local policy can configure sets of domain parameters acceptable locally, or disallow 
       the negotiation of ECDH domain parameters.</t>

<t> Beyond elliptic curve size, the main issue is elliptic curve
   structure.  As a general principle, it is more conservative to use
   elliptic curves with as little algebraic structure as possible - thus
   random curves are more conservative than special curves such as
   Koblitz curves, and curves over F_p with p random are more
   conservative than curves over F_p with p of a special form (and
   curves over F_p with p random might be considered more conservative
   than curves over F_2^m as there is no choice between multiple fields
   of similar size for characteristic 2).  Note, however, that algebraic
   structure can also lead to implementation efficiencies and
   implementors and users may, therefore, need to balance conservatism
   against a need for efficiency.  Concrete attacks are known against
   only very few special classes of curves, such as supersingular
   curves, and these classes are excluded from the ECC standards such as
   <xref target="IEEE1363"/> and <xref target="X9.62"/>.</t>

   <t> Another issue is the potential for catastrophic failures when a
   single elliptic curve is widely used.  In this case, an attack on the
   elliptic curve might result in the compromise of a large number of
   keys.  Again, this concern may need to be balanced against efficiency
   and interoperability improvements associated with widely-used curves.
   Substantial additional information on elliptic curve choice can be
   found in <xref target="IEEE1363"/>, <xref target="X9.62"/> and <xref target="FIPS186-2"/>.</t>

       </section>
       
       <section title="IANA Considerations">

       <t> No IANA actions are
  required for this document.</t>

       </section>

       <section title="Acknowledgements">
<t>
The following people have made significant contributions to this
draft: Paul Leach, Dan Simon, Kelvin Yiu, David Cross, Sam Hartman, Tolga Acar, and Stefan Santesson.</t>
       
</section>

    </middle>

    <back>

    <references title="Normative References">
        &RFC2119;&RFC4120;&RFC3280;&RFC3279;&RFC3766;&RFC3852;&RFC4556;&RFC3278;
    
         <reference anchor='IEEE1363'>

            <front>

            <title abbrev='PKINIT'>Public Key Cryptography for Initial
            Authentication in Kerberos</title>

            <author initials='B.' surname='Tung' fullname='Brian Tung'>
                <organization>USC/Information Sciences Institute</organization>
            </author>

            <author initials='B.' surname='Neuman' fullname='B. Clifford
            Neuman'>
                <organization>USC/Information Sciences Institute</organization>
            </author>

            <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
                <organization>Motorola, Inc.</organization>
            </author>
            
            <date year='2004' month='August' />
            </front>
    
         </reference>

         <reference anchor='FIPS186-2'>

            <front>

            <title abbrev='PKINIT'>Public Key Cryptography for Initial
            Authentication in Kerberos</title>

            <author initials='B.' surname='Tung' fullname='Brian Tung'>
                <organization>USC/Information Sciences Institute</organization>
            </author>

            <author initials='B.' surname='Neuman' fullname='B. Clifford
            Neuman'>
                <organization>USC/Information Sciences Institute</organization>
            </author>

            <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
                <organization>Motorola, Inc.</organization>
            </author>
            
            <date year='2004' month='August' />
            </front>
    
         </reference>

         <reference anchor='X9.63'>

           <front>
        
           <title abbrev='PKINIT'>Public Key Cryptography for Initial
           Authentication in Kerberos</title>
        
           <author initials='B.' surname='Tung' fullname='Brian Tung'>
               <organization>USC/Information Sciences Institute</organization>
           </author>
        
           <author initials='B.' surname='Neuman' fullname='B. Clifford
           Neuman'>
               <organization>USC/Information Sciences Institute</organization>
           </author>
        
           <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
               <organization>Motorola, Inc.</organization>
           </author>
        
           <date year='2004' month='August' />
           </front>
        
        </reference>

         <reference anchor='ECC-Validation'>

           <front>
        
           <title abbrev='PKINIT'>Public Key Cryptography for Initial
           Authentication in Kerberos</title>
        
           <author initials='B.' surname='Tung' fullname='Brian Tung'>
               <organization>USC/Information Sciences Institute</organization>
           </author>
        
           <author initials='B.' surname='Neuman' fullname='B. Clifford
           Neuman'>
               <organization>USC/Information Sciences Institute</organization>
           </author>
        
           <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
               <organization>Motorola, Inc.</organization>
           </author>
        
           <date year='2004' month='August' />
           </front>
        
        </reference>

<reference anchor='NISTSP80057'>

   <front>

   <title abbrev='PKINIT'>Public Key Cryptography for Initial
   Authentication in Kerberos</title>

   <author initials='B.' surname='Tung' fullname='Brian Tung'>
       <organization>USC/Information Sciences Institute</organization>
   </author>

   <author initials='B.' surname='Neuman' fullname='B. Clifford
   Neuman'>
       <organization>USC/Information Sciences Institute</organization>
   </author>

   <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
       <organization>Motorola, Inc.</organization>
   </author>

   <date year='2004' month='August' />
   </front>

</reference>

         <reference anchor='X9.62'>

            <front>

            <title abbrev='PKINIT'>Public Key Cryptography for Initial
            Authentication in Kerberos</title>

            <author initials='B.' surname='Tung' fullname='Brian Tung'>
                <organization>USC/Information Sciences Institute</organization>
            </author>

            <author initials='B.' surname='Neuman' fullname='B. Clifford
            Neuman'>
                <organization>USC/Information Sciences Institute</organization>
            </author>

            <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
                <organization>Motorola, Inc.</organization>
            </author>
            
            <date year='2004' month='August' />
            </front>
    
         </reference>
 
                     </references>
     <references title="Informative References">

    <reference anchor='SEC2'>

       <front>

       <title abbrev='PKINIT'>Public Key Cryptography for Initial
       Authentication in Kerberos</title>

       <author initials='B.' surname='Tung' fullname='Brian Tung'>
           <organization>USC/Information Sciences Institute</organization>
       </author>

       <author initials='B.' surname='Neuman' fullname='B. Clifford
       Neuman'>
           <organization>USC/Information Sciences Institute</organization>
       </author>

       <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
           <organization>Motorola, Inc.</organization>
       </author>

       <date year='2004' month='August' />
       </front>

    </reference>

<reference anchor='LENSTRA'>

   <front>

   <title abbrev='PKINIT'>Public Key Cryptography for Initial
   Authentication in Kerberos</title>

   <author initials='B.' surname='Tung' fullname='Brian Tung'>
       <organization>USC/Information Sciences Institute</organization>
   </author>

   <author initials='B.' surname='Neuman' fullname='B. Clifford
   Neuman'>
       <organization>USC/Information Sciences Institute</organization>
   </author>

   <author initials="S." surname='Medvinsky' fullname='Sasha Medvinsky'>
       <organization>Motorola, Inc.</organization>
   </author>

   <date year='2004' month='August' />
   </front>
</reference>


</references>
    </back>
</rfc>
