RFC 4556 - Public Key Cryptography for Initial Authenticatio

时间:2006-11-02 来源: 作者: 点击:
NetworkWorkingGroup L.Zhu RequestforComments:4556MicrosoftCorporation Category:StandardsTrack B.Tung AerospaceCorporation June2006 PublicKeyCryptographyfor InitialAuthenticationinKerberos(PKINIT) StatusofThisMemo ThisdocumentspecifiesanInternetstanda
  Network Working Group                                                      L. Zhu
Request for Comments: 4556                         Microsoft Corporation
Category: Standards Track                                                  B. Tung
                                                                  Aerospace Corporation
                                                                                      June 2006

                      Public Key Cryptography for
              Initial Authentication in Kerberos (PKINIT)

Status of This Memo

   This document specifies an Internet standards track protocol for the
   Internet community, and requests discussion and suggestions for
   improvements.  Please refer to the current edition of the "Internet
   Official Protocol Standards" (STD 1) for the standardization state
   and status of this protocol.  Distribution of this memo is unlimited.

Copyright Notice

   Copyright (C) The Internet Society (2006).

Abstract

   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.

Table of Contents

   1. Introduction ....................................................2
   2. Conventions Used in This Document ...............................4
   3. Extensions ......................................................5
      3.1. Definitions, Requirements, and Constants ...................6
           3.1.1. Required Algorithms .................................6
           3.1.2. Recommended Algorithms ..............................6
           3.1.3. Defined Message and Encryption Types ................7
           3.1.4. Kerberos Encryption Types Defined for CMS
                  Algorithm Identifiers ...............................8
      3.2. PKINIT Pre-authentication Syntax and Use ...................9
           3.2.1. Generation of Client Request ........................9
           3.2.2. Receipt of Client Request ..........................14
           3.2.3. Generation of KDC Reply ............................18
                  3.2.3.1. Using Diffie-Hellman Key Exchange .........21
                  3.2.3.2. Using Public Key Encryption ...............23

           3.2.4. Receipt of KDC Reply ...............................25
      3.3. Interoperability Requirements .............................26
      3.4. KDC Indication of PKINIT Support ..........................27
   4. Security Considerations ........................................27
   5. Acknowledgements ...............................................30
   6. References .....................................................30
      6.1. Normative References ......................................30
      6.2. Informative References ....................................32
   Appendix A.  PKINIT ASN.1 Module ..................................33
   Appendix B.  Test Vectors .........................................38
   Appendix C.  Miscellaneous Information about Microsoft Windows
                PKINIT Implementations ...............................40

