1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445
|
<pre>Network Working Group S. Hollenbeck
Request for Comments: 3749 VeriSign, Inc.
Category: Standards Track May 2004
<span class="h1">Transport Layer Security Protocol Compression Methods</span>
Status of this Memo
This document specifies an Internet standards track protocol for the
Internet community, and requests discussion and suggestions for
improvements. Please refer to the current edition of the "Internet
Official Protocol Standards" (STD 1) for the standardization state
and status of this protocol. Distribution of this memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2004). All Rights Reserved.
Abstract
The Transport Layer Security (TLS) protocol (<a href="./rfc2246">RFC 2246</a>) includes
features to negotiate selection of a lossless data compression method
as part of the TLS Handshake Protocol and to then apply the algorithm
associated with the selected method as part of the TLS Record
Protocol. TLS defines one standard compression method which
specifies that data exchanged via the record protocol will not be
compressed. This document describes an additional compression method
associated with a lossless data compression algorithm for use with
TLS, and it describes a method for the specification of additional
TLS compression methods.
Table of Contents
<a href="#section-1">1</a>. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Compression Methods . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2.1">2.1</a>. DEFLATE Compression. . . . . . . . . . . . . . . . . . . <a href="#page-3">3</a>
<a href="#section-3">3</a>. Compression History and Packet Processing . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-4">4</a>. Internationalization Considerations . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-5">5</a>. IANA Considerations . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-6">6</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-5">5</a>
<a href="#section-7">7</a>. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-8">8</a>. References . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-8.1">8.1</a>. Normative References . . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-8.2">8.2</a>. Informative References . . . . . . . . . . . . . . . . . <a href="#page-6">6</a>
Author's Address . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
Full Copyright Statement . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<span class="grey">Hollenbeck Standards Track [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc3749">RFC 3749</a> TLS Compression Methods May 2004</span>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
The Transport Layer Security (TLS) protocol (<a href="./rfc2246">RFC 2246</a>, [<a href="#ref-2" title=""The TLS Protocol Version 1.0"">2</a>]) includes
features to negotiate selection of a lossless data compression method
as part of the TLS Handshake Protocol and to then apply the algorithm
associated with the selected method as part of the TLS Record
Protocol. TLS defines one standard compression method,
CompressionMethod.null, which specifies that data exchanged via the
record protocol will not be compressed. While this single
compression method helps ensure that TLS implementations are
interoperable, the lack of additional standard compression methods
has limited the ability of implementers to develop interoperable
implementations that include data compression.
TLS is used extensively to secure client-server connections on the
World Wide Web. While these connections can often be characterized
as short-lived and exchanging relatively small amounts of data, TLS
is also being used in environments where connections can be long-
lived and the amount of data exchanged can extend into thousands or
millions of octets. XML [<a href="#ref-4" title=""Extensible Markup Language (XML) 1.0 (2nd ed)"">4</a>], for example, is increasingly being used
as a data representation method on the Internet, and XML tends to be
verbose. Compression within TLS is one way to help reduce the
bandwidth and latency requirements associated with exchanging large
amounts of data while preserving the security services provided by
TLS.
This document describes an additional compression method associated
with a lossless data compression algorithm for use with TLS.
Standardization of the compressed data formats and compression
algorithms associated with this compression method is beyond the
scope of this document.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <a href="./rfc2119">RFC 2119</a> [<a href="#ref-1" title=""Key words for use in RFCs to Indicate Requirement Levels"">1</a>].
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Compression Methods</span>
TLS [<a href="#ref-2" title=""The TLS Protocol Version 1.0"">2</a>] includes the following compression method structure in
sections <a href="#section-6.1">6.1</a> and <a href="#section-7.4.1.2">7.4.1.2</a> and Appendix sections A.4.1 and A.6:
enum { null(0), (255) } CompressionMethod;
<span class="grey">Hollenbeck Standards Track [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc3749">RFC 3749</a> TLS Compression Methods May 2004</span>
which allows for later specification of up to 256 different
compression methods. This definition is updated to segregate the
range of allowable values into three zones:
1. Values from 0 (zero) through 63 decimal (0x3F) inclusive are
reserved for IETF Standards Track protocols.
2. Values from 64 decimal (0x40) through 223 decimal (0xDF) inclusive
are reserved for assignment for non-Standards Track methods.
3. Values from 224 decimal (0xE0) through 255 decimal (0xFF)
inclusive are reserved for private use.
Additional information describing the role of the IANA in the
allocation of compression method identifiers is described in <a href="#section-5">Section</a>
<a href="#section-5">5</a>.
In addition, this definition is updated to include assignment of an
identifier for the DEFLATE compression method:
enum { null(0), DEFLATE(1), (255) } CompressionMethod;
As described in <a href="./rfc2246#section-6">section 6 of RFC 2246</a> [<a href="#ref-2" title=""The TLS Protocol Version 1.0"">2</a>], TLS is a stateful
protocol. Compression methods used with TLS can be either stateful
(the compressor maintains its state through all compressed records)
or stateless (the compressor compresses each record independently),
but there seems to be little known benefit in using a stateless
compression method within TLS.
The DEFLATE compression method described in this document is
stateful. It is RECOMMENDED that other compression methods that
might be standardized in the future be stateful as well.
Compression algorithms can occasionally expand, rather than compress,
input data. A compression method that exceeds the expansion limits
described in <a href="./rfc2246#section-6.2.2">section 6.2.2 of RFC 2246</a> [<a href="#ref-2" title=""The TLS Protocol Version 1.0"">2</a>] MUST NOT be used with TLS.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. DEFLATE Compression</span>
The DEFLATE compression method and encoding format is described in
<a href="./rfc1951">RFC 1951</a> [<a href="#ref-5" title=""DEFLATE Compressed Data Format Specification version 1.3"">5</a>]. Examples of DEFLATE use in IETF protocols can be found
in <a href="./rfc1979">RFC 1979</a> [<a href="#ref-6" title=""PPP Deflate Protocol"">6</a>], <a href="./rfc2394">RFC 2394</a> [<a href="#ref-7" title=""IP Payload Compression Using DEFLATE"">7</a>], and <a href="./rfc3274">RFC 3274</a> [<a href="#ref-8" title=""Compressed Data Content Type for Cryptographic Message Syntax (CMS)"">8</a>].
DEFLATE allows the sending compressor to select from among several
options to provide varying compression ratios, processing speeds, and
memory requirements. The receiving decompressor MUST automatically
adjust to the parameters selected by the sender. All data that was
submitted for compression MUST be included in the compressed output,
<span class="grey">Hollenbeck Standards Track [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc3749">RFC 3749</a> TLS Compression Methods May 2004</span>
with no data retained to be included in a later output payload.
Flushing ensures that each compressed packet payload can be
decompressed completely.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Compression History and Packet Processing</span>
Some compression methods have the ability to maintain state/history
information when compressing and decompressing packet payloads. The
compression history allows a higher compression ratio to be achieved
on a stream as compared to per-packet compression, but maintaining a
history across packets implies that a packet might contain data
needed to completely decompress data contained in a different packet.
History maintenance thus requires both a reliable link and sequenced
packet delivery. Since TLS and lower-layer protocols provide
reliable, sequenced packet delivery, compression history information
MAY be maintained and exploited if supported by the compression
method.
As described in <a href="./rfc2246#section-7">section 7 of RFC 2246</a> [<a href="#ref-2" title=""The TLS Protocol Version 1.0"">2</a>], TLS allows multiple
connections to be instantiated using the same session through the
resumption feature of the TLS Handshake Protocol. Session resumption
has operational implications when multiple compression methods are
available for use within the session. For example, load balancers
will need to maintain additional state information if the compression
state is not cleared when a session is resumed. As a result, the
following restrictions MUST be observed when resuming a session:
1. The compression algorithm MUST be retained when resuming a
session.
2. The compression state/history MUST be cleared when resuming a
session.
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Internationalization Considerations</span>
The compression method identifiers specified in this document are
machine-readable numbers. As such, issues of human
internationalization and localization are not introduced.
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. IANA Considerations</span>
<a href="#section-2">Section 2</a> of this document describes a registry of compression method
identifiers to be maintained by the IANA, including assignment of an
identifier for the DEFLATE compression method. Identifier values
from the range 0-63 (decimal) inclusive are assigned via <a href="./rfc2434">RFC 2434</a>
Standards Action [<a href="#ref-3" title="">3</a>]. Values from the range 64-223 (decimal)
<span class="grey">Hollenbeck Standards Track [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc3749">RFC 3749</a> TLS Compression Methods May 2004</span>
inclusive are assigned via <a href="./rfc2434">RFC 2434</a> Specification Required [<a href="#ref-3" title="">3</a>].
Identifier values from 224-255 (decimal) inclusive are reserved for
<a href="./rfc2434">RFC 2434</a> Private Use [<a href="#ref-3" title="">3</a>].
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Security Considerations</span>
This document does not introduce any topics that alter the threat
model addressed by TLS. The security considerations described
throughout <a href="./rfc2246">RFC 2246</a> [<a href="#ref-2" title=""The TLS Protocol Version 1.0"">2</a>] apply here as well.
However, combining compression with encryption can sometimes reveal
information that would not have been revealed without compression:
data that is the same length before compression might be a different
length after compression, so adversaries that observe the length of
the compressed data might be able to derive information about the
corresponding uncompressed data. Some symmetric encryption
ciphersuites do not hide the length of symmetrically encrypted data
at all. Others hide it to some extent, but still do not hide it
fully. For example, ciphersuites that use stream cipher encryption
without padding do not hide length at all; ciphersuites that use
Cipher Block Chaining (CBC) encryption with padding provide some
length hiding, depending on how the amount of padding is chosen. Use
of TLS compression SHOULD take into account that the length of
compressed data may leak more information than the length of the
original uncompressed data.
Compression algorithms tend to be mathematically complex and prone to
implementation errors. An implementation error that can produce a
buffer overrun introduces a potential security risk for programming
languages and operating systems that do not provide buffer overrun
protections. Careful consideration should thus be given to
protections against implementation errors that introduce security
risks.
As described in <a href="#section-2">Section 2</a>, compression algorithms can occasionally
expand, rather than compress, input data. This feature introduces
the ability to construct rogue data that expands to some enormous
size when compressed or decompressed. <a href="./rfc2246">RFC 2246</a> describes several
methods to ameliorate this kind of attack. First, compression has to
be lossless. Second, a limit (1,024 bytes) is placed on the amount
of allowable compression content length increase. Finally, a limit
(2^14 bytes) is placed on the total content length. See <a href="./rfc2246#section-6.2.2">section</a>
<a href="./rfc2246#section-6.2.2">6.2.2 of RFC 2246</a> [<a href="#ref-2" title=""The TLS Protocol Version 1.0"">2</a>] for complete details.
<span class="grey">Hollenbeck Standards Track [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc3749">RFC 3749</a> TLS Compression Methods May 2004</span>
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Acknowledgements</span>
The concepts described in this document were originally discussed on
the IETF TLS working group mailing list in December, 2000. The
author acknowledges the contributions to that discussion provided by
Jeffrey Altman, Eric Rescorla, and Marc Van Heyningen. Later
suggestions that have been incorporated into this document were
provided by Tim Dierks, Pasi Eronen, Peter Gutmann, Elgin Lee, Nikos
Mavroyanopoulos, Alexey Melnikov, Bodo Moeller, Win Treese, and the
IESG.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. References</span>
<span class="h3"><a class="selflink" id="section-8.1" href="#section-8.1">8.1</a>. Normative References</span>
[<a id="ref-1">1</a>] Bradner, S., "Key words for use in RFCs to Indicate Requirement
Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
[<a id="ref-2">2</a>] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", <a href="./rfc2246">RFC</a>
<a href="./rfc2246">2246</a>, January 1999.
[<a id="ref-3">3</a>] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA
Considerations Section in RFCs", <a href="https://www.rfc-editor.org/bcp/bcp26">BCP 26</a>, <a href="./rfc2434">RFC 2434</a>, October 1998.
<span class="h3"><a class="selflink" id="section-8.2" href="#section-8.2">8.2</a>. Informative References</span>
[<a id="ref-4">4</a>] Bray, T., Paoli, J., Sperberg-McQueen, C. and E. Maler,
"Extensible Markup Language (XML) 1.0 (2nd ed)", W3C REC-xml,
October 2000, <<a href="http://www.w3.org/TR/REC-xml">http://www.w3.org/TR/REC-xml</a>>.
[<a id="ref-5">5</a>] Deutsch, P., "DEFLATE Compressed Data Format Specification
version 1.3", <a href="./rfc1951">RFC 1951</a>, May 1996.
[<a id="ref-6">6</a>] Woods, J., "PPP Deflate Protocol", <a href="./rfc1979">RFC 1979</a>, August 1996.
[<a id="ref-7">7</a>] Pereira, R., "IP Payload Compression Using DEFLATE", <a href="./rfc2394">RFC 2394</a>,
December 1998.
[<a id="ref-8">8</a>] Gutmann, P., "Compressed Data Content Type for Cryptographic
Message Syntax (CMS)", <a href="./rfc3274">RFC 3274</a>, June 2002.
<span class="grey">Hollenbeck Standards Track [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc3749">RFC 3749</a> TLS Compression Methods May 2004</span>
Author's Address
Scott Hollenbeck
VeriSign, Inc.
21345 Ridgetop Circle
Dulles, VA 20166-6503
US
EMail: shollenbeck@verisign.com
<span class="grey">Hollenbeck Standards Track [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc3749">RFC 3749</a> TLS Compression Methods May 2004</span>
Full Copyright Statement
Copyright (C) The Internet Society (2004). This document is subject
to the rights, licenses and restrictions contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and
except as set forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at ietf-
ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Hollenbeck Standards Track [Page 8]
</pre>
|