RFC 6542 PROPOSED STANDARD SECURITY · KERBEROS · GSS-API

Krb5 Channel Binding: Kerberos Version 5 Generic Security Service Application Program Interface (GSS-API) Channel Binding Hash Agility

Lets the Kerberos GSS-API mechanism tie a login to a connection using a negotiated algorithm instead of MD5.

On rfc-editor.org ↗
PUBLISHED
March 2012
AUTHORS
S. Emery
STREAM
IETF
BUILDS ON
RFC 4121 — Kerberos GSS-API v2
KEY USAGE NUMBER
43
BND FIELD SIZE
16 octets
CHANNEL BINDING MIC EXTENSION TYPE
0x00000000
EXTENSION TYPE AND LENGTH FIELDS
32 bits each, big-endian
DOI
10.17487/RFC6542

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Internet Engineering Task Force (IETF)                          S. Emery
Request for Comments: 6542                                        Oracle
Updates: 4121                                                 March 2012
Category: Standards Track
ISSN: 2070-1721


                           Kerberos Version 5
    Generic Security Service Application Program Interface (GSS-API)
                      Channel Binding Hash Agility

Abstract

   Currently, channel bindings are implemented using an MD5 hash in the
   Kerberos Version 5 Generic Security Service Application Programming
   Interface (GSS-API) mechanism (RFC 4121).  This document updates RFC
   4121 to allow channel bindings using algorithms negotiated based on
   Kerberos crypto framework as defined in RFC 3961.  In addition,
   because this update makes use of the last extensible field in the
   Kerberos client-server exchange message, extensions are defined to
   allow future protocol extensions.

Status of This Memo

   This is an Internet Standards Track document.

   This document is a product of the Internet Engineering Task Force
   (IETF).  It represents the consensus of the IETF community.  It has
   received public review and has been approved for publication by the
   Internet Engineering Steering Group (IESG).  Further information on
   Internet Standards is available in Section 2 of RFC 5741.

   Information about the current status of this document, any errata,
   and how to provide feedback on it may be obtained at
   http://www.rfc-editor.org/info/rfc6542.

Copyright Notice

   Copyright (c) 2012 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Table of Contents

   1. Introduction ....................................................2
   2. Conventions Used in This Document ...............................2
   3. Channel Binding Hash Agility ....................................2
      3.1. Structure of the Exts Field ................................3
      3.2. The Channel Binding Extension ..............................4
   4. Security Considerations .........................................4
   5. IANA Considerations .............................................4
   6. Acknowledgments .................................................5
   7. References ......................................................5
      7.1. Normative References .......................................5
      7.2. Informative References .....................................5

1.  Introduction

   With the recently discovered weaknesses in the MD5 hash algorithm
   (see [RFC6151]), there is a need to use stronger hash algorithms.
   The Kerberos Version 5 Generic Security Service Application
   Programming Interface (GSS-API) mechanism [RFC4121] uses MD5 to
   calculate channel binding verifiers.  This document specifies an
   update to the mechanism that allows it to create channel binding
   information based on negotiated algorithms.  This will allow
   deploying new algorithms incrementally without breaking
   interoperability with older implementations when new attacks arise in
   the future.

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

   The term "little-endian order" is used for brevity to refer to the
   least-significant-octet-first encoding, while the term "big-endian
   order" is used for the most-significant-octet-first encoding.

3.  Channel Binding Hash Agility

   When generating a channel binding verifier, Bnd, a hash is computed
   from the channel binding fields.  Initiators MUST populate the Bnd
   field in order to maintain interoperability with existing acceptors.
   In addition, initiators MUST populate the extension field (Exts)
   defined below.