1.  Introduction

   The Kerberos V5 protocol [RFC4120] involves use of a trusted third
   party known as the Key Distribution Center (KDC) to negotiate shared
   session keys between clients and services and provide mutual
   authentication between them.

   The corner-stones of Kerberos V5 are the Ticket and the
   Authenticator.  A Ticket encapsulates a symmetric key (the ticket
   session key) in an envelope (a public message) intended for a
   specific service.  The contents of the Ticket are encrypted with a
   symmetric key shared between the service principal and the issuing
   KDC.  The encrypted part of the Ticket contains the client principal
   name, among other items.  An Authenticator is a record that can be
   shown to have been recently generated using the ticket session key in
   the associated Ticket.  The ticket session key is known by the client
   who requested the ticket.  The contents of the Authenticator are
   encrypted with the associated ticket session key.  The encrypted part
   of an Authenticator contains a timestamp and the client principal
   name, among other items.

   As shown in Figure 1, below, the Kerberos V5 protocol consists of the
   following message exchanges between the client and the KDC, and the
   client and the application service:

    - The Authentication Service (AS) Exchange

      The client obtains an "initial" ticket from the Kerberos
      authentication server (AS), typically a Ticket Granting Ticket
      (TGT).  The AS-REQ message and the AS-REP message are the request
      and the reply message, respectively, between the client and the
      AS.

    - The Ticket Granting Service (TGS) Exchange

      The client subsequently uses the TGT to authenticate and request a
      service ticket for a particular service, from the Kerberos
      ticket-granting server (TGS).  The TGS-REQ message and the TGS-REP
      message are the request and the reply message respectively between
      the client and the TGS.

    - The Client/Server Authentication Protocol (AP) Exchange

      The client then makes a request with an AP-REQ message, consisting
      of a service ticket and an authenticator that certifies the
      client’s possession of the ticket session key.  The server may
      optionally reply with an AP-REP message.  AP exchanges typically
      negotiate session-specific symmetric keys.

   Usually, the AS and TGS are integrated in a single device also known
   as the KDC.

                          +--------------+
               +--------->|  KDC         |
       AS-REQ /   +-------|              |
             /   /        +--------------+
            /   /          ^           |
           /    |AS-REP   /            |
          |     |        / TGS-REQ     + TGS-REP
          |     |       /             /
          |     |      /             /
          |     |     /   +---------+
          |     |    /   /
          |     |   /   /
          |     |  /   /
          |     v /   v
         ++-------+------+             +-----------------+
         |  Client       +------------>|  Application    |
         |               |    AP-REQ   |  Server         |
         |               |<------------|                 |
         +---------------+    AP-REP   +-----------------+

       Figure 1:  The Message Exchanges in the Kerberos V5 Protocol

   In the AS exchange, the KDC reply contains the ticket session key,
   among other items, that is encrypted using a key (the AS reply key)
   shared between the client and the KDC.  The AS reply key is typically
   derived from the client’s password for human users.  Therefore, for
   human users, the attack resistance strength of the Kerberos protocol
   is no stronger than the strength of their passwords.

   The use of asymmetric cryptography in the form of X.509 certificates
   [RFC3280] is popular for facilitating data origin authentication and
   perfect secrecy.  An established Public Key Infrastructure (PKI)
   provides key management and key distribution mechanisms that can be
   used to establish authentication and secure communication.  Adding
   public-key cryptography to Kerberos provides a nice congruence to
   public-key protocols, obviates the human users’ burden to manage
   strong passwords, and allows Kerberized applications to take
   advantage of existing key services and identity management.

   The advantage afforded by the Kerberos TGT is that the client exposes
   his long-term secrets only once.  The TGT and its associated session
   key can then be used for any subsequent service ticket requests.  One
   result of this is that all further authentication is independent of
   the method by which the initial authentication was performed.
   Consequently, initial authentication provides a convenient place to
   integrate public-key cryptography into Kerberos authentication.  In
   addition, the use of symmetric cryptography after the initial
   exchange is preferred for performance.

   This document describes the methods and data formats using which the
   client and the KDC can use public and private key pairs to mutually
   authenticate in the AS exchange and negotiate the AS reply key, known
   only by the client and the KDC, to encrypt the AS-REP sent by the
   KDC.

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

   In this protocol, both the client and the KDC have a public-private
   key pair in order to prove their identities to each other over the
   open network.  The term "signature key" is used to refer to the
   private key of the key pair being used.

   The encryption key used to encrypt the enc-part field of the KDC-REP
   in the AS-REP [RFC4120] is referred to as the AS reply key.

   An empty sequence in an optional field can be either included or
   omitted: both encodings are permitted and considered equivalent.

   The term "Modular Exponential Diffie-Hellman" is used to refer to the
   Diffie-Hellman key exchange, as described in [RFC2631], in order to
   differentiate it from other equivalent representations of the same
   key agreement algorithm.

3.  Extensions

   This section describes extensions to [RFC4120] for supporting the use
   of public-key cryptography in the initial request for a ticket.

   Briefly, this document defines the following extensions to [RFC4120]:

   1. The client indicates the use of public-key authentication by
      including a special preauthenticator in the initial request.  This
      preauthenticator contains the client’s public-key data and a
      signature.

   2. The KDC tests the client’s request against its authentication
      policy and trusted Certification Authorities (CAs).

   3. If the request passes the verification tests, the KDC replies as
      usual, but the reply is encrypted using either:

      a. a key generated through a Diffie-Hellman (DH) key exchange
         [RFC2631] [IEEE1363] with the client, signed using the KDC’s
         signature key; or

      b. a symmetric encryption key, signed using the KDC’s signature
         key and encrypted using the client’s public key.

      Any keying material required by the client to obtain the
      encryption key for decrypting the KDC reply is returned in a pre-
      authentication field accompanying the usual reply.

   4. The client validates the KDC’s signature, obtains the encryption
      key, decrypts the reply, and then proceeds as usual.

   Section 3.1 of this document enumerates the required algorithms and
   necessary extension message types.  Section 3.2 describes the
   extension messages in greater detail.

3.1.  Definitions, Requirements, and Constants

3.1.1.  Required Algorithms

   All PKINIT implementations MUST support the following algorithms:

   o  AS reply key enctypes: aes128-cts-hmac-sha1-96 and aes256-cts-
      hmac-sha1-96 [RFC3962].

   o  Signature algorithm: sha-1WithRSAEncryption [RFC3370].

   o  AS reply key delivery method: the Diffie-Hellman key delivery
      method, as described in Section 3.2.3.1.

   In addition, implementations of this specification MUST be capable of
   processing the Extended Key Usage (EKU) extension and the id-pkinit-
   san (as defined in Section 3.2.2) otherName of the Subject
   Alternative Name (SAN) extension in X.509 certificates [RFC3280].

