< draft-friel-tls-atls-01.txt   draft-friel-tls-atls-02.txt >
Network Working Group O. Friel Network Working Group O. Friel
Internet-Draft R. Barnes Internet-Draft R. Barnes
Intended status: Standards Track M. Pritikin Intended status: Standards Track M. Pritikin
Expires: February 1, 2019 Cisco Expires: September 12, 2019 Cisco
H. Tschofenig H. Tschofenig
ARM Limited ARM Limited
M. Baugher M. Baugher
Consultant Consultant
July 31, 2018 March 11, 2019
Application-Layer TLS Application-Layer TLS
draft-friel-tls-atls-01 draft-friel-tls-atls-02
Abstract Abstract
This document specifies how TLS sessions can be established at the This document specifies how TLS sessions can be established at the
application layer over untrusted transport between clients and application layer over untrusted transport between clients and
services for the purposes of establishing secure end-to-end encrypted services for the purposes of establishing secure end-to-end encrypted
communications channels. Transport layer encodings for application communications channels. Transport layer encodings for application
layer TLS records are specified for HTTP and CoAP transport. layer TLS records are specified for HTTP and CoAP transport.
Explicit identification of application layer TLS packets enables Explicit identification of application layer TLS packets enables
middleboxes to provide transport services and enforce suitable middleboxes to provide transport services and enforce suitable
skipping to change at page 1, line 49 skipping to change at page 1, line 49
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on February 1, 2019. This Internet-Draft will expire on September 12, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2018 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 43 skipping to change at page 2, line 43
4.4. Ephemeral Diffie-Hellman Over COSE . . . . . . . . . . . 8 4.4. Ephemeral Diffie-Hellman Over COSE . . . . . . . . . . . 8
5. ATLS Goals . . . . . . . . . . . . . . . . . . . . . . . . . 8 5. ATLS Goals . . . . . . . . . . . . . . . . . . . . . . . . . 8
6. Architecture Overview . . . . . . . . . . . . . . . . . . . . 8 6. Architecture Overview . . . . . . . . . . . . . . . . . . . . 8
6.1. Application Architecture . . . . . . . . . . . . . . . . 8 6.1. Application Architecture . . . . . . . . . . . . . . . . 8
6.1.1. Application Architecture Benefits . . . . . . . . . . 11 6.1.1. Application Architecture Benefits . . . . . . . . . . 11
6.1.2. ATLS Packet Identification . . . . . . . . . . . . . 12 6.1.2. ATLS Packet Identification . . . . . . . . . . . . . 12
6.1.3. ATLS Session Tracking . . . . . . . . . . . . . . . . 12 6.1.3. ATLS Session Tracking . . . . . . . . . . . . . . . . 12
6.1.4. ATLS Record Inspection . . . . . . . . . . . . . . . 12 6.1.4. ATLS Record Inspection . . . . . . . . . . . . . . . 12
6.1.5. Implementation . . . . . . . . . . . . . . . . . . . 12 6.1.5. Implementation . . . . . . . . . . . . . . . . . . . 12
6.2. Functional Design . . . . . . . . . . . . . . . . . . . . 13 6.2. Functional Design . . . . . . . . . . . . . . . . . . . . 13
6.3. Network Architecture . . . . . . . . . . . . . . . . . . 13 6.3. Network Architecture . . . . . . . . . . . . . . . . . . 14
7. Key Exporting and Application Data Encryption . . . . . . . . 15 7. Key Exporting and Application Data Encryption . . . . . . . . 16
7.1. Key Exporter Label . . . . . . . . . . . . . . . . . . . 15 8. ATLS Session Establishment . . . . . . . . . . . . . . . . . 17
7.2. Cipher Suite Selection . . . . . . . . . . . . . . . . . 15 9. ATLS over HTTP Transport . . . . . . . . . . . . . . . . . . 19
7.3. Key Derivation . . . . . . . . . . . . . . . . . . . . . 15 9.1. Protocol Summary . . . . . . . . . . . . . . . . . . . . 20
8. ATLS Session Establishment . . . . . . . . . . . . . . . . . 16 9.2. Content-Type Header . . . . . . . . . . . . . . . . . . . 20
9. ATLS over HTTP Transport . . . . . . . . . . . . . . . . . . 18 9.3. HTTP Status Codes . . . . . . . . . . . . . . . . . . . . 20
9.1. Protocol Summary . . . . . . . . . . . . . . . . . . . . 18 9.4. ATLS Session Tracking . . . . . . . . . . . . . . . . . . 20
9.2. Content-Type Header . . . . . . . . . . . . . . . . . . . 18 9.5. Session Establishment and Key Exporting . . . . . . . . . 20
9.3. HTTP Status Codes . . . . . . . . . . . . . . . . . . . . 18 9.6. Illustrative ATLS over HTTP Session Establishment . . . . 21
9.4. ATLS Session Tracking . . . . . . . . . . . . . . . . . . 18 9.7. ATLS and HTTP CONNECT . . . . . . . . . . . . . . . . . . 21
9.5. Session Establishment and Key Exporting . . . . . . . . . 19 10. ATLS over CoAP Transport . . . . . . . . . . . . . . . . . . 24
9.6. Application Data Encryption . . . . . . . . . . . . . . . 19 11. The "oscore_connection_id" Extension . . . . . . . . . . . . 25
9.7. Illustrative ATLS over HTTP Session Establishment . . . . 19 12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26
9.8. ATLS and HTTP CONNECT . . . . . . . . . . . . . . . . . . 20 12.1. "oscore_connection_id" TLS extension . . . . . . . . . . 26
10. ATLS over CoAP Transport . . . . . . . . . . . . . . . . . . 23 12.2. .well-known URI Registry . . . . . . . . . . . . . . . . 26
11. RTT Considerations . . . . . . . . . . . . . . . . . . . . . 23 12.3. Media Types Registry . . . . . . . . . . . . . . . . . . 27
12. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 23 12.4. HTTP Content-Formats Registry . . . . . . . . . . . . . 28
13. Security Considerations . . . . . . . . . . . . . . . . . . . 23 12.5. CoAP Content-Formats Registry . . . . . . . . . . . . . 28
14. Informative References . . . . . . . . . . . . . . . . . . . 24 12.6. TLS Key Extractor Label . . . . . . . . . . . . . . . . 28
Appendix A. TLS Software Stack Configuration . . . . . . . . . . 26 13. Security Considerations . . . . . . . . . . . . . . . . . . . 28
Appendix B. Pseudo Code . . . . . . . . . . . . . . . . . . . . 26 14. Informative References . . . . . . . . . . . . . . . . . . . 29
B.1. OpenSSL . . . . . . . . . . . . . . . . . . . . . . . . . 26 Appendix A. Pseudo Code . . . . . . . . . . . . . . . . . . . . 31
B.2. Java JSSE . . . . . . . . . . . . . . . . . . . . . . . . 28 A.1. OpenSSL . . . . . . . . . . . . . . . . . . . . . . . . . 31
Appendix C. Example ATLS Handshake . . . . . . . . . . . . . . . 30 A.2. Java JSSE . . . . . . . . . . . . . . . . . . . . . . . . 33
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 30 Appendix B. Example ATLS Handshake . . . . . . . . . . . . . . . 35
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 35
1. Introduction 1. Introduction
There are multiple scenarios where there is a need for application There are multiple scenarios where there is a need for application
layer end-to-end security between clients and application services. layer end-to-end security between clients and application services.
Two examples include: Two examples include:
o Bootstrapping devices that must connect to HTTP application o Bootstrapping devices that must connect to HTTP application
services across untrusted TLS interception middleboxes services across untrusted TLS interception middleboxes
o Constrained devices connecting via gateways to application o Constrained devices connecting via gateways to application
services, where different transport layer protocols may be in use services, where different transport layer protocols may be in use
on either side of the gateway, with the gateway transcoding on either side of the gateway, with the gateway transcoding
between the different transport layer protocols. between the different transport layer protocols.
These two scenarios are described in more detail in Section 3. These two scenarios are described in more detail in Section 3.
Related to this document, there is ongoing work across the industry
to define requirements for end-to-end security.
[I-D.hartke-core-e2e-security-reqs] documents requirements for CoAP
[RFC7252] End-to-End Security. The Open Mobile Alliance (OMA) has
published a candidate standard Lightweight Machine to Machine
Requirements [LwM2M] which defines multiple requirements for end-to-
end security.
This document describes how clients and applications can leverage This document describes how clients and applications can leverage
standard TLS software stacks to establish secure end-to-end encrypted standard TLS software stacks to establish secure end-to-end encrypted
connections at the application layer. The connections may establish connections at the application layer. The connections may establish
TLS [RFC5246] [I-D.ietf-tls-tls13] or DTLS [RFC6347] TLS [RFC5246] [I-D.ietf-tls-tls13] or DTLS [RFC6347]
[I-D.ietf-tls-dtls13] sessions. There are multiple advantages to [I-D.ietf-tls-dtls13] sessions. There are multiple advantages to
reuse of existing TLS software stacks for establishment of reuse of existing TLS software stacks for establishment of
application layer secure connections. These include: application layer secure connections. These include:
o many clients and application services already include a TLS o many clients and application services already include a TLS
software stack, so there is no need to include yet another software stack, so there is no need to include yet another
skipping to change at page 4, line 26 skipping to change at page 4, line 19
cryptographic protocols or libraries cryptographic protocols or libraries
o automatically benefit from new cipher suites by simply upgrading o automatically benefit from new cipher suites by simply upgrading
the TLS software stack the TLS software stack
o automatically benefit from new features, bugfixes, etc. in TLS o automatically benefit from new features, bugfixes, etc. in TLS
software stack upgrades software stack upgrades
This document also explicitly defines how application layer TLS This document also explicitly defines how application layer TLS
connections can be established using HTTP [RFC7230] [RFC7540] or CoAP connections can be established using HTTP [RFC7230] [RFC7540] or CoAP
as transport layers. This document does not preclude the user of as transport layers. This document does not preclude the use of
other transport layers, however defining how application layer TLS other transport layers. However, defining how application layer TLS
connections can be established over other transport layers such as connections can be established over other transport layers, such as
[ZigBee] or [Bluetooth] is beyond the scope of this document. [ZigBee] or [Bluetooth], is beyond the scope of this document.
Explicitly identifying application layer TLS packets enables Explicitly identifying application layer TLS packets enables
transport layer middleboxes to provide transport capabilities and transport layer middleboxes to provide transport capabilities and
enforce suitable transport policies for these payloads, without enforce suitable transport policies for these payloads, without
requiring access to unencrypted application data. requiring access to unencrypted application data.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and
"OPTIONAL" in this document are to be interpreted as described in BCP
14 [RFC2119] [RFC8174] when, and only when, they appear in all
capitals, as shown here.
Application layer TLS is referred to as ATLS throughout this Application layer TLS is referred to as ATLS throughout this
document. document.
3. Application Layer End-to-End Security Use Cases 3. Application Layer End-to-End Security Use Cases
This section describes in more detail the bootstrapping and This section describes in more detail the bootstrapping and
constrained device use cases mentioned in the introduction. constrained device use cases mentioned in the introduction.
3.1. Bootstrapping Devices 3.1. Bootstrapping Devices
skipping to change at page 6, line 32 skipping to change at page 6, line 29
| Device |-------------->| Gateway |------------->| Mobile App | | Device |-------------->| Gateway |------------->| Mobile App |
+--------+ +---------+ +------------+ +--------+ +---------+ +------------+
^ ^ ^ ^
| | | |
+--------Device to Mobile App ATLS Connection-------+ +--------Device to Mobile App ATLS Connection-------+
Figure 2: IoT Closed Network Gateway Figure 2: IoT Closed Network Gateway
3.2.2. Constrained Device Connecting over the Internet 3.2.2. Constrained Device Connecting over the Internet
A somewhat similar example has an IoT device connecting to a gateway In this example an IoT device connecting to a gateway using a
using a suitable transport mechanism such as ZigBee, CoAP, MQTT, etc. suitable transport mechanism, such as ZigBee, CoAP, MQTT, etc. The
The gateway function in turn talks HTTP over TLS (or, for example, gateway function in turn talks HTTP over TLS (or, for example, HTTP
HTTP over QUIC) to an application service over the Internet. This is over QUIC) to an application service over the Internet. This is
illustrated in Figure 3. illustrated in Figure 3.
The gateway may not be trusted and all messages between the IoT The gateway may not be trusted and all messages between the IoT
device and the application service must be end-to-end encrypted. device and the application service must be end-to-end encrypted.
Similar to the previous use case, the endpoints have no guarantees Similar to the previous use case, the endpoints have no guarantees
about what level of transport layer security is enforced across all about what level of transport layer security is enforced across all
hops. Again, ATLS addresses these concerns. hops. Again, ATLS addresses these concerns.
+--------+ CoAP/DTLS +------------------+ HTTP/TLS +---------+ +--------+ CoAP/DTLS +------------------+ HTTP/TLS +---------+
| Device |-------------->| Internet Gateway |------------>| Service | | Device |-------------->| Internet Gateway |------------>| Service |
skipping to change at page 7, line 39 skipping to change at page 7, line 39
party's static public key is acceptable ~~~ party's static public key is acceptable ~~~
4.2. Signal 4.2. Signal
The [Signal] protocol provides end-to-end encryption and uses EdDSA The [Signal] protocol provides end-to-end encryption and uses EdDSA
signatures, Triple Diffie-Hellman handshake for shared secret signatures, Triple Diffie-Hellman handshake for shared secret
establishment, and the Double Ratchet Algorithm for key management. establishment, and the Double Ratchet Algorithm for key management.
It is used by Open Whisper Systems, WhatsApp and Google. It is used by Open Whisper Systems, WhatsApp and Google.
Similar to Noise, Signal does not define an authentication mechanism. Similar to Noise, Signal does not define an authentication mechanism.
The current [X3DH] specification states in section 4.1 The current [X3DH] specification states in Section 4.1
"Authentication": "Authentication":
Methods for doing this are outside the scope of this document Methods for doing this are outside the scope of this document
4.3. Google ALTS 4.3. Google ALTS
Google's Application Layer Transport Security [ALTS] is a mutual Google's Application Layer Transport Security [ALTS] is a mutual
authentication and transport encryption system used for securing authentication and transport encryption system used for securing
Remote Procedure Call (RPC) communications within Google's Remote Procedure Call (RPC) communications within Google's
infrastructure. ALTS uses an ECDH handshake protocol and a record infrastructure. ALTS uses an ECDH handshake protocol and a record
protocol containing AES encrypted payloads. protocol containing AES encrypted payloads.
4.4. Ephemeral Diffie-Hellman Over COSE 4.4. Ephemeral Diffie-Hellman Over COSE
There is ongoing work to standardise [I-D.selander-ace-cose-ecdhe]. There is ongoing work to standardise [I-D.selander-ace-cose-ecdhe],
This defines a ECDH SIGMA based authenticated key exchange algorithm whiich defines a SIGMA-I based authenticated key exchange protocol
using COSE and COBR objects. using COSE and CBOR.
5. ATLS Goals 5. ATLS Goals
The high level goals driving the design of this mechanism are: The high level goals driving the design of this mechanism are:
o enable authenticated key exchange at the application layer by o enable authenticated key exchange at the application layer by
reusing existing technologies reusing existing technologies
o ensure that ATLS packets are explicitly identified thus ensuring o ensure that ATLS packets are explicitly identified thus ensuring
that any middleboxes or gateways at the transport layer are that any middleboxes or gateways at the transport layer are
skipping to change at page 8, line 36 skipping to change at page 8, line 36
o reuse existing TLS [RFC5246] [I-D.ietf-tls-tls13] and DTLS o reuse existing TLS [RFC5246] [I-D.ietf-tls-tls13] and DTLS
[RFC6347] [I-D.ietf-tls-dtls13] specifications as is without [RFC6347] [I-D.ietf-tls-dtls13] specifications as is without
requiring any protocol changes or software stack changes requiring any protocol changes or software stack changes
o do not mandate constraints on how the TLS stack is configured or o do not mandate constraints on how the TLS stack is configured or
used used
o be forward compatible with future TLS versions o be forward compatible with future TLS versions
o avoid introducing TLS protocol handling logic or semantics into o avoid introducing TLS protocol handling logic or semantics into
the application layer i.e. TLS protocol knowledge and logic is the application layer, i.e. TLS protocol knowledge and logic is
handled by the TLS stack, not the application handled by the TLS stack, not the application
o ensure the client and server software implementations are as o ensure the client and server software implementations are as
simple as possible simple as possible
6. Architecture Overview 6. Architecture Overview
6.1. Application Architecture 6.1. Application Architecture
TLS software stacks allow application developers to 'unplug' the TLS software stacks allow application developers to 'unplug' the
skipping to change at page 11, line 32 skipping to change at page 11, line 32
+--------------+ +-----------+ +------------+ +--------------+ +-----------+ +------------+
Figure 6: TLS stack used for key agreement and exporting Figure 6: TLS stack used for key agreement and exporting
The choice of which application architecture to use will depend on The choice of which application architecture to use will depend on
the overall solution architecture, and the underlying transport layer the overall solution architecture, and the underlying transport layer
or layers in use. While the choice of application architecture is or layers in use. While the choice of application architecture is
outside the scope of this document, some considerations are outlined outside the scope of this document, some considerations are outlined
here. here.
o for constrained devices, every single byte of payload is o in some IoT use cases reducing the number of bytes transmitted is
important. [I-D.mattsson-core-security-overhead] analyses the important. [I-D.mattsson-core-security-overhead] analyses the
overhead of TLS headers compared with OSCORE overhead of TLS headers compared with OSCORE
[I-D.ietf-core-object-security] illustrating the additional [I-D.ietf-core-object-security] illustrating the additional
overhead associated with TLS headers. It may be more appropriate overhead associated with TLS headers. The overhead varies between
to use the architecture defined in Figure 6 in order to establish the different TLS versions and also between TLS and DTLS. It may
shared encryption keys, and then transport encrypted data directly be more appropriate to use the architecture defined in Figure 6 in
without the overhead of unwanted TLS record headers. order to establish shared encryption keys, and then transport
encrypted data directly without the overhead of unwanted TLS
record headers.
o when using HTTP as a transport layer, it may be more appropriate o when using HTTP as a transport layer, it may be more appropriate
to use the architecture defined in Figure 6 in order to avoid any to use the architecture defined in Figure 6 in order to avoid any
TLS session vs. HTTP session affinity issues. TLS session vs. HTTP session affinity issues.
6.1.1. Application Architecture Benefits 6.1.1. Application Architecture Benefits
There are several benefits to using a standard TLS software stack to There are several benefits to using a standard TLS software stack to
establish an application layer secure communications channel between establish an application layer secure communications channel between
a client and a service. These include: a client and a service. These include:
skipping to change at page 13, line 7 skipping to change at page 13, line 9
6.1.5. Implementation 6.1.5. Implementation
Pseudo code illustrating how to read and write TLS records directly Pseudo code illustrating how to read and write TLS records directly
from byte buffers using both OpenSSL BIO functions and Java JSSE from byte buffers using both OpenSSL BIO functions and Java JSSE
SSLEngine is given in the appendices. A blog post by [Norrell] SSLEngine is given in the appendices. A blog post by [Norrell]
outlines a similar approach to leveraging OpenSSL BIO functions, and outlines a similar approach to leveraging OpenSSL BIO functions, and
Oracle publish example code for leveraging [SSLEngine]. Oracle publish example code for leveraging [SSLEngine].
6.2. Functional Design 6.2. Functional Design
[ todo: insert Hannes functional design section here including the The functional design assumes that an authorization system has
policy layers ] established operational keys for authenticating endpoints. In a
layered design, this needs to be done for each layer, which may
operate in two separate authorization domains. Note that Figure 7
shows a generic setup where TLS/DTLS is used at two layers. In some
cases, use of TLS/DTLS at the application layer may be sufficient
where lower layer security mechanisms provide protection of the
transport-specific headers.
Policy examples: +-------------------------------------------------------+
| +---+ +---+ |
| +--------+ |APP| |APP| +--------+ |
| |security| +---+ +---+ |security| |
| |--------+ ^ ^ |--------+ |
| |policies| | | |policies| |
| |LAYER 0 | | | |LAYER 0 | |
| +--------+ v v +--------+ |
| + +------+ APP +------+ + |
| | | TLS- |<--------->| TLS- | | |
| +----->|SERVER| LAYER |CLIENT|<-----+ |
| +------+ +------+ |
| TOP LAYER ^ ^ |
+-----------------|-------------------|-----------------+
| BOTTTOM LAYER | | |
| v v |
| +------+ TRANSPORT +------+ |
| | TLS- |<--------->| TLS- | |
| +--------+ |SERVER| LAYER |CLIENT| +--------+ |
| |security| +------+ +------+ |security| |
| |--------+ ^ ^ |--------+ |
| |policies| | | |policies| |
| |LAYER 1 +-----+ +-----+LAYER 1 | |
| +--------+ +--------+ |
| |
+-------------------------------------------------------+
Mention that the app layer policy could be to not do ATLS if the Figure 7: Functional Design
transport layer establishes an e2e session with the peer. e.g. for
HTTP use cases where there is no middlebox and cert validation
passes.
Mention that the client could report in the ATLS session any The security policies of one layer are distinct from those of another
middlebox cert seen at the transport layer. in Figure 7. They may overlap, but that is not necessary or perhaps
even likely since the key exchanges at the different layers terminate
at different endpoints and the two often have different authorization
domains.
TLS can protect IoT device-to-gateway communications "on the wire"
using the "bottom layer" of Figure 7, and it can protect application
data from the device to the application server using the "top layer."
Application and transport security each have a role to play.
Transport security restricts access to messages on the networks,
notably application headers and application-layer TLS restricts
access to the application payloads.
As shown in Figure 7, an application-layer message, which gets
encrypted and integrity protected and, in the generic case, the the
resulting TLS message and headers are passed to a TLS socket at the
bottom layer, which may have a different security policy than the
application layer.
6.3. Network Architecture 6.3. Network Architecture
An example network deployment is illustrated in Figure 7. It shows a An example network deployment is illustrated in Figure 8. It shows a
constrained client connecting to an application service via an constrained client connecting to an application service via an
internet gateway. The client uses CoAP over DTLS to communicate with internet gateway. The client uses CoAP over DTLS to communicate with
the gateway. The gateway extracts the messages the client sent over the gateway. The gateway extracts the messages the client sent over
CoAP and sends these messages inside HTTP message bodies to the CoAP and sends these messages inside HTTP message bodies to the
application service. It also shows a TLS terminator deployed in application service. It also shows a TLS terminator deployed in
front of the application service. The client establishes a transport front of the application service. The client establishes a transport
layer CoAP/DTLS connection with the gateway (C->G DTLS), the gateway layer CoAP/DTLS connection with the gateway (C->G DTLS), the gateway
in turn opens a transport layer TLS connection with the TLS in turn opens a transport layer TLS connection with the TLS
terminator deployed in front of the service (G->T TLS). The client terminator deployed in front of the service (G->T TLS). The client
can ignore any certificate validation errors when it connects to the can ignore any certificate validation errors when it connects to the
skipping to change at page 14, line 24 skipping to change at page 15, line 24
| UDP | | TCP | | TCP | | UDP | | TCP | | TCP |
+----------+ +----------+ +----------+ +----------+ +----------+ +----------+
+--------+ +-----------+ +----------------+ +---------+ +--------+ +-----------+ +----------------+ +---------+
| Client |----->| Gateway |----->| TLS Terminator |---->| Service | | Client |----->| Gateway |----->| TLS Terminator |---->| Service |
+--------+ +-----------+ +----------------+ +---------+ +--------+ +-----------+ +----------------+ +---------+
^ ^ ^ ^
| | | |
+-------------Client to Service ATLS Connection-------------+ +-------------Client to Service ATLS Connection-------------+
Figure 7: Constrained Device Gateway Network Architecture Figure 8: Constrained Device Gateway Network Architecture
Another typical network deployment is illustrated in Figure 8. It Another typical network deployment is illustrated in Figure 9. It
shows a client connecting to a service via a middlebox. It also shows a client connecting to a service via a middlebox. It also
shows a TLS terminator deployed in front of the service. The client shows a TLS terminator deployed in front of the service. The client
establishes a transport layer TLS connection with the middlebox (C->M establishes a transport layer TLS connection with the middlebox (C->M
TLS), the middlebox in turn opens a transport layer TLS connection TLS), the middlebox in turn opens a transport layer TLS connection
with the TLS terminator deployed in front of the service (M->T TLS). with the TLS terminator deployed in front of the service (M->T TLS).
The client can ignore any certificate validation errors when it The client can ignore any certificate validation errors when it
connects to the middlebox. HTTP messages are transported over this connects to the middlebox. HTTP messages are transported over this
layer between the client and the service. Finally, application layer layer between the client and the service. Finally, application layer
TLS messages are exchanged inside the HTTP message bodies in order to TLS messages are exchanged inside the HTTP message bodies in order to
establish an end-to-end TLS session between the client and the establish an end-to-end TLS session between the client and the
skipping to change at page 15, line 24 skipping to change at page 16, line 24
| TCP | | TCP | | TCP | | TCP | | TCP | | TCP |
+----------+ +----------+ +----------+ +----------+ +----------+ +----------+
+--------+ +-----------+ +----------------+ +---------+ +--------+ +-----------+ +----------------+ +---------+
| Client |----->| Middlebox |----->| TLS Terminator |---->| Service | | Client |----->| Middlebox |----->| TLS Terminator |---->| Service |
+--------+ +-----------+ +----------------+ +---------+ +--------+ +-----------+ +----------------+ +---------+
^ ^ ^ ^
| | | |
+-------------Client to Service ATLS Connection-------------+ +-------------Client to Service ATLS Connection-------------+
Figure 8: HTTP Middlebox Network Architecture Figure 9: HTTP Middlebox Network Architecture
7. Key Exporting and Application Data Encryption 7. Key Exporting and Application Data Encryption
When solutions implement the architecture described in Figure 6, they When solutions implement the architecture described in Figure 6, they
leverage [RFC5705] for key exporting from the ATLS session. The leverage [RFC5705] for exporting keys. When the OSCORE mode has been
client and service then use the exported keys to derive shared agreed using the "oscore_connection_id" extension defined in this
encryption keys. The encryption keys are then used with a suitable document, different keys are used for ordinary DTLS/TLS record
cipher suite to encrypt application data for exchange with the peer. protection and OSCORE packet protection. These keys are produced
using a TLS exporter [RFC5705] and the exporter takes three input
values:
7.1. Key Exporter Label o a disambiguating label string,
A new TLS Exporter Label is defined for ATLS key exporting. Its o a per-association context value provided by the application using
value is: the exporter, and
TLS Exporter Label: application-layer-tls o a length value.
7.2. Cipher Suite Selection The label string for use with this specification is defined as
'application-layer-tls'. The per-association context value is empty.
Application layer encryption performed outside the context of the The length value is twice the size of the key size utilized by the
ATLS session using exported keys should use the cipher suite negotiated algorithm since the lower-half is used for the Master
negotiated during ATLS session establishment. Secret and the upper-half is used for the Master Salt.
7.3. Key Derivation For example, if a TLS/DTLS 1.2 handshake negotiated the
TLS_PSK_WITH_AES_128_CCM_8 ciphersuite then the key size utilized by
the negotiated algorithm, i.e. AES 128, is 128 bit. Hence, the key
extractor is requested to produce 2 x 128 bit keying material.
[RFC5705] key exporting functions allow specification of the number The following parameters are needed for use with OSCORE:
of bytes of keying material that should be exported from the TLS
session. The application should export the exact number of bytes
required to generate the necessary client and server cipher suite
encryption key and IV values.
[[TODO]] Maybe need to reference the relevant sections from o Master Secret: The master secret is described as described above.
https://tools.ietf.org/html/draft-ietf-tls-tls13-23#section-7 and
https://tools.ietf.org/html/rfc5246#section-6.3. o Sender ID: This values is negotiated using the
"oscore_connection_id" extension, as described in Section 11.
o Recipient ID: This values is negotiated using the
"oscore_connection_id" extension, as described in Section 11.
o AEAD Algorithm: This value is negotiated using the ciphersuite
exchange provided by the TLS/DTLS handshake. For example, if a
TLS/DTLS 1.2 handshake negotiated the TLS_PSK_WITH_AES_128_CCM_8
ciphersuite then AEAD algorithm identifier is AES_128_CCM_8, which
corresponds to COSE algorithms AES-CCM-64-64-128 or AES-CCM-
16-64-128, whereby the former uses a 7-byte nonce and the later
13-byte nonce. Since in TLS/DTLS the nonce value is not
negotiated but rather fixed, a 7-byte nonce value is assumed as a
default in this document.
o Master Salt: The master salt is described as described above.
o HKDF Algorithm: This value is negotiated using the ciphersuite
exchange provided by the TLS/DTLS handshake. As a default,
SHA-256 is assumed as a HKDF algorithm.
o Replay Window: A default window size of 32 packets is assumed.
A future version of this specification will describe how to establish
keying material and parameters for security contexts other than
OSCORE.
8. ATLS Session Establishment 8. ATLS Session Establishment
Figure 9 illustrates how an ATLS session is established using the key Figure 10 illustrates how an ATLS session is established using the
exporting architectural model shown in Figure 6. The outline is as key exporting architectural model shown in Figure 6. The number of
follows: RTTs that take place when establishing a TLS session depends on the
version of TLS and what capabilities are enabled on the TLS software
stack. For example, a 0-RTT exchange is possible with TLS 1.3. If
applications wish to ensure a predictable number of RTTs when
establishing an application layer TLS connection, this may be
achieved by configuring the TLS software stack appropriately.
The outline is as follows:
o the client creates an ATLS session object o the client creates an ATLS session object
o the client initiates a TLS handshake on the session o the client initiates a TLS handshake on the session
o the client extracts the TLS records for the first TLS flight (the o the client extracts the TLS records for the first TLS flight (the
first RTT) first RTT)
o the client sends the TLS records over the transport layer to the o the client sends the TLS records over the transport layer to the
server server
skipping to change at page 16, line 51 skipping to change at page 18, line 39
o the client and server repeat the above process and complete the o the client and server repeat the above process and complete the
second RTT second RTT
o once the ATLS session is up, both sides export keying material o once the ATLS session is up, both sides export keying material
o both sides now can exchange data encrypted using shared keys o both sides now can exchange data encrypted using shared keys
derived from the keying material derived from the keying material
+-------------------------------+ +-------------------------------+ +-------------------------------+ +-------------------------------+
| Client | | ATLS Server | | Client | | ATLS Server |
+---------+---+-----+---+-------+ +-------+---+-----+---+---------+ +---------+---+-----+-+---------+ +---------+--+-----+--+---------+
| ATLS | | App | |Transport| |Transport| | App | | ATLS | | ATLS | | App | |Transport| |Transport| | App | | ATLS |
| Session | +-----+ | Stack | | Stack | +-----+ | Session | | Session | +-----+ | Stack | | Stack | +-----+ | Session |
+---------+ | +---------+ +---------+ | +---------+ +---------+ | +---------+ +---------+ | +---------+
| | | | | | | | | | | |
| | | | | | | | | | | |
| | | | | | | | | | | |
| Create | | | | | | Create | | | | |
| Session | | | | | | Session | | | | |
+ |<---------| | | | | + |<---------| | | | |
| | Start | | | | | | | Start | | | | |
| | Handshake| | | | | | | Handshake| | | | |
| |<---------| | | | | | |<---------| | | | |
skipping to change at page 17, line 51 skipping to change at page 19, line 38
| | | | | Records | | | | | | Records |
2 |<---------|<--------|<------------|<---------|<---------| 2 |<---------|<--------|<------------|<---------|<---------|
| Session | | | | | | Session | | | | |
| | Up | | | | | | | Up | | | | |
+ |--------->| | | | | + |--------->| | | | |
| Export | | | | Export | | Export | | | | Export |
| Keys | | | | Keys | | Keys | | | | Keys |
|--------->| | E2E Session | |<---------| |--------->| | E2E Session | |<---------|
| |<--------|-------------|--------->| | | |<--------|-------------|--------->| |
Figure 9: ATLS Session Establishment Figure 10: ATLS Session Establishment
9. ATLS over HTTP Transport 9. ATLS over HTTP Transport
The assumption is that the client will establish a transport layer The assumption is that the client will establish a transport layer
connection to the server for exchange of HTTP messages. The connection to the server for exchange of HTTP messages. The
underlying transport layer connection could be over TCP or TLS. The underlying transport layer connection could be over TCP or TLS. The
client will then establish an application layer TLS connection with client will then establish an application layer TLS connection with
the server by exchanging TLS records with the server inside HTTP the server by exchanging TLS records with the server inside HTTP
message request and response bodies. message request and response bodies.
skipping to change at page 18, line 28 skipping to change at page 20, line 19
from the TLS stack and inserts them directly into HTTP message from the TLS stack and inserts them directly into HTTP message
bodies. Each message body contains a full TLS flight, which may bodies. Each message body contains a full TLS flight, which may
contain multiple TLS records. contain multiple TLS records.
The client sends all ATLS records to the server in the bodies of POST The client sends all ATLS records to the server in the bodies of POST
requests. requests.
The server sends all ATLS records to the client in the bodies of 200 The server sends all ATLS records to the client in the bodies of 200
OK responses to the POST requests. OK responses to the POST requests.
The URI path used by ATLS is "/.well-known/atls".
9.2. Content-Type Header 9.2. Content-Type Header
A new Content-Type header value is defined: A new Content-Type header value is defined:
Content-type: application/atls+octet-stream Content-type: application/atls
All message bodies containing ATLS records must set this Content- All message bodies containing ATLS records must set this Content-
Type. This enables middleboxes to readily identify ATLS payloads. Type. This enables middleboxes to readily identify ATLS payloads.
9.3. HTTP Status Codes 9.3. HTTP Status Codes
This document does not define any new HTTP status codes, and does not This document does not define any new HTTP status codes, and does not
specify additional semantics or refine existing semantics for status specify additional semantics or refine existing semantics for status
codes. This is the best current practice as outlined in codes. This is the best current practice as outlined in
[I-D.ietf-httpbis-bcp56bis]. [I-D.ietf-httpbis-bcp56bis].
skipping to change at page 19, line 11 skipping to change at page 20, line 51
HTTP message bodies with the appropriate TLS session. The HTTP message bodies with the appropriate TLS session. The
application service should use stateful cookies [RFC6265] in order to application service should use stateful cookies [RFC6265] in order to
achieve this as recommended in [I-D.ietf-httpbis-bcp56bis]. achieve this as recommended in [I-D.ietf-httpbis-bcp56bis].
9.5. Session Establishment and Key Exporting 9.5. Session Establishment and Key Exporting
It is recommended that applications using ATLS over HTTP transport It is recommended that applications using ATLS over HTTP transport
only use ATLS for session establishment and key exchange, resulting only use ATLS for session establishment and key exchange, resulting
in only 2 ATLS RTTs between the client and the application service. in only 2 ATLS RTTs between the client and the application service.
Key exporting must be carried out as described in Section 7.3. Key exporting must be carried out as described in Section 7.
9.6. Application Data Encryption
[editors note: I am on the fence about using [RFC8188] as this
hardcodes the ciphersuite to aes128gcm. It would be nice to use the
cipher suite negotiated as part of ATLS session establishment. ]
9.7. Illustrative ATLS over HTTP Session Establishment 9.6. Illustrative ATLS over HTTP Session Establishment
A client initiates an ATLS session by sending the first TLS flight in A client initiates an ATLS session by sending the first TLS flight in
a POST request message body to the ATLS server. a POST request message body to the ATLS server.
POST /atls POST /.well-known/atls
Content-Type: application/atls+octet-stream Content-Type: application/atls
<binary TLS client flight 1 records> <binary TLS client flight 1 records>
The server handles the request, creates an ATLS session object, and The server handles the request, creates an ATLS session object, and
replies by including its first TLS flight in a 200 OK message body. replies by including its first TLS flight in a 200 OK message body.
The server also sets a suitable cookie for session tracking purposes. The server also sets a suitable cookie for session tracking purposes.
200 OK 200 OK
Content-Type: application/atls+octet-stream Content-Type: application/atls
Set-Cookie: my-atls-cookie=my-cookie-value Set-Cookie: my-atls-cookie=my-cookie-value
<binary TLS server flight 1 records> <binary TLS server flight 1 records>
The client handles the server first flight TLS records and replies The client handles the server first flight TLS records and replies
with its second flight. with its second flight.
POST /atls POST /.well-known/atls
Content-Type: application/atls+octet-stream Content-Type: application/atls
Cookie: my-atls-cookie=my-cookie-value Cookie: my-atls-cookie=my-cookie-value
<binary TLS client flight 2 records> <binary TLS client flight 2 records>
The server handles the second flight, establishes the ATLS session, The server handles the second flight, establishes the ATLS session,
and replies with its second flight. and replies with its second flight.
200 OK 200 OK
Content-Type: application/atls+octet-stream Content-Type: application/atls
<binary TLS server flight 2 records> <binary TLS server flight 2 records>
9.8. ATLS and HTTP CONNECT 9.7. ATLS and HTTP CONNECT
It is worthwhile comparing and contrasting ATLS with HTTP CONNECT It is worthwhile comparing and contrasting ATLS with HTTP CONNECT
tunneling. tunneling.
First, let us introduce some terminology: First, let us introduce some terminology:
o HTTP Proxy: A HTTP Proxy operates at the application layer, o HTTP Proxy: A HTTP Proxy operates at the application layer,
handles HTTP CONNECT messages from clients, and opens tunnels to handles HTTP CONNECT messages from clients, and opens tunnels to
remote origin servers on behalf of clients. If a client remote origin servers on behalf of clients. If a client
establishes a tunneled TLS connection to the origin server, the establishes a tunneled TLS connection to the origin server, the
skipping to change at page 20, line 39 skipping to change at page 22, line 22
Certificate Authority is installed in the client's trust store. Certificate Authority is installed in the client's trust store.
HTTP Proxies and middleboxes are logically separate entities and one HTTP Proxies and middleboxes are logically separate entities and one
or both of these may be deployed in a network. or both of these may be deployed in a network.
HTTP CONNECT is used by clients to instruct a HTTP Forward Proxy HTTP CONNECT is used by clients to instruct a HTTP Forward Proxy
deployed in the local domain to open up a tunnel to a remote origin deployed in the local domain to open up a tunnel to a remote origin
server that is typically deployed in a different domain. Assuming server that is typically deployed in a different domain. Assuming
that TLS transport is used between both client and proxy, and proxy that TLS transport is used between both client and proxy, and proxy
and origin server, the network architecture is as illustrated in and origin server, the network architecture is as illustrated in
Figure 10. Once the proxy opens the transport tunnel to the service, Figure 11. Once the proxy opens the transport tunnel to the service,
the client establishes an end-to-end TLS session with the service, the client establishes an end-to-end TLS session with the service,
and the proxy is blindly transporting TLS records (the C->S TLS and the proxy is blindly transporting TLS records (the C->S TLS
session records) between the client and the service. From the client session records) between the client and the service. From the client
perspective, it is tunneling a TLS session to the service inside the perspective, it is tunneling a TLS session to the service inside the
TLS session it has established to the proxy (the C->P TLS session). TLS session it has established to the proxy (the C->P TLS session).
No middlebox is attempting to intercept or inspect the HTTP messages No middlebox is attempting to intercept or inspect the HTTP messages
between the client and the service. between the client and the service.
+----------+ +----------+ +----------+ +----------+
| C->S HTTP| | C->S HTTP| | C->S HTTP| | C->S HTTP|
skipping to change at page 21, line 19 skipping to change at page 22, line 45
+----------+ +----------+ +----------+ +----------+
| C->P TLS | | P->S TCP | | C->P TLS | | P->S TCP |
+----------+ +----------+ +----------+ +----------+
| C->P TCP | | C->P TCP |
+----------+ +----------+
+--------+ +------------+ +---------+ +--------+ +------------+ +---------+
| Client |----->| HTTP Proxy |----->| Service | | Client |----->| HTTP Proxy |----->| Service |
+--------+ +------------+ +---------+ +--------+ +------------+ +---------+
Figure 10: HTTP Proxy transport layers Figure 11: HTTP Proxy transport layers
A more complex network topology where the network operator has both a A more complex network topology where the network operator has both a
HTTP Proxy and a middlebox deployed is illustrated in Figure 11. In HTTP Proxy and a middlebox deployed is illustrated in Figure 12. In
this scenario, the proxy has tunneled the TLS session from the client this scenario, the proxy has tunneled the TLS session from the client
towards the origin server, however the middlebox is intercepting and towards the origin server, however the middlebox is intercepting and
terminating this TLS session. A TLS session is established between terminating this TLS session. A TLS session is established between
the client and the middlebox (C->M TLS), and not end-to-end between the client and the middlebox (C->M TLS), and not end-to-end between
the client and the server. It can clearly be seen that HTTP CONNECT the client and the server. It can clearly be seen that HTTP CONNECT
and HTTP Proxies serve completely different functions than and HTTP Proxies serve completely different functions than
middleboxes. middleboxes.
Additionally, the fact that the TLS session is established between Additionally, the fact that the TLS session is established between
the client and the middlebox can be problematic for two reasons: the client and the middlebox can be problematic for two reasons:
skipping to change at page 22, line 19 skipping to change at page 23, line 34
+----------+ +----------+ +----------+ +----------+ +----------+ +----------+
| C->P TLS | | P->M TCP | | M->S TCP | | C->P TLS | | P->M TCP | | M->S TCP |
+----------+ +----------+ +----------+ +----------+ +----------+ +----------+
| C->P TCP | | C->P TCP |
+----------+ +----------+
+--------+ +------------+ +-----------+ +---------+ +--------+ +------------+ +-----------+ +---------+
| Client |----->| HTTP Proxy |----->| Middlebox |----->| Service | | Client |----->| HTTP Proxy |----->| Middlebox |----->| Service |
+--------+ +------------+ +-----------+ +---------+ +--------+ +------------+ +-----------+ +---------+
Figure 11: HTTP Proxy and middlebox transport layers Figure 12: HTTP Proxy and middlebox transport layers
As HTTP CONNECT can be used to establish a tunneled TLS connection, As HTTP CONNECT can be used to establish a tunneled TLS connection,
one hypothetical solution to this middlebox issue is for the client one hypothetical solution to this middlebox issue is for the client
to issue a HTTP CONNECT command to a HTTP Reverse Proxy deployed in to issue a HTTP CONNECT command to a HTTP Reverse Proxy deployed in
front of the origin server. This solution is not practical for front of the origin server. This solution is not practical for
several reasons: several reasons:
o if there is a local domain HTTP Forward Proxy deployed, this would o if there is a local domain HTTP Forward Proxy deployed, this would
result in the client doing a first HTTP CONNECT to get past the result in the client doing a first HTTP CONNECT to get past the
Forward Proxy, and then a second HTTP CONNECT to get past the Forward Proxy, and then a second HTTP CONNECT to get past the
skipping to change at page 23, line 26 skipping to change at page 24, line 42
in encrypted traffic traversing the middlebox that the middlebox in encrypted traffic traversing the middlebox that the middlebox
cannot intercept and inspect. That is ultimately what ATLS results cannot intercept and inspect. That is ultimately what ATLS results
in - traffic traversing the middle box that the middlebox cannot in - traffic traversing the middle box that the middlebox cannot
intercept and inspect. Therefore, from a middlebox perspective, the intercept and inspect. Therefore, from a middlebox perspective, the
differences between the two solutions are in the areas of solution differences between the two solutions are in the areas of solution
complexity and protocol semantics. It is clear that ATLS is a complexity and protocol semantics. It is clear that ATLS is a
simpler, more elegant solution that HTTP CONNECT. simpler, more elegant solution that HTTP CONNECT.
10. ATLS over CoAP Transport 10. ATLS over CoAP Transport
[ todo: Help needed Hannes ] To carry TLS messages over CoAP it is recommended to use Confirmable
messages while DTLS payloads may as well use non-confirmable
messages. The exchange pattern in CoAP uses the following style: A
request from the CoAP client to the CoAP server uses a POST with the
ATLS message contained in the payload of the request. An ATLS
response is returned by the CoAP server to the CoAP client in a 2.04
(Changed) message.
11. RTT Considerations When DTLS messages are conveyed in CoAP over UDP then the DDoS
protection offered by DTLS MAY be used instead of replicating the
functionality at the CoAP layer. If TLS is conveyed in CoAP over UDP
then DDoS protection by CoAP has to be utilized. Carrying ATLS
messages in CoAP over TCP does not require any additional DDoS
protection.
The number of RTTs that take place when establishing a TLS session The URI path used by ATLS is "/.well-known/atls".
depends on the version of TLS and what capabilities are enabled on
the TLS software stack. For example, a 0-RTT exchange is possible
with TLS1.3.
If applications wish to ensure a predictable number of RTTs when {{coap-example} shows a TLS 1.3 handshake inside CoAP graphically.
establishing an application layer TLS connection, this may be
achieved by configuring the TLS software stack appropriately. Client Server
Relevant configuration parameters for OpenSSL and Java SunJSSE stacks | |
are outlined in the appendix. +--------->| Header: POST (Code=0.02)
| POST | Uri-Path: "/.well-known/atls"
| | Content-Format: application/atls
| | Payload: ATLS (ClientHello)
| |
|<---------+ Header: 2.04 Changed
| 2.04 | Content-Format: application/atls
| | Payload: ATLS (ServerHello,
| | {EncryptedExtensions}, {CertificateRequest*}
| | {Certificate*}, {CertificateVerify*} {Finished})
| |
+--------->| Header: POST (Code=0.02)
| POST | Uri-Path: "/.well-known/atls"
| | Content-Format: application/atls
| | Payload: ATLS ({Certificate*},
| | {CertificateVerify*}, {Finished})
| |
|<---------+ Header: 2.04 Changed
| 2.04 |
| |
Figure 13: Transferring ATLS in CoAP
Note that application data can already be sent by the server in the
second message and by the client in the third message, in case of the
full TLS 1.3 handshake. In case of the 0-RTT handshake application
data can be sent earlier. To mix different media types in the same
CoAP payload the application/multipart-core content type is used.
Note also that CoAP blockwise transfer MAY be used if the payload
size, for example due to the size of the certificate chain, exceeds
the MTU size.
11. The "oscore_connection_id" Extension
This document defines the "oscore_connection_id" extension, which is
used in ClientHello and ServerHello messages. It is used only for
establishing the client's OSCORE Sender ID and the server's OSCORE
Sender ID. The client's OSCORE Sender ID maps to the CID provided by
the server in the ServerHello and the server's OSCORE Sender ID maps
to the CID provided by the client in the ClientHello.
The negotiation mechanism follows the procedure used in
[I-D.ietf-tls-dtls-connection-id] with the exception that the
negotiated CIDs agreed with the "oscore_connection_id" extension is
only used with OSCORE and does not impact the record layer format of
the DTLS/TLS payloads nor the MAC calculation used by DTLS/TLS. As
such, this extension can be used with DTLS as well as with TLS when
those protocols are used at the application layer.
The extension type is specified as follows.
enum { oscore_connection_id(TBD), (65535) } ExtensionType;
struct { opaque cid<0..2^8-1>; } ConnectionId;
Note: This extension allows a client and a server to determine
whether an OSCORE security context should be established.
A future version of this specification may extend the negotiation
capabilities.
12. IANA Considerations 12. IANA Considerations
[[ TODO - New Content-Type and TLS Exporter Label must be registered. 12.1. "oscore_connection_id" TLS extension
]]
IANA is requested to allocate an entry to the existing TLS
"ExtensionType Values" registry, defined in [RFC5246], for
oscore_connection_id(TBD) defined in this document.
12.2. .well-known URI Registry
IANA is requested to add the well-known URI 'atls' to the Well-Known
URIs registry.
o URI suffix: atls
o Change controller: IETF
o Specification document(s): [[this document]]
o Related information: None
12.3. Media Types Registry
IANA is requested to add the media type 'application/atls' to the
Media Types registry.
o Type name: application
o Subtype name: atls
o Required parameters: N/A
o Optional parameters: N/A
o Encoding considerations: binary
o Security considerations: See Security Considerations section of
this document.
o Interoperability considerations: N/A
o Published specification: [[this document]] (this document)
o Applications that use this media type: Potentially any
o Fragment identifier considerations: N/A
o Additional information:
* Magic number(s): N/A
* File extension(s): N/A
* Macintosh file type code(s): N/A
o Person & email address to contact for further information: See
"Authors' Addresses" section.
o Intended usage: COMMON
o Restrictions on usage: N/A
o Author: See "Authors' Addresses" section.
o Change Controller: IESG
12.4. HTTP Content-Formats Registry
IANA is requested to add the media type 'application/atls' to the
HTTP Content-Formats registry.
o Media Type: application/atls
o Encoding: binary
o ID: TBD
o Reference: [[this document]]
12.5. CoAP Content-Formats Registry
IANA is requested to add the media type 'application/atls' to the
CoAP Content-Formats registry.
o Media Type: application/atls
o Encoding: binary
o ID: TBD
o Reference: [[this document]]
12.6. TLS Key Extractor Label
IANA is requested to register the "application-layer-tls" label in
the TLS Extractor Label Registry to correspond to this specification.
13. Security Considerations 13. Security Considerations
[[ TODO ]] This specification re-uses the TLS and DTLS and hence the security
considerations of the respective TLS/DTLS version applies. As
described in Section 6.2, implementers need to take the policy
configuration into account when applying security protection at
various layers of the stack even if the same protocol is used since
the communiation endpoints and the security requirements are likely
going to vary.
For use in the IoT environment the considerations described in
[RFC7925] apply and other environments the guidelines in [RFC7525]
are applicable.
14. Informative References 14. Informative References
[ALTS] Google, "Application Layer Transport Security", December [ALTS] Google, "Application Layer Transport Security", December
2017, <https://cloud.google.com/security/encryption-in- 2017, <https://cloud.google.com/security/encryption-in-
transit/application-layer-transport-security/>. transit/application-layer-transport-security/>.
[Bluetooth] [Bluetooth]
Bluetooth, "Bluetooth Core Specification v5.0", 2016, Bluetooth, "Bluetooth Core Specification v5.0", 2016,
<https://www.bluetooth.com/>. <https://www.bluetooth.com/>.
[I-D.hartke-core-e2e-security-reqs]
Selander, G., Palombini, F., and K. Hartke, "Requirements
for CoAP End-To-End Security", draft-hartke-core-e2e-
security-reqs-03 (work in progress), July 2017.
[I-D.ietf-anima-bootstrapping-keyinfra] [I-D.ietf-anima-bootstrapping-keyinfra]
Pritikin, M., Richardson, M., Behringer, M., Bjarnason, Pritikin, M., Richardson, M., Behringer, M., Bjarnason,
S., and K. Watsen, "Bootstrapping Remote Secure Key S., and K. Watsen, "Bootstrapping Remote Secure Key
Infrastructures (BRSKI)", draft-ietf-anima-bootstrapping- Infrastructures (BRSKI)", draft-ietf-anima-bootstrapping-
keyinfra-16 (work in progress), June 2018. keyinfra-19 (work in progress), March 2019.
[I-D.ietf-core-object-security] [I-D.ietf-core-object-security]
Selander, G., Mattsson, J., Palombini, F., and L. Seitz, Selander, G., Mattsson, J., Palombini, F., and L. Seitz,
"Object Security for Constrained RESTful Environments "Object Security for Constrained RESTful Environments
(OSCORE)", draft-ietf-core-object-security-14 (work in (OSCORE)", draft-ietf-core-object-security-16 (work in
progress), July 2018. progress), March 2019.
[I-D.ietf-httpbis-bcp56bis] [I-D.ietf-httpbis-bcp56bis]
Nottingham, M., "Building Protocols with HTTP", draft- Nottingham, M., "Building Protocols with HTTP", draft-
ietf-httpbis-bcp56bis-06 (work in progress), July 2018. ietf-httpbis-bcp56bis-08 (work in progress), November
2018.
[I-D.ietf-tls-dtls-connection-id]
Rescorla, E., Tschofenig, H., and T. Fossati, "Connection
Identifiers for DTLS 1.2", draft-ietf-tls-dtls-connection-
id-04 (work in progress), March 2019.
[I-D.ietf-tls-dtls13] [I-D.ietf-tls-dtls13]
Rescorla, E., Tschofenig, H., and N. Modadugu, "The Rescorla, E., Tschofenig, H., and N. Modadugu, "The
Datagram Transport Layer Security (DTLS) Protocol Version Datagram Transport Layer Security (DTLS) Protocol Version
1.3", draft-ietf-tls-dtls13-28 (work in progress), July 1.3", draft-ietf-tls-dtls13-30 (work in progress),
2018. November 2018.
[I-D.ietf-tls-tls13] [I-D.ietf-tls-tls13]
Rescorla, E., "The Transport Layer Security (TLS) Protocol Rescorla, E., "The Transport Layer Security (TLS) Protocol
Version 1.3", draft-ietf-tls-tls13-28 (work in progress), Version 1.3", draft-ietf-tls-tls13-28 (work in progress),
March 2018. March 2018.
[I-D.mattsson-core-security-overhead] [I-D.mattsson-core-security-overhead]
Mattsson, J., "Message Size Overhead of CoAP Security Mattsson, J., "Message Size Overhead of CoAP Security
Protocols", draft-mattsson-core-security-overhead-02 (work Protocols", draft-mattsson-core-security-overhead-02 (work
in progress), November 2017. in progress), November 2017.
[I-D.selander-ace-cose-ecdhe] [I-D.selander-ace-cose-ecdhe]
Selander, G., Mattsson, J., and F. Palombini, "Ephemeral Selander, G., Mattsson, J., and F. Palombini, "Ephemeral
Diffie-Hellman Over COSE (EDHOC)", draft-selander-ace- Diffie-Hellman Over COSE (EDHOC)", draft-selander-ace-
cose-ecdhe-09 (work in progress), July 2018. cose-ecdhe-12 (work in progress), February 2019.
[LwM2M] Open Mobile Alliance, "Lightweight Machine to Machine [LwM2M] Open Mobile Alliance, "Lightweight Machine to Machine
Requirements", December 2017, Requirements", December 2017,
<http://www.openmobilealliance.org/>. <http://www.openmobilealliance.org/>.
[Noise] Perrin, T., "Noise Protocol Framework", October 2017, [Noise] Perrin, T., "Noise Protocol Framework", October 2017,
<http://noiseprotocol.org/>. <http://noiseprotocol.org/>.
[Norrell] Norrell, ., "Use SSL/TLS within a different protocol with [Norrell] Norrell, ., "Use SSL/TLS within a different protocol with
BIO pairs", 2016, BIO pairs", 2016,
<https://thekerneldiaries.com/2016/06/13/ <https://thekerneldiaries.com/2016/06/13/
openssl-ssltls-within-a-different-protocol/>. openssl-ssltls-within-a-different-protocol/>.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008,
<https://www.rfc-editor.org/info/rfc5246>. <https://www.rfc-editor.org/info/rfc5246>.
[RFC5705] Rescorla, E., "Keying Material Exporters for Transport [RFC5705] Rescorla, E., "Keying Material Exporters for Transport
Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705,
March 2010, <https://www.rfc-editor.org/info/rfc5705>. March 2010, <https://www.rfc-editor.org/info/rfc5705>.
[RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265,
skipping to change at page 25, line 44 skipping to change at page 31, line 5
[RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC6347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347, Security Version 1.2", RFC 6347, DOI 10.17487/RFC6347,
January 2012, <https://www.rfc-editor.org/info/rfc6347>. January 2012, <https://www.rfc-editor.org/info/rfc6347>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer [RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing", Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014, RFC 7230, DOI 10.17487/RFC7230, June 2014,
<https://www.rfc-editor.org/info/rfc7230>. <https://www.rfc-editor.org/info/rfc7230>.
[RFC7252] Shelby, Z., Hartke, K., and C. Bormann, "The Constrained [RFC7525] Sheffer, Y., Holz, R., and P. Saint-Andre,
Application Protocol (CoAP)", RFC 7252, "Recommendations for Secure Use of Transport Layer
DOI 10.17487/RFC7252, June 2014, Security (TLS) and Datagram Transport Layer Security
<https://www.rfc-editor.org/info/rfc7252>. (DTLS)", BCP 195, RFC 7525, DOI 10.17487/RFC7525, May
2015, <https://www.rfc-editor.org/info/rfc7525>.
[RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext [RFC7540] Belshe, M., Peon, R., and M. Thomson, Ed., "Hypertext
Transfer Protocol Version 2 (HTTP/2)", RFC 7540, Transfer Protocol Version 2 (HTTP/2)", RFC 7540,
DOI 10.17487/RFC7540, May 2015, DOI 10.17487/RFC7540, May 2015,
<https://www.rfc-editor.org/info/rfc7540>. <https://www.rfc-editor.org/info/rfc7540>.
[RFC8188] Thomson, M., "Encrypted Content-Encoding for HTTP", [RFC7925] Tschofenig, H., Ed. and T. Fossati, "Transport Layer
RFC 8188, DOI 10.17487/RFC8188, June 2017, Security (TLS) / Datagram Transport Layer Security (DTLS)
<https://www.rfc-editor.org/info/rfc8188>. Profiles for the Internet of Things", RFC 7925,
DOI 10.17487/RFC7925, July 2016,
<https://www.rfc-editor.org/info/rfc7925>.
[RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>.
[Signal] Open Whisper Systems, "Signal Protocol", 2016, [Signal] Open Whisper Systems, "Signal Protocol", 2016,
<https://signal.org/>. <https://signal.org/>.
[SSLEngine] [SSLEngine]
Oracle, "SSLEngineSimpleDemo.java", 2004, <https://docs.or Oracle, "SSLEngineSimpleDemo.java", 2004, <https://docs.or
acle.com/javase/7/docs/technotes/guides/security/jsse/samp acle.com/javase/7/docs/technotes/guides/security/jsse/samp
les/sslengine/SSLEngineSimpleDemo.java>. les/sslengine/SSLEngineSimpleDemo.java>.
[ZigBee] ZigBee Alliance, "ZigBee Specification", 2012, [ZigBee] ZigBee Alliance, "ZigBee Specification", 2012,
<http://www.zigbee.org>. <http://www.zigbee.org>.
Appendix A. TLS Software Stack Configuration Appendix A. Pseudo Code
[[ EDITOR'S NOTE: We could include details here on how TLS stack
configuration items control the number of round trips between the
client and server.
And just give two examples: OpenSSL and Java SunJSSE]]
Appendix B. Pseudo Code
This appendix gives both C and Java pseudo code illustrating how to This appendix gives both C and Java pseudo code illustrating how to
inject and extract raw TLS records from a TLS software stack. Please inject and extract raw TLS records from a TLS software stack. Please
not that this is illustrative, non-functional pseudo code that does not that this is illustrative, non-functional pseudo code that does
not compile. Functioning proof-of-concept code is available on the not compile. Functioning proof-of-concept code is available on the
following public repository [[ EDITOR'S NOTE: Add the URL here ]]. following public repository [[ EDITOR'S NOTE: Add the URL here ]].
B.1. OpenSSL A.1. OpenSSL
OpenSSL provides a set of Basic Input/Output (BIO) APIs that can be OpenSSL provides a set of Basic Input/Output (BIO) APIs that can be
used to build a custom transport layer for TLS connections. This used to build a custom transport layer for TLS connections. This
appendix gives pseudo code on how BIO APIs could be used to build a appendix gives pseudo code on how BIO APIs could be used to build a
client application that completes a TLS handshake and exchanges client application that completes a TLS handshake and exchanges
application data with a service. application data with a service.
char inbound[MAX]; char inbound[MAX];
char outbound[MAX]; char outbound[MAX];
int rx_bytes; int rx_bytes;
skipping to change at page 28, line 5 skipping to change at page 33, line 5
// Send a message to the server. Calling SSL_write() will run the // Send a message to the server. Calling SSL_write() will run the
// plaintext through the TLS session and write the encrypted TLS // plaintext through the TLS session and write the encrypted TLS
// records to the BIO buffer // records to the BIO buffer
SSL_write(ssl, "Hello World", strlen("Hello World")); SSL_write(ssl, "Hello World", strlen("Hello World"));
// Read the TLS records from the BIO buffer and // Read the TLS records from the BIO buffer and
// POST them to the server // POST them to the server
BIO_read(bio_out, outbound, MAX); BIO_read(bio_out, outbound, MAX);
num_bytes = postTlsRecords(outbound, inbound); num_bytes = postTlsRecords(outbound, inbound);
B.2. Java JSSE A.2. Java JSSE
The Java SSLEngine class "enables secure communications using The Java SSLEngine class "enables secure communications using
protocols such as the Secure Sockets Layer (SSL) or IETF RFC 2246 protocols such as the Secure Sockets Layer (SSL) or IETF RFC 2246
"Transport Layer Security" (TLS) protocols, but is transport "Transport Layer Security" (TLS) protocols, but is transport
independent". This pseudo code illustrates how a server could use independent". This pseudo code illustrates how a server could use
the SSLEngine class to handle an inbound client TLS flight and the SSLEngine class to handle an inbound client TLS flight and
generate an outbound server TLS flight response. generate an outbound server TLS flight response.
SSLEngine sslEngine = SSLContext.getDefault().createSSLEngine(); SSLEngine sslEngine = SSLContext.getDefault().createSSLEngine();
sslEngine.setUseClientMode(false); sslEngine.setUseClientMode(false);
skipping to change at page 30, line 5 skipping to change at page 35, line 5
if (res.getHandshakeStatus() == NEED_TASK) { if (res.getHandshakeStatus() == NEED_TASK) {
Runnable run = sslEngine.getDelegatedTask(); Runnable run = sslEngine.getDelegatedTask();
run.run(); run.run();
} }
} }
// outbound ByteBuffer now contains a complete server flight // outbound ByteBuffer now contains a complete server flight
// containing multiple TLS Records // containing multiple TLS Records
// Rinse and repeat! // Rinse and repeat!
Appendix C. Example ATLS Handshake Appendix B. Example ATLS Handshake
[[ EDITOR'S NOTE: For completeness, include a simple full TLS [[ EDITOR'S NOTE: For completeness, include a simple full TLS
handshake showing the raw binary flights, along with the HTTP handshake showing the raw binary flights, along with the HTTP
request/response/headers. And also the raw hex TLS records showing request/response/headers. And also the raw hex TLS records showing
protocol bits ]] protocol bits ]]
Authors' Addresses Authors' Addresses
Owen Friel Owen Friel
Cisco Cisco
 End of changes. 67 change blocks. 
162 lines changed or deleted 415 lines changed or added

This html diff was produced by rfcdiff 1.48. The latest version is available from http://tools.ietf.org/tools/rfcdiff/