3.1.  Structure of the Exts Field

   The 0x8003 GSS checksum has the same structure described in [RFC4121]
   except that the Exts field is now defined; the entire structure of
   the 0x8003 checksum, including the now defined Exts field, follows:

      Octet     Name       Description
      -----------------------------------------------------------------
      0..3      Lgth       Number of octets in Bnd field, represented
                            in little-endian order;  currently contains
                            hex value 10 00 00 00 (16).
      4..19     Bnd        Channel binding information, as described in
                            Section 4.1.1.2 of [RFC4121].
      20..23    Flags      Four-octet context-establishment flags in
                            little-endian order as described in Section
                            4.1.1.1 of [RFC4121].
      24..25    DlgOpt     The delegation option identifier (=1) in
                            little-endian order [optional].  This field
                            and the next two fields are present if and
                            only if GSS_C_DELEG_FLAG is set as described
                            in Section 4.1.1.1 of [RFC4121].
      26..27    Dlgth      The length of the Deleg field in
                            little-endian order [optional].
      28..(n-1) Deleg      KRB_CRED message (n = Dlgth + 28) [optional].
      n..last   Exts       Extensions.

      where Exts is the concatenation of zero, one, or more individual
      extensions, each of which consists of the following, in order:

         type --   big-endian-order unsigned integer, 32 bits, which
                   contains the type of extension
         length -- big-endian-order unsigned integer, 32 bits, which
                   contains the length, in octets, of the extension data
                   encoded as an array of octets immediately following
                   this field
         data --   octet string of extension information

      If multiple extensions are present, then there MUST be at most one
      instance of a given extension type.

3.2.  The Channel Binding Extension

   When channel binding is used, the Exts MUST include the following
   extension:

      data-type 0x00000000

      data-value

         The output obtained by applying the Kerberos V get_mic
         operation [RFC3961] with key usage number 43 to the channel
         binding data as described in [RFC4121], Section 4.1.1.2 (using
         get_mic instead of MD5).  The key used is the sub-session key
         from the authenticator, if it is present; otherwise, the key
         used is the session key from the ticket.  The get_mic algorithm
         is chosen as the "required checksum mechanism" for the
         encryption type of the key used.

   Initiators that are unwilling to use an MD5 hash of the channel
   bindings MUST set the Bnd field to sixteen octets of hex value FF.

4.  Security Considerations

   With this mechanism, initiators get no indication as to whether the
   acceptors check or ignore channel bindings.

   It is up to the application whether or not to enforce the use of
   channel bindings.  [RFC5056] and [RFC5554] give guidance for
   application developers on channel binding usage.

5.  IANA Considerations

   IANA has created a new top-level registry titled "Kerberos V GSS-API
   Mechanism Parameters," separate from the existing Kerberos parameters
   registry.  Within this registry, IANA has created a sub-registry of
   "Kerberos V GSS-API Mechanism Extension Types" with four-field
   entries (Type Number, Type Name, Description, and Reference) and,
   initially, a single registration: 0x00000000, "Channel Binding MIC,"
   "Extension for the verifier of the channel bindings," [RFC6542].

   Using the guidelines for allocation as described in [RFC5226], type
   number assignments are as follows:

       0x00000000 - 0x000003FF IETF Review

       0x00000400 - 0xFFFFF3FF Specification Required

       0xFFFFF400 - 0xFFFFFFFF Private Use

6.  Acknowledgments

   The author would like to thank Larry Zhu, Nicolas Williams, Sam
   Hartman, Jeffrey Hutzelman, and Simon Josefsson for their help in
   reviewing and providing valuable feedback on this document.

7.  References

7.1.  Normative References

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

   [RFC3961]  Raeburn, K., "Encryption and Checksum Specifications for
              Kerberos 5", RFC 3961, February 2005.

   [RFC4121]  Zhu, L., Jaganathan, K., and S. Hartman, "The Kerberos
              Version 5 Generic Security Service Application Program
              Interface (GSS-API) Mechanism: Version 2", RFC 4121, July
              2005.

   [RFC5226]  Narten, T. and H. Alvestrand, "Guidelines for Writing an
              IANA Considerations Section in RFCs", BCP 26, RFC 5226,
              May 2008.

7.2.  Informative References

   [RFC5056]  Williams, N., "On the Use of Channel Bindings to Secure
              Channels", RFC 5056, November 2007.

   [RFC5554]  Williams, N., "Clarifications and Extensions to the
              Generic Security Service Application Program Interface
              (GSS-API) for the Use of Channel Bindings", RFC 5554, May
              2009.

   [RFC6151]  Turner, S. and L. Chen, "Updated Security Considerations
              for the MD5 Message-Digest and the HMAC-MD5 Algorithms",
              RFC 6151, March 2011.

Author's Address

   Shawn Emery
   Oracle
   500 Eldorado Blvd, Building 1
   Broomfield, CO  80021
   USA

   EMail: shawn.emery@oracle.com

AI ELI5