3.1.2.  Recommended Algorithms

   All PKINIT implementations SHOULD support the following algorithm:

   o  AS reply key delivery method: the public key encryption key
      delivery method, as described in Section 3.2.3.2.

   For implementations that support the public key encryption key
   delivery method, the following algorithms MUST be supported:

   a) Key transport algorithms identified in the keyEncryptionAlgorithm
      field of the type KeyTransRecipientInfo [RFC3852] for encrypting
      the temporary key in the encryptedKey field [RFC3852] with a
      public key, as described in Section 3.2.3.2: rsaEncryption (this
      is the RSAES-PKCS1-v1_5 encryption scheme) [RFC3370] [RFC3447].

   b) Content encryption algorithms identified in the
      contentEncryptionAlgorithm field of the type EncryptedContentInfo
      [RFC3852] for encrypting the AS reply key with the temporary key
      contained in the encryptedKey field of the type
      KeyTransRecipientInfo [RFC3852], as described in Section 3.2.3.2:
      des-ede3-cbc (three-key 3DES, CBC mode) [RFC3370].

3.1.3.  Defined Message and Encryption Types

   PKINIT makes use of the following new pre-authentication types:

       PA_PK_AS_REQ                                 16
       PA_PK_AS_REP                                 17

   PKINIT also makes use of the following new authorization data type:

       AD_INITIAL_VERIFIED_CAS                       9

   PKINIT introduces the following new error codes:

       KDC_ERR_CLIENT_NOT_TRUSTED                   62
       KDC_ERR_INVALID_SIG                          64
       KDC_ERR_DH_KEY_PARAMETERS_NOT_ACCEPTED       65
       KDC_ERR_CANT_VERIFY_CERTIFICATE              70
       KDC_ERR_INVALID_CERTIFICATE                  71
       KDC_ERR_REVOKED_CERTIFICATE                  72
       KDC_ERR_REVOCATION_STATUS_UNKNOWN            73
       KDC_ERR_CLIENT_NAME_MISMATCH                 75
       KDC_ERR_INCONSISTENT_KEY_PURPOSE             77
       KDC_ERR_DIGEST_IN_CERT_NOT_ACCEPTED          78
       KDC_ERR_PA_CHECKSUM_MUST_BE_INCLUDED         79
       KDC_ERR_DIGEST_IN_SIGNED_DATA_NOT_ACCEPTED   80
       KDC_ERR_PUBLIC_KEY_ENCRYPTION_NOT_SUPPORTED  81

   PKINIT uses the following typed data types for errors:

       TD_TRUSTED_CERTIFIERS                       104
       TD_INVALID_CERTIFICATES                     105
       TD_DH_PARAMETERS                            109

   The ASN.1 module for all structures defined in this document (plus
   IMPORT statements for all imported structures) is given in Appendix
   A.

   All structures defined in or imported into this document MUST be
   encoded using Distinguished Encoding Rules (DER) [X680] [X690]
   (unless otherwise noted).  All data structures carried in OCTET
   STRINGs MUST be encoded according to the rules specified in the
   specifications defining each data structure; a reference to the
   appropriate specification is provided for each data structure.

   Interoperability note: Some implementations may not be able to decode
   wrapped Cryptographic Message Syntax (CMS) [RFC3852] objects encoded
   with BER; specifically, they may not be able to decode indefinite-
   length encodings.  To maximize interoperability, implementers SHOULD
   encode CMS objects used in PKINIT with DER.

3.1.4.  Kerberos Encryption Types Defined for CMS Algorithm Identifiers

   PKINIT defines the following Kerberos encryption type numbers
   [RFC3961], which can be used in the etype field of the AS-REQ
   [RFC4120] message to indicate to the KDC the client’s acceptance of
   the corresponding algorithms (including key transport algorithms
   [RFC3370], content encryption algorithms [RFC3370], and signature
   algorithms) for use with Cryptographic Message Syntax (CMS) [RFC3852]
   [RFC3370].

   Per [RFC4120], the encryption types in the etype field are in the
   decreasing preference order of the client.  Note that there is no
   significance in the relative order between any two of different types
   of algorithms: key transport algorithms, content encryption
   algorithms, and signature algorithms.

   The presence of each of these encryption types in the etype field is
   equivalent to the presence of the corresponding algorithm Object
   Identifier (OID) in the supportedCMSTypes field as described in
   Section 3.2.1.  And the preference order expressed in the
   supportedCMSTypes field would override the preference order listed in
   the etype field.

    Kerberos Encryption Type Name  Num  Corresponding Algorithm OID
    ============================== === ===============================
    id-dsa-with-sha1-CmsOID         9  id-dsa-with-sha1 [RFC3370]
    md5WithRSAEncryption-CmsOID    10  md5WithRSAEncryption [RFC3370]
    sha-1WithRSAEncryption-CmsOID  11  sha-1WithRSAEncryption [RFC3370]
    rc2-cbc-EnvOID                 12  rc2-cbc [RFC3370]
    rsaEncryption-EnvOID           13  rsaEncryption [RFC3447][RFC3370]
    id-RSAES-OAEP-EnvOID           14  id-RSAES-OAEP [RFC3447][RFC3560]
    des-ede3-cbc-EnvOID            15  des-ede3-cbc [RFC3370]

   The above encryption type numbers are used only to indicate support
   for the use of the corresponding algorithms in PKINIT; they do not
   correspond to actual Kerberos encryption types [RFC3961] and MUST NOT
   be used in the etype field of the Kerberos EncryptedData type
   [RFC4120].  The practice of assigning Kerberos encryption type
   numbers to indicate support for CMS algorithms is considered
   deprecated, and new numbers should not be assigned for this purpose.
   Instead, the supportedCMSTypes field should be used to identify the
   algorithms supported by the client and the preference order of the
   client.

   For maximum interoperability, however, PKINIT clients wishing to
   indicate to the KDC the support for one or more of the algorithms
   listed above SHOULD include the corresponding encryption type
   number(s) in the etype field of the AS-REQ.

