Re: [TLS] TLV vs Compression

Martin Thomson <> Sat, 12 July 2014 02:56 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id E5CBE1B27AB for <>; Fri, 11 Jul 2014 19:56:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=unavailable
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id skPBcKn08PLX for <>; Fri, 11 Jul 2014 19:56:25 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:400c:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 32FA01A0190 for <>; Fri, 11 Jul 2014 19:56:25 -0700 (PDT)
Received: by with SMTP id ho1so111013wib.16 for <>; Fri, 11 Jul 2014 19:56:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=m8OrsSYk656zlmiLXoqGhW9scu8qd8jN5LHkYkytBAY=; b=Iz3nRjARMMu0WMQgxlSpnRrDOKxmB+3KngzG+si08rT0aoUEAipjkxYR1ubPFTEytd vVCIej2nN4U/PumR8x0f/I4AcCB6OCETnNEPYktl4ftrCsi5hT/9zXLimHtwGwi8QjQC lgT2Nv+Hey/Io26YPgvZqmnbQbbtZh0LemKvUa31R52UUPnTBrYVl8c0/9yFKlIhhyHr tIpdZsjSifTt30A5v6lUYR9S08ocQG+ANqaIxW8Jrw2fcGnn2oUc5rRyB5UiqYic1w11 RDo77QGy3qQBEW0aKb31oLd+dzpYUPDYxKaPDI5bCTNvrRRtu9KMJy8nL9EfbN4KV5UP hRtQ==
MIME-Version: 1.0
X-Received: by with SMTP id ch4mr3567628wjb.59.1405133783802; Fri, 11 Jul 2014 19:56:23 -0700 (PDT)
Received: by with HTTP; Fri, 11 Jul 2014 19:56:23 -0700 (PDT)
In-Reply-To: <>
References: <>
Date: Fri, 11 Jul 2014 19:56:23 -0700
Message-ID: <>
From: Martin Thomson <>
To: James Cloos <>
Content-Type: text/plain; charset=UTF-8
Cc:, "" <>
Subject: Re: [TLS] TLV vs Compression
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sat, 12 Jul 2014 02:56:27 -0000

On 11 July 2014 18:36, James Cloos <> wrote:
> Or posed differently, if an application knows that the tls socket uses
> pfs and is mutually authenticated, is it ever safe for *it* to compress
> the data it sends over said socket?

Tying this to authentication works only to the extent that the
authenticated actor is solely responsible for content.  The concern is
largely based on where the data comes from.  Attacks shared so far
[CRIME/BEAST] rely on compression that includes a mix of attacker
controlled content and content the attacker wants to learn about.

If you can guarantee single origin, then the length of an encrypted
packet can reveal information, but it's pretty low in signal.  An
attack might still be able to attack low entropy secrets that use
compression techniques that don't suit this use.  Besides,
guaranteeing that data is free from attacker influence is not that
easy to do.

The only technique that I think stands any chance here is to avoid
generic compression, and rely on content-aware compression mechanisms
that can be adjusted to deal with cases where content is controlled by
mutually distrustful actors.

Look here to the decisions made in HPACK, which is far worse than the
state of the art in terms of compression efficiency at best.  And
HPACK will rarely reach optimum compression in practice due to the
need for numerous safeguards against these sorts of attacks.