TLS                                                           P. Wouters
Internet-Draft                                       No Hats Corporation                                                   Red Hat
Intended status: Standards Track                              J. Gilmore
Expires: October 27, 2012 January 17, 2013
                                                               S. Weiler
                                                            SPARTA, Inc.
                                                              T. Kivinen
                                                           H. Tschofenig
                                                  Nokia Siemens Networks
                                                          April 25,
                                                           July 16, 2012


     Out-of-Band Public Key Validation
                    draft-ietf-tls-oob-pubkey-03.txt for Transport Layer Security


   This document specifies a new TLS certificate type for exchanging raw
   public keys in Transport Layer Security (TLS) and Datagram Transport
   Layer Security (DTLS) for use with out-of-band public key validation.
   Currently, TLS authentication can only occur via X.509-based Public
   Key Infrastructure (PKI) or OpenPGP certificates.  By specifying a
   minimum resource for raw public key exchange, implementations can use
   alternative public key validation methods.

   One such alternative public key valiation method is offered by the
   DNS-Based Authentication of Named Entities (DANE) together with DNS
   Security.  Another alternative is to utilize pre-configured keys, as
   is the case with sensors and other embedded devices.  The usage of
   raw public keys, instead of X.509-based certificates, leads to a
   smaller code footprint.


   This document introduces the support for raw public keys is introduced into TLS via a new non-
   PKIX certificate type. in TLS.

