Re: [TLS] CH padding extension

Roelof duToit <> Tue, 12 June 2018 19:21 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 41E17130E92 for <>; Tue, 12 Jun 2018 12:21:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id iYMiw70YW98c for <>; Tue, 12 Jun 2018 12:21:32 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 6D231130E91 for <>; Tue, 12 Jun 2018 12:21:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1528831290; s=zoho;;; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:Message-Id:References:To; l=11161; bh=BWjYfD45Rf5FwgN3r5UVsAKcqWYjBBTBwP5uOhkI2sg=; b=SEKZR9n3LRwXj/B0MFVZ2mBbX3NSzut9/BE/I1mlSubNK4931IwGT+shquzZN7Uz 7p/nQzJw6SI9fXCXLcBKV6DkGmEIdJ1M2Sb47pM6loF95UEQd/u2oUKjnDU5M/P+Y+v U7sBXZTUH1TTB4F5QOMXUja7zgPZfxfws126AZbA=
Received: from roelofs-mbp.lan ( []) by with SMTPS id 1528831290105395.34230972581554; Tue, 12 Jun 2018 12:21:30 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_9BCBEBC9-48D0-491A-A05B-3485FF96365A"
Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\))
From: Roelof duToit <>
In-Reply-To: <020e7b24-1015-4b6a-817c-0c12d754875d@Spark>
Date: Tue, 12 Jun 2018 15:21:37 -0400
Cc: David Benjamin <>, "<>" <>
Message-Id: <>
References: <> <> <> <> <> <> <020e7b24-1015-4b6a-817c-0c12d754875d@Spark>
To: Christopher Wood <>
X-Mailer: Apple Mail (2.3124)
X-ZohoMailClient: External
Archived-At: <>
Subject: Re: [TLS] CH padding extension
X-Mailman-Version: 2.1.26
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: Tue, 12 Jun 2018 19:21:39 -0000

You could use the existing Certificate padding mechanism.  Which mechanism?!   The one in this paragraph:

For maximum compatibility, all implementations SHOULD be prepared to handle
potentially extraneous certificates and arbitrary orderings from any
TLS version, with the exception of the end-entity certificate which
MUST be first.

I ran an experiment a while ago in which all major browsers (at that point) accepted an arbitrary X.509 certificate in the Certificate message.   In other words, you could just build a blob that looks like a DER encoded X.509 certificate and include it in the chain.

It is indeed a hack, but in all seriousness, would the client endpoint stacks even bother to change that behavior? (disclaimer: I have not checked the latest behavior).


> On Jun 12, 2018, at 3:07 PM, Christopher Wood <> wrote:
> Got it — thanks for the clarification! I agree with your conclusion assuming we do not want to make an incompatible wire format change. However, if we’re willing to budge on that, I think it’s worth including. I’m curious to hear what others think.
> Best,
> Chris
> On Jun 12, 2018, 11:48 AM -0700, David Benjamin <>, wrote:
>> On Tue, Jun 12, 2018 at 2:44 PM Christopher Wood < <>> wrote:
>> On Tue, Jun 12, 2018 at 11:32 AM David Benjamin < <>> wrote:
>> >
>> > On Tue, Jun 12, 2018 at 2:01 PM Christopher Wood < <>> wrote:
>> >>
>> >> On Tue, Jun 12, 2018 at 10:55 AM Kyle Nekritz < <>> wrote:
>> >> >
>> >> > Since the Certificate message is sent in an encrypted record, the normal record padding mechanism (section 5.4) can be used, rather than sending the padding as actual handshake data.
>> >>
>> >> Of course, and that requires padding on the fly and some way for the
>> >> sender to know what is the correct amount of padding per Certificate.
>> >> Plumbing up that API seems non-trivial. In comparison, one could
>> >> imagine pre-padding wire-encoded Certificate messages a priori using
>> >> the extension. So I still think restricting padding to CH is a bit
>> >> extreme.
>> >
>> >
>> > Using the padding extension isn't going to mesh well with the compressed certificates draft. (Compression is perfectly compatible with hiding the length. If all your certificates compress well---they probably do---you can pad based on the distribution of compressed lengths you're trying to mask. Of course, this will leak whether compression happened, but that's not the information that's interesting to hide.)
>> Yep, valid point.
>> >
>> > Record-level padding is indeed kind of annoying to plumb properly though. I've always thought the excitement for padding at that layer was somewhat misplaced. I could imagine allowing handshake messages to be punctuated by no-op padding messages, but then it's just one layer to route through to get to the record layer here. I think it's more at higher up the stack where record-level padding really becomes impractical.
>> To be clear, are you suggesting that adding a padding extension to the
>> Certificate message is impractical? (I wouldn't consider this
>> record-level padding.)
>> Sorry, that was probably unclear. What I meant was: I agree that record-level padding is pretty difficult to use in general, but this particular instance is probably(?) not too bad, so it seems sufficient to use the existing mechanism rather than make a wire-incompatible change (unsolicited Certificate extensions are forbidden) at this stage.
>> Though I otherwise don't particularly object to jamming the padding extension into more places, the compressed certificates point aside.
> _______________________________________________
> TLS mailing list