ietf-corpus

rfc-3749

Transport Layer Security Protocol Compression Methods

S. Hollenbeck
date2004-05 streamIETF areasec wgtls statusPROPOSED STANDARD pages8 canonicalhttps://www.rfc-editor.org/rfc/rfc3749 doi10.17487/RFC3749
The Transport Layer Security (TLS) protocol (RFC 2246) 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. [STANDARDS-TRACK]

updated by

Extracted elements (17)

design-rationale §2

DEFLATE compression in TLS is stateful (compressor maintains state across records) rather than stateless, because stateless compression provides little known benefit within TLS's reliable, sequenced delivery environment while stateful compression achieves higher ratios on streams.

tls

design-rationale §3

Session resumption requires clearing compression history (but retaining the algorithm) to avoid operational complexity for load balancers that would otherwise need to maintain additional state about the compression context.

tls

interoperability-note §1

TLS originally defined only CompressionMethod.null, limiting interoperability for implementations wanting compression. This document adds DEFLATE (value 1) as a standard method to enable interoperable compressed TLS implementations.

tls

normative-requirement §2 MUST NOT

A compression method that exceeds the expansion limits described in section 6.2.2 of RFC 2246 (1,024 bytes content length increase, 2^14 bytes total) MUST NOT be used with TLS.

tls, security

normative-requirement §2.1 MUST

All data submitted for DEFLATE compression MUST be included in the compressed output with no data retained for a later payload, ensuring each compressed packet can be fully decompressed (flushing requirement).

tls

normative-requirement §3 MAY

Compression history information MAY be maintained and exploited if supported by the compression method, since TLS and lower-layer protocols provide reliable, sequenced packet delivery.

tls

normative-requirement §2 RECOMMENDED

It is RECOMMENDED that other compression methods standardized in the future be stateful, as there is little known benefit in using stateless compression within TLS.

tls

normative-requirement §2.1 MUST

The receiving DEFLATE decompressor MUST automatically adjust to the compression parameters selected by the sender.

tls

normative-requirement §6 SHOULD

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.

tls, security, privacy

normative-requirement §3 MUST

When resuming a TLS session, the compression algorithm MUST be retained.

tls

normative-requirement §3 MUST

When resuming a TLS session, the compression state/history MUST be cleared.

tls

protocol-element §2.1

DEFLATE compression (RFC 1951) is defined as a stateful TLS compression method with identifier value 1. The sender selects compression parameters; the receiver must adapt automatically and all input data must appear in the compressed output with mandatory flushing.

tls

protocol-element §2

The CompressionMethod enumeration is updated to define three zones: 0-63 for IETF Standards Track, 64-223 for non-Standards Track, and 224-255 for private use. DEFLATE is assigned identifier value 1.

tls

registry §5

IANA maintains a registry of TLS compression method identifiers. Values 0-63 are assigned via Standards Action, 64-223 via Specification Required, and 224-255 are reserved for Private Use.

tls, registry

security-consideration §6

Combining compression with encryption can reveal information through length: compressed ciphertext lengths may allow adversaries to infer properties of the plaintext, particularly with stream ciphers or CBC with fixed padding. This is an inherent risk of TLS compression.

tls, security, crypto

security-consideration §6

Compression algorithms are mathematically complex and prone to implementation errors such as buffer overruns, which introduce security risks in languages and operating systems without buffer overrun protections.

tls, security

security-consideration §6

Compression algorithms can expand rather than compress input, enabling construction of rogue data that expands to enormous size. RFC 2246 mitigates this by requiring lossless compression, limiting content length increase to 1,024 bytes, and capping total content at 2^14 bytes.

tls, security