Re: [TLS] Fwd: Re: AD review of draft-ietf-tls-dtls-connection-id-07 Sun, 11 October 2020 20:54 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id E72953A0147; Sun, 11 Oct 2020 13:54:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.099
X-Spam-Status: No, score=-2.099 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 4mMqKyYRwTaL; Sun, 11 Oct 2020 13:53:59 -0700 (PDT)
Received: from ( [IPv6:2001:41d0:2:7f22::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id A00FB3A0140; Sun, 11 Oct 2020 13:53:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;; s=dkim; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:In-Reply-To:References:Cc:To:From; bh=9ZFVBydfLMXs8qcq0saE0lgdWyV4a6diqjcRXaeltgQ=; b=U/qRHYKixhhEH1M0Fnq/0JJho4 VHpnhC6uBFBJzN99DSkxpQfPzaVDBlXuXgcnBgwolLQaFXnOyfzyt8Cnz5BTkjfYNPxPa6eWBZ3Bk 97cv5QU9lTdcVlBKLUkrBYYsG6HOmlVhc2yBT35+edQ0ZFo1gcQdmvC3wE6/QjS+xSEaF4iOoALLG yPde0NGRFzk+pwyLMFfBB7hU/SAG0gc7IG8aeCbYNEDdayhzYfYFYFQJAshWSXQvlMdlGdXiracBk AiO5bGSibOqkm7Iso1j0J3mK2UZ3mPJLmgKmAKJ0rBM1NAB2o7rYBdnN9debMdpyKqrrG8PX2fmuH ENW3uesg==;
Received: from localhost (authenticated.user.IP.removed [::1]) by with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (envelope-from <>) id 1kRiLq-000212-Is ; Sun, 11 Oct 2020 22:53:54 +0200
To: 'Watson Ladd' <>, 'Achim Kraus' <>
Cc:,, 'Benjamin Kaduk' <>
References: <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
Date: Sun, 11 Oct 2020 22:53:49 +0200
Message-ID: <2ce401d6a010$a267c980$e7375c80$>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 16.0
Content-Language: fr
Thread-Index: AQG8OCdvRyMzN6gdfhDRUC0fSvvW1wJeYsnhAhccQ0QCpR/r1gGzgLtVAbk0pCoB2tYMpAKgELGdAlQjCkCpPPlxUA==
X-Invalid-HELO: HELO is no FQDN (contains no dot) (See RFC2821
Archived-At: <>
Subject: Re: [TLS] Fwd: Re: AD review of draft-ietf-tls-dtls-connection-id-07
X-Mailman-Version: 2.1.29
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: Sun, 11 Oct 2020 20:54:02 -0000

Dear Watson,

I object to your comment about formal models of TLS not capturing wire encoding issues. miTLS does in fact formally specify the format of all messages on the wire to the bit.
In fact this is complex enough that we have a full paper just about the subject that will tell you more or less everything that was said in this thread - is the formal TLS message format specification including the demonstrably unsafe constructions (implicit tags on server key exchange in 1.2 and CertificateEntry in TLS 1.3). 

In the specific context of connection ID, QUIC up to draft 16 did suffer from an attack caused by the lack of encoding of the CID length. The attack is caused by the concatenation of two variable length fields in the network format (the CID and the packet number) that can both be tampered by an active attacker. The boundary of the concatenation is made ambiguous to the crypto authentication (AAD of packet content encryption) by QUIC header protection, which is applied before decryption. See (Section III.D) for a description of the attack. See and  for the formal proof that the QUIC varint encoding with minimal length representation satisfies the strong prefix property.


-----Original Message-----
From: TLS <> On Behalf Of Watson Ladd
Sent: dimanche 11 octobre 2020 08:50
To: Achim Kraus <>
Cc:;; Benjamin Kaduk <>
Subject: Re: [TLS] Fwd: Re: AD review of draft-ietf-tls-dtls-connection-id-07

On Sat, Oct 10, 2020 at 11:27 PM Achim Kraus <> wrote:
> Hi Joe,
>  > [Joe]  It's unfortunate to find issues that require breaking change 
> at  > the end of the review cycle, especially for a draft that has taken a
>  > long path to get here.   If there is an issue that is exploitable, even
>  > in a corner case, someone will develop an attack, clever name, logo and
>  > website and we will all have to scramble to deploy a fix.   It's better
>  > to fix now rather than later.
> Agreed, therefore I wrote at the begin of the discussion with Ben:
>  >> I would prefer, if this is not changed again without strong  >> 
> arguments!
>  > In this case, I don't have a way to  > exploit this issue, but 
> unless someone has a way to demonstrate that  > this is not going to 
> be an issue then I believe it is prudent to fix it  > now.
>  >
> In my opinion, ONE change may be possible. A server may be configured 
> to use only the old, only the new, or both by "try on the client's finish".
> I'm not happy with such "dirty" work-around. I would prefer to do so 
> for something more the "cryptographic hygiene".
> So, if the MAC is considered to be adpated again, should it not be 
> discussed, why at all the cid-length should be put in?
> I asked this already in January 2019
> The MAC contains already a overall length. Even in that discussion, no 
> one mentioned the reason for adding it. So if there a doubts about 
> injection, why not remove it at all?

The doubt is because of where it appears not that it appears. If every value was preceded by its length the encoding would obviously be injective. Here though it isn't clear if two different inputs to the encoding could end up the same. In fact I think in the MAC setting there almost certainly is a problem as the length of the ciphertext is right after the cid length, and with some cleverness you can come up with a cid and ciphertext that could be interpreted multiple ways.
Unfortunately I haven't followed the draft's discussions that closely.

I do not understand how a CID is supposed to be parsed by a recipient when the length can change and the length field is not encoded, but perhaps I'm misreading the intent of the [] notation in the record layer of the draft.

>  > Would this issue have been caught by formal verification?
> That may also be something to help, not to change still again and again.

I don't think the formal models of TLS reach the wire encoding.

Astra mortemque praestare gradatim

TLS mailing list