Re: [TLS] TLS 1.3 Record Boundaries

Ilari Liusvaara <ilariliusvaara@welho.com> Tue, 24 October 2017 12:53 UTC

Return-Path: <ilariliusvaara@welho.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DE64013E0DD for <tls@ietfa.amsl.com>; Tue, 24 Oct 2017 05:53:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hR5w-6UIavKZ for <tls@ietfa.amsl.com>; Tue, 24 Oct 2017 05:53:54 -0700 (PDT)
Received: from welho-filter2.welho.com (welho-filter2.welho.com [83.102.41.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B881113846C for <tls@ietf.org>; Tue, 24 Oct 2017 05:53:54 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by welho-filter2.welho.com (Postfix) with ESMTP id 3C324B538E; Tue, 24 Oct 2017 15:53:53 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter2.welho.com [::ffff:83.102.41.24]) (amavisd-new, port 10024) with ESMTP id 4ypk29WQd0y3; Tue, 24 Oct 2017 15:53:53 +0300 (EEST)
Received: from LK-Perkele-VII (87-92-19-27.bb.dnainternet.fi [87.92.19.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPSA id B0D522313; Tue, 24 Oct 2017 15:53:50 +0300 (EEST)
Date: Tue, 24 Oct 2017 15:53:50 +0300
From: Ilari Liusvaara <ilariliusvaara@welho.com>
To: Andrei Popov <Andrei.Popov@microsoft.com>
Cc: "'tls@ietf.org'" <tls@ietf.org>
Message-ID: <20171024125350.djebfdbx4x3dc7o5@LK-Perkele-VII>
References: <CY4PR21MB0120175D642F6244F04CDA358C470@CY4PR21MB0120.namprd21.prod.outlook.com> <CY4PR21MB0120498BA401EA25CC2E439B8C470@CY4PR21MB0120.namprd21.prod.outlook.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CY4PR21MB0120498BA401EA25CC2E439B8C470@CY4PR21MB0120.namprd21.prod.outlook.com>
User-Agent: NeoMutt/20170609 (1.8.3)
Sender: ilariliusvaara@welho.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/lY_RcNFo6RMDsyO6C6bLowjS1fM>
Subject: Re: [TLS] TLS 1.3 Record Boundaries
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Oct 2017 12:53:56 -0000

On Tue, Oct 24, 2017 at 12:42:01AM +0000, Andrei Popov wrote:
> Draft-21 says:
> "Handshake messages MUST NOT span key changes.  Implementations
>   MUST verify that all messages immediately preceding a key change
>   align with a record boundary; if not, then they MUST terminate the
>   connection with an "unexpected_message" alert.  Because the
>   ClientHello, EndOfEarlyData, ServerHello, Finished, and KeyUpdate
>  messages can immediately precede a key change, implementations
>   MUST send these messages in alignment with a record boundary."

Edge case: Finished is also part of post-handshake auth (*puke*),
which does not trigger key change. And from some cryptographic
analysis, one might get an idea to immediately send a KeyUpdate
requesting reciproal update afterwards (not that I think that is
actually necressary or even helpful).


-Ilari