Re: [TLS] What is "completed handshake"?

Ben Smyth <research@bensmyth.com> Tue, 09 August 2022 07:50 UTC

Return-Path: <research@bensmyth.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 8A946C15A733 for <tls@ietfa.amsl.com>; Tue, 9 Aug 2022 00:50:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.105
X-Spam-Level:
X-Spam-Status: No, score=-2.105 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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=bensmyth.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WsC_I_TBEzv8 for <tls@ietfa.amsl.com>; Tue, 9 Aug 2022 00:50:29 -0700 (PDT)
Received: from 2.smtp.34sp.com (2.smtp.34sp.com [IPv6:2a00:1ee0:2:5::2eb7:902]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C53CBC15A72C for <tls@ietf.org>; Tue, 9 Aug 2022 00:50:27 -0700 (PDT)
Received: from smtpauth3.mailarray.34sp.com (lvs5.34sp.com [46.183.13.73]) by 2.smtp.34sp.com (Postfix) with ESMTPS id A18FF581685 for <tls@ietf.org>; Tue, 9 Aug 2022 08:50:22 +0100 (BST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bensmyth.com; s=dkim; t=1660031422; bh=6t1MBUE1ZxriiQgYuRgrvJRL9lYKRMiiY9SxucjkVv0=; h=References:In-Reply-To:Reply-To:From:Date:Subject:To; b=dmL0YeBOc8YowqyT8HGTuCTM20qwxRUBCZcfsKaODsg8lnCMvFi2K1+xPEs+6GbYA AqAO8jHGir5cdJ7pOaW3JJrjG3oplE1HQgvN0W7xU21M6Q+gNm8wkACArd6o2r0756 IqFIN7wVgM2mwmmh6ubNC7gjsQi3Qjwv9UmayNmA=
Received: from mail-pl1-f180.google.com ([209.85.214.180]:44224) by smtpauth3.mailarray.34sp.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from <research@bensmyth.com>) id 1oLK0M-0008VY-Ft for tls@ietf.org; Tue, 09 Aug 2022 08:50:22 +0100
Received: by mail-pl1-f180.google.com with SMTP id x10so10660213plb.3 for <tls@ietf.org>; Tue, 09 Aug 2022 00:50:22 -0700 (PDT)
X-Gm-Message-State: ACgBeo3obXBOMdryBl6yLI9ET7VaTOPwB1ocE3rq8VvMPt0kX5Wj6dU/ kSRKI64LPizNz5jFnKgNLRotRDlu0Pq4o0Z6QVQ=
X-Google-Smtp-Source: AA6agR6idGEu1OteWQGnH5SGm9R+MMOHi5e5E3Hob6PGXkEkkrRLZI6IhlsdmL+sWBmp123uW57Z9MjH9v3UOrU5EU8=
X-Received: by 2002:a17:903:447:b0:16e:cbe3:29de with SMTP id iw7-20020a170903044700b0016ecbe329demr22292842plb.65.1660031420347; Tue, 09 Aug 2022 00:50:20 -0700 (PDT)
MIME-Version: 1.0
References: <CADqLbz+EJAWpAF0bBZn7DOmPwT7ZkfvNsj+uPxP3qenG26fWhQ@mail.gmail.com> <CALZ3u+aJE-ha2YFQ62fNaZUQy6yUbABAt+uBgW8h47fgkp_tiQ@mail.gmail.com> <CA+_8xu2z7jNZt3EVb71b5usU13ggXHBoGbNvVL+S9xkBqiUpMA@mail.gmail.com> <1cde19df-e130-43be-b447-41106dafa179@beta.fastmail.com>
In-Reply-To: <1cde19df-e130-43be-b447-41106dafa179@beta.fastmail.com>
Reply-To: research@bensmyth.com
From: Ben Smyth <research@bensmyth.com>
Date: Tue, 09 Aug 2022 09:49:43 +0200
X-Gmail-Original-Message-ID: <CA+_8xu3MqirbSVfjiB+5R_r4tkjigKxFsDd8noSTZ7WD2rnXCA@mail.gmail.com>
Message-ID: <CA+_8xu3MqirbSVfjiB+5R_r4tkjigKxFsDd8noSTZ7WD2rnXCA@mail.gmail.com>
To: tls@ietf.org
Content-Type: multipart/alternative; boundary="00000000000020401105e5ca2f20"
X-Authenticated-As: f594447444afb5e8e542d6cd3ee989c5ad593da02deb40a8d61181d2a2c508bd
X-OriginalSMTPIP: 209.85.214.180
X-34spcom-MailScanner-Information: Please contact the ISP for more information
X-34spcom-MailScanner-ID: A18FF581685.A36AA
X-34spcom-MailScanner: Found to be clean
X-34spcom-MailScanner-SpamCheck: not spam, SpamAssassin (score=-0.11, required 6.5, autolearn=disabled, DKIM_SIGNED 0.10, DKIM_VALID -0.10, DKIM_VALID_AU -0.10, HTML_MESSAGE 0.00, SPF_PASS -0.00, T_SCC_BODY_TEXT_LINE -0.01)
X-34spcom-MailScanner-From: research@bensmyth.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/wl3AZ8FBqiIHooz00CYrgckSqsc>
Subject: Re: [TLS] What is "completed handshake"?
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.39
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, 09 Aug 2022 07:50:34 -0000

On Tue, 9 Aug 2022 at 08:50, Martin Thomson wrote:

> On Tue, Aug 9, 2022, at 16:36, Ben Smyth wrote:
> > On Mon, 8 Aug 2022 at 15:21, Töma Gavrichenkov wrote:
> >> "Upon receiving the server's messages, the client responds with its
> Authentication messages, namely Certificate and CertificateVerify (if
> requested), and Finished. At this point, the handshake is complete"
> >
> > I stumbled with this.
>
> That seems clear enough to me.  At least from the client's perspective.
> Presumably the server has to receive the client's Finished to consider the
> handshake complete.
>

For me there was a eureka! moment, when I finally understood, suddenly
everything fell into place. It could have been an easier journey; I don't
know whether I can better explain.

There are handshake messages, there's handshaking, and there's handshake
completion. Handshaking is an exchange of handshake messages. Handshake
messages are also exchanged post handshake completion. A handshake
partially completes on sending/receiving a server's Finished message---a
server can send application data thereafter---an authenticated channel from
the server to a client is established. A handshake fully completes on
sending/receiving the client's (first) Finished message, a channel
(optionally, authenticated) from the client to the server is established.
Post-handshake authentication adds a twist, further client Finished
messages may be sent/received.

>From the above, we see two points at which the handshake completes, and a
further two points of partial completion.