3.2.  PKINIT Pre-authentication Syntax and Use

   This section defines the syntax and use of the various pre-
   authentication fields employed by PKINIT.

3.2.1.  Generation of Client Request

   The initial authentication request (AS-REQ) is sent as per [RFC4120];
   in addition, a pre-authentication data element, whose padata-type is
   PA_PK_AS_REQ and whose padata-value contains the DER encoding of the
   type PA-PK-AS-REQ, is included.

       PA-PK-AS-REQ ::= SEQUENCE {
          signedAuthPack          [0] IMPLICIT OCTET STRING,
                   -- Contains a CMS type ContentInfo encoded
                   -- according to [RFC3852].
                   -- The contentType field of the type ContentInfo
                   -- is id-signedData (1.2.840.113549.1.7.2),
                   -- and the content field is a SignedData.
                   -- The eContentType field for the type SignedData is
                   -- id-pkinit-authData (1.3.6.1.5.2.3.1), and the
                   -- eContent field contains the DER encoding of the
                   -- type AuthPack.
                   -- AuthPack is defined below.
          trustedCertifiers       [1] SEQUENCE OF
                      ExternalPrincipalIdentifier OPTIONAL,
                   -- Contains a list of CAs, trusted by the client,
                   -- that can be used to certify the KDC.
                   -- Each ExternalPrincipalIdentifier identifies a CA
                   -- or a CA certificate (thereby its public key).
                   -- The information contained in the
                   -- trustedCertifiers SHOULD be used by the KDC as

                   -- hints to guide its selection of an appropriate
                   -- certificate chain to return to the client.
          kdcPkId                 [2] IMPLICIT OCTET STRING
                                      OPTIONAL,
                   -- Contains a CMS type SignerIdentifier encoded
                   -- according to [RFC3852].
                   -- Identifies, if present, a particular KDC
                   -- public key that the client already has.
          ...
       }

       DHNonce ::= OCTET STRING

       ExternalPrincipalIdentifier ::= SEQUENCE {
          subjectName            [0] IMPLICIT OCTET STRING OPTIONAL,
                   -- Contains a PKIX type Name encoded according to
                   -- [RFC3280].
                   -- Identifies the certificate subject by the
                   -- distinguished subject name.
                   -- REQUIRED when there is a distinguished subject
                   -- name present in the certificate.
         issuerAndSerialNumber   [1] IMPLICIT OCTET STRING OPTIONAL,
                   -- Contains a CMS type IssuerAndSerialNumber encoded
                   -- according to [RFC3852].
                   -- Identifies a certificate of the subject.
                   -- REQUIRED for TD-INVALID-CERTIFICATES and
                   -- TD-TRUSTED-CERTIFIERS.
         subjectKeyIdentifier    [2] IMPLICIT OCTET STRING OPTIONAL,
                   -- Identifies the subject’s public key by a key
                   -- identifier.  When an X.509 certificate is
                   -- referenced, this key identifier matches the X.509
                   -- subjectKeyIdentifier extension value.  When other
                   -- certificate formats are referenced, the documents
                   -- that specify the certificate format and their use
                   -- with the CMS must include details on matching the
                   -- key identifier to the appropriate certificate
                   -- field.
                   -- RECOMMENDED for TD-TRUSTED-CERTIFIERS.
          ...
       }

       AuthPack ::= SEQUENCE {
          pkAuthenticator         [0] PKAuthenticator,
          clientPublicValue       [1] SubjectPublicKeyInfo OPTIONAL,
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容