[TLS] ESNI interoperability questions

Rob Sayre <sayrer@gmail.com> Sat, 26 October 2019 22:32 UTC

Return-Path: <sayrer@gmail.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 41F62120048 for <tls@ietfa.amsl.com>; Sat, 26 Oct 2019 15:32:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Level:
X-Spam-Status: No, score=-1.998 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, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 tZTQUbiYNKKc for <tls@ietfa.amsl.com>; Sat, 26 Oct 2019 15:32:02 -0700 (PDT)
Received: from mail-io1-xd31.google.com (mail-io1-xd31.google.com [IPv6:2607:f8b0:4864:20::d31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3FFC7120047 for <tls@ietf.org>; Sat, 26 Oct 2019 15:32:02 -0700 (PDT)
Received: by mail-io1-xd31.google.com with SMTP id i26so6409138iog.9 for <tls@ietf.org>; Sat, 26 Oct 2019 15:32:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=/Fhzewf4UdKKiOreuRjGOtgfYet/sootH7caasj4kMs=; b=RowD0Iv+tTrSVUmiDhv6GoxKtkGnrs4ovw+b6cb8pwI02PJcMgApcpyAWLFp0g+wOR dhqISzP8nqfxd/Qc1jAVILOhSWOaraNBI1AvXxQuUVG+ZApYXa5YQ/Yo9FI3xcyoJHyQ ePKhBIHUaaBL+uOWXdCMvdAWE+Y3GXkA+Iz9dged3mvb/4e4UA8rz2kPHSJ5cTDmhAGF /a4j8gopnqalQvmRjL23LjP6Qv2MPuz7n74WwZjx+noLl0iibZCvLwKjtcN/XoFxrZzk NL6tPItMUQ52s5zJjD/RDjynPIoYCLaAlEUwz6tX2k/WHI2XZ4DNbBwuVUFOEUuvU7QQ Kx2Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/Fhzewf4UdKKiOreuRjGOtgfYet/sootH7caasj4kMs=; b=jHJo0fVN+wnQHPVExsN1541nztOY73ZL0axz0Tcom49tRYCIYl8vnIA6TMkGlOQnej cPROyAQ6SOaXOb76zd0hS4FZ36eo41ud+++94KUzK8ifVL1hdeEliQYzXY/IGenwepkv L75uwcjt9zSwble1YMdW43evTU8KQc36jxJiERumHXje74o4lnZEsY0BkPhJfGgPTb+a GlBjLxsAt/5zpJNC4zQgzfU3SDJnooDPFiGh47lgGgaCZqPAbFvk1Sh1kuOWSACgyAQ2 J9THbMQfhtPgx5AgGpVS7fVbhGok82q0NxuWRHsqMRI/9zlIURYWvEfx+ojScYvJIlJn 14WQ==
X-Gm-Message-State: APjAAAW576hRXs2/Fp85WlTjvGpPKMwvZfZVPiQ2zNgsBp6Lr6PIJtYb qxlxbB5472o8p7fI/d6DGnIzwavMdZgh7bNfMJohHUr2zPs=
X-Google-Smtp-Source: APXvYqxAGDjzsl15P+pbF1hFR1LqrHlUOCYXDRVbwJ+ecmfiMjHUrcU+MjRnN+a4AVKBb36NFilbtz/pY9dD15gOYAc=
X-Received: by 2002:a6b:f90f:: with SMTP id j15mr11309777iog.257.1572129120994; Sat, 26 Oct 2019 15:32:00 -0700 (PDT)
MIME-Version: 1.0
From: Rob Sayre <sayrer@gmail.com>
Date: Sat, 26 Oct 2019 15:31:49 -0700
Message-ID: <CAChr6SxUN5o+SXKGVoFGD_hkhprjnqj4RtzsS0+fFKFWJZOnBg@mail.gmail.com>
To: "TLS@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000cc49d40595d7d5f3"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/wWTlRZRFEh_JRf2VCQiYBl_Ri_Y>
Subject: [TLS] ESNI interoperability questions
X-BeenThere: tls@ietf.org
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." <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: Sat, 26 Oct 2019 22:32:04 -0000

Hi,

I think I have a working ESNI client, but I'm encountering a strange error
testing with Cloudflare.

I initially tested with "cloudflare.com", but found this was a bad idea,
because that host doesn't seem to require an SNI or ESNI. So, a bogus ESNI
triggered no errors.

When my client sends an ESNI to a Cloudfront-fronted domain, I get a
handshake_failure error (40). According to the -02 draft, this should only
happen if the server fails to negotiate TLS 1.3. I've got my client
configured for TLS 1.3 only, so this shouldn't be an issue. When I add an
unencrypted SNI to an otherwise identical ClientHello, everything works
over TLS 1.3. If there are problems with my ESNI encryption, I should see
other errors. Things like "illegal_parameter" or "decrypt_error", right?

In Wireshark, I can at least see that my encrypted_server_name extension
matches Firefox's cipher and key share entries, and the lengths of
record_digest and encrypted_sni are the same. Firefox does send some
extensions I don't, like ALPN. Does the absence of unencrypted SNI imply
the presence of other extensions?

I also wondered about extension order. Since the ClientHello.key_share is
part of the ESNI calculation, does it need to appear first in the
extensions list?

thanks,
Rob