On this page
PROBLEMThe Kerberos V5 GSS-API mechanism computes channel binding verifiers with MD5, which has known weaknesses, and a stronger hash is needed.
MECHANISMInitiators add a channel binding extension in the previously undefined Exts field, holding the output of the Kerberos get_mic operation with key usage number 43, so the algorithm follows from the key's encryption type.
WHY IT MATTERSNew algorithms can be deployed step by step without breaking older implementations. RFC 6542 updates RFC 4121.

§1Why the MD5 Hash Had to Go

The Kerberos Version 5 GSS-API mechanism in RFC 4121 uses MD5 to compute channel binding verifiers. Because of recently discovered weaknesses in MD5 (see RFC 6151), stronger hash algorithms are needed.

This document updates the mechanism so it can build channel binding information from negotiated algorithms. That lets new algorithms be deployed gradually, without breaking interoperability with older implementations when new attacks appear.

The old way of making a fingerprint of a connection had cracks in it. This RFC lets people swap in a better fingerprint maker later without breaking old software.

§2The 0x8003 Checksum and the Exts Field

Initiators MUST still fill in the Bnd field so existing acceptors keep working. They MUST also fill in the new extension field, Exts. The RFC uses this field because it is the last extensible field in the Kerberos client-server exchange message, so it defines extensions for future use.

The 0x8003 GSS checksum has the structure of RFC 4121, with Exts now defined at the end. It holds Lgth (octets 0 to 3, currently 16), Bnd (octets 4 to 19), Flags (octets 20 to 23) and the optional delegation fields DlgOpt, Dlgth and Deleg. These last three are present only if GSS_C_DELEG_FLAG is set.

Exts is zero or more extensions. Each has a 32-bit big-endian type, a 32-bit big-endian length in octets, and the data. At most one instance of a given type may appear.

The old form had an empty box at the end. This RFC says what can go in that box: labelled notes with a type, a size and the contents.

0x8003 CHECKSUM OCTET LAYOUT (RFC 6542)
  • 0..3Lgth — Number of octets in Bnd, little-endian; currently 16.
  • 4..19Bnd — Channel binding information from RFC 4121.
  • 20..23Flags — Context-establishment flags, little-endian.
  • 24..25DlgOpt — Delegation option identifier (1); optional.
  • 26..27Dlgth — Length of Deleg; optional.
  • 28..(n-1)Deleg — KRB_CRED message; optional.
  • n..lastExts — Zero or more extensions.

§3The Channel Binding Extension

When channel binding is used, Exts MUST include an extension of type 0x00000000. Its data is the output of the Kerberos get_mic operation from RFC 3961, using key usage number 43, applied to the channel binding data described in RFC 4121 instead of MD5.

The key is the sub-session key from the authenticator if present, otherwise the session key from the ticket. The algorithm is the "required checksum mechanism" for that key's encryption type, so the hash follows from the Kerberos crypto framework.

Initiators unwilling to use an MD5 hash of the channel bindings MUST set the Bnd field to sixteen octets of hex value FF.

Instead of the old fingerprint, the sender uses the fingerprint method that matches the secret key already in use. A sender who does not trust the old method fills the old slot with all 1s.

§4Security Considerations

With this mechanism, initiators get no indication whether acceptors check or ignore channel bindings. Whether to enforce channel bindings is up to the application, and RFC 5056 and RFC 5554 give guidance to application developers on channel binding usage.

Initiators must still fill in the old Bnd field to stay interoperable with existing acceptors, which is why the RFC lets them set it to sixteen octets of FF when they do not want MD5 used.

The sender cannot tell whether the other side actually checks the fingerprint, so programs must decide for themselves whether to insist on it.

§5The Extension Type Registry

IANA created a new top-level registry named "Kerberos V GSS-API Mechanism Parameters", separate from the existing Kerberos parameters registry. Inside it is a sub-registry of extension types, with entries made of Type Number, Type Name, Description and Reference.

It starts with one entry, 0x00000000, "Channel Binding MIC". Types 0x00000000 to 0x000003FF need IETF Review, 0x00000400 to 0xFFFFF3FF need Specification Required, and 0xFFFFF400 to 0xFFFFFFFF are Private Use.

There is now an official list of note types, and only one is on it so far. Some number ranges need careful review, and some are free for private use.

§6References