Status of this Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at

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

   This Internet-Draft will expire on October 27, 2012. January 17, 2013.

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
   ( 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 . . . . . . . . . . . . . . . . . . . . . . . . .  4
   2.  Terminology  . . . . . . . . . . . . . . . . . . . . . . . . . .  4
   3.  New TLS Extensions . . . . . . . . . . . . . . . . . . . . . .  4
   4.  TLS Handshake Extension  . . . . . . . . . . . . . . . . . . . .  5
     4.1.  Client Hello . . . . . . . . . . . . . . . . . . . . . . .  5
     4.2.  Server Hello . . . . . . . . . . . . . . . . . . . . . . .  6
     4.3.  Certificate Request  . . . . . . . . . . . . . . . . . . .  6
     4.4.  Certificate Payload  . 7
     3.4.  Other Handshake Messages . . . . . . . . . . . . . . . . . 7
     3.5.  Client authentication .  6
     4.5.  Other TLS Messages . . . . . . . . . . . . . . . . . . . 7
   4.  Security Considerations .  6
   5.  Examples . . . . . . . . . . . . . . . . . . . 7
   5.  IANA Considerations . . . . . . . .  6
   6.  Security Considerations  . . . . . . . . . . . . . . 8
   6.  Contributors . . . . .  9
   7.  IANA Considerations  . . . . . . . . . . . . . . . . . . . . 8
   7. . 10
   8.  Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 8
   8. 10
   9.  References . . . . . . . . . . . . . . . . . . . . . . . . . . 8
     8.1. 11
     9.1.  Normative References . . . . . . . . . . . . . . . . . . . 8
     8.2. 11
     9.2.  Informative References . . . . . . . . . . . . . . . . . . 8 11
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 9 12

1.  Introduction

   Traditionally, TLS server public keys are obtained in PKIX containers
   in-band using the TLS handshake and validated using trust anchors
   based on a [PKIX] certification authority (CA).  This method can add
   a complicated trust relationship that is difficult to validate.
   Examples of such complexity can be seen in [Defeating-SSL].

   Alternative methods are available that allow a TLS client to obtain
   the TLS server public key:

   o  The TLS server public key is obtained from a DNSSEC secured
      resource records using DANE [I-D.ietf-dane-protocol].

   o  The TLS server public key is obtained from a [PKIX] certificate
      chain from an Lightweight Directory Access Protocol (LDAP) [LDAP]

   o  The TLS client and server public key is provisioned into the
      operating system firmware image, and updated via software updates.

   Some smart objects use the UDP-based Constrained Application Protocol
   (CoAP) [I-D.ietf-core-coap] to interact with a Web server to upload
   sensor data at a regular intervals, such as temperature readings.
   CoAP [I-D.ietf-core-coap] can utilize DTLS for securing the client-
   to-server communication.  As part of the manufacturing process, the
   embeded device may be configured with the address and the public key
   of a dedicated CoAP server, as well as a public key for the client
   itself.  The usage of X.509-based PKIX certificates [PKIX] may does not
   suit all smart object deployments and would therefore be an
   unneccesarry burden.

   The Transport Layer Security (TLS) Protocol Version 1.2 [RFC5246]
   provides a framework for extensions to TLS as well as guidelines for
   designing such extensions.  This document uses the TLS Certificate
   Type defines an extension point to define a new non-X.509 certificate type
   indicate the support for
   carrying raw public keys.

2.  Terminology

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   document are to be interpreted as described in RFC 2119 [RFC2119].

3.  New TLS Handshake Extension

   This section describes the changes Extensions

   In order to indicate the TLS handshake message
   contents when raw public key certificates support for multiple certificate types two
   new extensions are to be used.  Figure 1
   illustrates the exchange of messages as described in defined by this specification with the sub-sections
   below. following

   cert-send:  The new "RawPublicKey" value certificate payload in this message contains a
      certificate of the cert_type type indicated by this extension.

   cert-receive:  By including this extension an entity indicates the ability and desire that
      it is able to exchange raw public keys, which
   are then exchanged as part of recieve and process the indicated certificate payloads.  Note types.
      This list is sorted by preference.

     enum { X.509(0), RawPublicKey(1), (255) } CertType;

     CertType cert-receive <1..2^8-1>;

     CertType cert-send;

                  Figure 1: New TLS Extension Structures

   No new cipher suites are required for use with raw public keys.  All
   existing cipher suites that support a key exchange method compatible
   with the key in the certificate payloads only contain can be used in combination with raw
   public key certificate types.

4.  TLS Handshake Extension

   This section describes the SubjectPublicKeyInfo
   structure instead semantic of the entire certificate.

    cert_type="RawPublicKey" ->

                              <-  server_hello,

    finished                  ->

                              <- change_cipher_spec,

   Application Data        <------->     Application Data

                      Figure 1: Example Message Flow

3.1. 'cert-send' and the 'cert-
   receive' extensions for the different handshake messages.

4.1.  Client Hello

   In order

   To allow a TLS client to indicate the support that it is able to receive a
   certificate of out-of-band raw public keys,
   clients MUST a specific type it MAY include an the 'cert-receive'
   extension of type "cert_type" to in the extended client hello message.  The "cert_type" TLS extension, which is
   defined in [RFC6091], is assigned  To indicate the value of 9 from ability to
   process a raw public key by the server the TLS
   ExtensionType registry.  This value is used as client MUST include
   the extension number
   for 'cert-receive' with the extensions value one (1) (indicating "RawPublicKey")
   in both the client hello message and the server
   hello message.  The hello extension mechanism is described in

   The "cert_type" TLS extension carries a list of supported certificate
   types the client can use, sorted by client preference.  This
   extension MUST be omitted if the types.  If a TLS client only
   supports X.509
   certificates.  The "extension_data" field of certificates it MAY include this extension contains
   a CertificateTypeExtension structure.  Note to indicate
   support for it.

   Future documents may define additional certificate types that the
   CertificateTypeExtension structure is being used both by the client
   and the server, even though the structure is only specified once in
   this document.

   The [RFC6091] defined CertificateTypeExtension is extended as

   enum { client, server } ClientOrServerExtension;

   enum { X.509(0), OpenPGP(1),
      (255) } CertificateType;

   struct {
          case client:
            CertificateType certificate_types<1..2^8-1>;
          case server:
            CertificateType certificate_type;
   } CertificateTypeExtension; require
   addition values to be registered.

   Note: No new cipher suites are required to use raw public keys.  All
   existing cipher suites that support a key exchange method compatible
   with the defined extension can be used.


4.2.  Server Hello

   If the server receives a client hello that contains the "cert_type" 'cert-
   receive' extension and chooses a cipher suite then two outcomes are possible.  The server MUST
   either select a certificate type from the
   CertificateType field in the extended client hello client-provided list or
   terminate the session with a fatal alert of type
   "unsupported_certificate".  In the former case the procedure in
   Section 4.4 MUST be followed.

4.3.  Certificate Request

   The certificate type selected Certificate Request payload sent by the TLS server is encoded in to the TLS
   client MUST be accompanied by a
   CertificateTypeExtension structure, 'cert-receive' extension, which is included in
   indicates to the extended
   server hello message using an extension of type "cert_type".  Servers
   that only support X.509 certificates MAY omit including TLS client the
   "cert_type" extension in certificate type the extended server hello.

   If supports.

4.4.  Certificate Payload

   Certificate payloads MUST be accompanied by a 'cert-send' extension,
   which indicates the negotiated certificate type is RawPublicKey format found in the Certificate
   payload itself.

   The list of supported certificate types to choose from MUST have been
   obtained via the 'cert-receive' extension.  This ensures that a
   Certificate payload only contains a certificate type that is also
   supported by the recipient.

   When the 'RawPublicKey' certificate type is selected then the
   SubjectPublicKeyInfo structure MUST be placed into the Certificate
   payload.  The type of the asymmetric key MUST match the selected key
   exchange algorithm.

4.5.  Other TLS Messages

   All the other handshake messages are identical to the TLS

5.  Examples

   Figure 2, Figure 3, and Figure 4 illustrate example message

   The first example shows an exchange where the TLS client indicates
   its ability to process two certificate types, namely raw public keys
   and X.509 certificates via the 'cert-receive' extension (see [1]).
   When the TLS server receives the client hello it processes the cert-
   receive extension and since it also has a raw public key it indicates
   in [2] that it had choosen to place the SubjectPublicKeyInfo
   structure into the Certificate payload (see [3]).  The client uses
   this raw public key in the TLS handshake and an out-of-band
   technique, such as DANE, to verify its validatity.

   cert-receive=(RawPublicKey, X.509) -> // [1]

                            <-  server_hello,
                                cert-send=RawPublicKey, // [2]
                                certificate, // [3]

   finished                  ->

                            <- change_cipher_spec,

   Application Data        <------->     Application Data

     Figure 2: Example with Raw Public Key provided by the TLS Server

   In our second example the TLS client and the TLS server use raw
   public keys.  This is a use case envisioned for smart object
   networking.  The TLS client in this case is an embedded device that
   only supports raw public keys and therefore it indicates this
   capability via the 'cert-receive' extension in [1].  As in the
   previously shown example the server fulfills the client's request and
   provides a raw public key into the Certificate payload back to the
   client (see [2] and [3]).  The TLS server, however, demands client
   authentication and for this reason a Certificate_Request payload is
   added [4], which comes with an indication of the supported
   certificate types by the server, see [5].  The TLS client, who has a
   raw public key pre-provisioned, returns it in the Certificate payload
   [7] to the server with the indication about its content [6].

  cert-receive=(RawPublicKey) -> // [1]

                           <-  server_hello,
                               cert-send=RawPublicKey,// [2]
                               certificate, // [3]
                               certificate_request, // [4]
                               cert-receive=(RawPublicKey, X.509) // [5]

  cert-send=RawPublicKey, // [6]
  certificate, // [7]
  finished                  ->

                           <- change_cipher_spec,

  Application Data        <------->     Application Data

   Figure 3: Example with Raw Public Key provided by the TLS server
   MUST place the SubjectPublicKeyInfo structure into Server and
                                the Certificate
   payload. Client

   In our last example we illustrate a combination of raw public key and
   X.509 usage.  The client uses a raw public key MUST match for client
   authentication but the selected key server provides an X.509 certificate.  This

3.3.  Certificate Request starts with the client indicating its ability to process
   X.509 certificates.  The semantics of this message remain server provides the same as X.509 certificate using
   that format in [3] with the TLS

3.4.  Other Handshake Messages

   All the other handshake messages are identical to the TLS

3.5.  Client authentication

   Client authentication by indication present in [2].  For client
   authentication, however, the TLS server indicates in [5] that it is supported only through
   authentication of the received able
   to support raw public keys as well as X.509 certificates.  The TLS
   client SubjectPublicKeyInfo via an
   out-of-band method

4. provides a raw public key in [7] and the indication in [6].

  cert-receive=(X.509) -> // [1]

                           <-  server_hello,
                               cert-send=X.509,// [2]
                               certificate, // [3]
                               certificate_request, // [4]
                               cert-receive=(RawPublicKey, X.509) // [5]

  cert-send=RawPublicKey, // [6]
  certificate, // [7]
  finished                  ->

                           <- change_cipher_spec,

  Application Data        <------->     Application Data

                   Figure 4: Hybrid Certificate Example

6.  Security Considerations

   The transmission of raw public keys, as described in this document,
   provides benefits by lowering the over-the-air transmission overhead
   since raw public keys are quite naturally smaller than an entire
   certificate.  There are also advantages from a codesize point of view
   for parsing and processing these keys.  The crytographic procedures
   for assocating the public key with the possession of a private key
   also follows standard procedures.

   The main security challenge is, however, how to associate the public
   key with a specific entity.  This information will be needed to make
   authorization decisions.  Without a secure binding, man-in-the-middle
   attacks may be the consequence.  This document assumes that such
   binding can be made out-of-band and we list a few examples in
   Section 1.  DANE [I-D.ietf-dane-protocol] offers one such approach.
   If public keys are obtained using DANE, these public keys are
   authenticated via DNSSEC.  Pre-configured keys is another out of band
   method for authenticating raw public keys.  While pre-configured keys
   are not suitable for a generic Web-based e-commerce environment such
   keys are a reasonable approach for many smart object deployments
   where there is a close relationship between the software running on
   the device and the server-side communication endpoint.  Regardless of
   the chosen mechanism for out-of-band public key validation an
   assessment of the most suitable approach has to be made prior to the
   start of a deployment to ensure the security of the system.


7.  IANA Considerations

   This document requests IANA defines two new TLS extension, 'cert-send' and 'cert-
   receive', and their values need to assign a be added to the TLS cert_type value for
   RawPublicKey.  The cert_type ExtensionType
   registry created by RFC 5246 [RFC5246].

   The values in these new extensions contains an 8-bit CertificateType
   field, for which a new registry, named "Certificate Types", is
   established with [RFC6091].

6.  Contributors in this document, to be maintained by IANA.  The registry
   is segmented in the following individuals made important contributions to way:

   1.  The value (0) is defined in this
   document: Paul Hoffman.

7. document.

   2.  Values from 2 through 223 decimal inclusive are assigned using
       the 'Specification Required' policy defined in RFC 5226

   3.  Values from 224 decimal through 255 decimal inclusive are
       reserved for 'Private Use', see [RFC5226].

8.  Acknowledgements

   The feedback from the TLS working group meeting at IETF#81 has
   substantially shaped the document and we would like to thank the
   meeting participants for their input.  The support for hashes of
   public keys has been moved to [I-D.ietf-tls-cached-info] after the
   discussions at the IETF#82 meeting and the feedback from Eric

   We would like to thank the following persons for their review
   comments: Martin Rex, Bill Frantz, Zach Shelby, Carsten Bormann,
   Cullen Jennings, Rene Struik, Alper Yegin, and Jim Schaad.

8. Schaad, Paul Hoffman,
   Robert Cragie, Nikos Mavrogiannopoulos, Phil Hunt, John Bradley, and
   James Manger.

9.  References

9.1.  Normative References

   [PKIX]     Cooper, D., Santesson, S., Farrell, S., Boeyen, S.,
              Housley, R., and W. Polk, "Internet X.509 Public Key
              Infrastructure Certificate and Certificate Revocation List
              (CRL) Profile", RFC 5280, May 2008.

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

   [RFC5246]  Dierks, T. and E. Rescorla, "The Transport Layer Security
              (TLS) Protocol Version 1.2", RFC 5246, August 2008.


9.2.  Informative References

              Marlinspike, M., "New Tricks for Defeating SSL in
              Practice", February 2009, <

              Shelby, Z., Hartke, K., Bormann, C., and B. Frank,
              "Constrained Application Protocol (CoAP)",
              draft-ietf-core-coap-10 (work in progress), March June 2012.

              Hoffman, P. and J. Schlyter, "The DNS-Based Authentication
              of Named Entities (DANE) Protocol for Transport Layer Security (TLS)", draft-ietf-dane-protocol-19 (TLS)
              Protocol: TLSA", draft-ietf-dane-protocol-23 (work in
              progress), April June 2012.

              Santesson, S. and H. Tschofenig, "Transport Layer Security
              (TLS) Cached Information Extension",
              draft-ietf-tls-cached-info-11 (work in progress),
              December 2011.

   [LDAP]     Sermersheim, J., "Lightweight Directory Access Protocol
              (LDAP): The Protocol", RFC 4511, June 2006.

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

   [RFC6091]  Mavrogiannopoulos, N. and D. Gillmor, "Using OpenPGP Keys
              for Transport Layer Security (TLS) Authentication",
              RFC 6091, February 2011.

Authors' Addresses

   Paul Wouters
   No Hats Corporation
   Red Hat


   John Gilmore
   PO Box 170608
   San Francisco, California  94117

   Phone: +1 415 221 6524

   Samuel Weiler
   SPARTA, Inc.
   7110 Samuel Morse Drive
   Columbia, Maryland  21046


   Tero Kivinen
   Eerikinkatu 28
   HELSINKI  FI-00180


   Hannes Tschofenig
   Nokia Siemens Networks
   Linnoitustie 6
   Espoo  02600

   Phone: +358 (50) 4871445