[TLS] predictability of inputs in ESNI

Rob Sayre <sayrer@gmail.com> Fri, 01 November 2019 21:28 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 57FBE120A55 for <tls@ietfa.amsl.com>; Fri, 1 Nov 2019 14:28:10 -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 fVLvrufUeL1z for <tls@ietfa.amsl.com>; Fri, 1 Nov 2019 14:28:08 -0700 (PDT)
Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (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 EB0DC12024E for <tls@ietf.org>; Fri, 1 Nov 2019 14:28:02 -0700 (PDT)
Received: by mail-il1-x135.google.com with SMTP id d83so9847849ilk.7 for <tls@ietf.org>; Fri, 01 Nov 2019 14:28: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=z/tfh+2JQuhkDz76ObINuI/QXJHadBHayS1sRO3MHvY=; b=jpFVm5IYm1P/ysbVdW/faOCb52QzmiQRI8koG+EUm6CowmxIxZHk2QRQrLjjztTwzY J/c03e+lZoI3gOWgV8dMvf8gfF3PSRHv8JMdS4+JQFE/mdNhnmesIRPf074rqrRWgaaK 65wiBIKVEFD/o8pCmuQCHV0ztvZyQujYXbk8StLm9Xg2Vz3VDp35CcqbeN72TN9NyDRW wmzUZxcbzepT4aIskIMqqgyV4xME5nPetn6c45/A5Sq8Yg7qcHLTnbC+BhqBcl5RkyMt gsND6ULahf14ceezbs2n/+PydCAfMfrwK65Ssb/PehMldgw6rabHh1iclkB0bdnJObHD 8gNg==
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=z/tfh+2JQuhkDz76ObINuI/QXJHadBHayS1sRO3MHvY=; b=oJVYv0PCS18SgZuEJ3Foix7m70g37rQeuJ9FtiOy6ruSX7U7zJYGu1TT91n2gj5NP1 ARtoH7WcnzE/nVhTYBqOsv5a2pI/yOrUGv6F2t4XGz3tY4IfPp1sugs9v8MgeWi4mXCA s63wKfzt++GiD/sMkymvJi7ZRvs7LKkVWxVqZlbORjPJN2QYwaB0GUA8ouDa6FX3evi3 z2md/8wX/5xL/pEUsWjbqdP1FKrmMYtHd9llkaohi+DWol8PtugPySwOlMd47Njdc2/g d5ItIIPWc/ACfG4gOCg9mlqqT6dPOKOWIbnVmjM/8+uWDzERdsrvr/ksL3iU56OXSeT8 PvPw==
X-Gm-Message-State: APjAAAXsqZSglLP4orcog+HM5x7RAzMawWFPG1ebLs41jN1w2NpwZEeW vCoP9rLC3uLvTsepDNNKbBaLnSwN13xZC1cHw8N5T2WEhdQ=
X-Google-Smtp-Source: APXvYqz0rzNif6P9U48Pence8/24Dl+pR+vxPFO6DcLJbn/1u/gAwKgbXZzEyj+QleiKAZxRWst1kga8V+hyfrKMDyc=
X-Received: by 2002:a92:db0c:: with SMTP id b12mr15539906iln.49.1572643681798; Fri, 01 Nov 2019 14:28:01 -0700 (PDT)
MIME-Version: 1.0
From: Rob Sayre <sayrer@gmail.com>
Date: Fri, 1 Nov 2019 14:27:50 -0700
Message-ID: <CAChr6SxZQkbLExmFYX8obdvMw_oFY2=k9Q3YUTUW67HUo74vLg@mail.gmail.com>
To: "TLS@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000000312ff05964fa4fc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/iMHnoqpP2_IRJR62_5m3MJ8BIBI>
Subject: [TLS] predictability of inputs in ESNI
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: Fri, 01 Nov 2019 21:28:15 -0000

Hi,

I am not sure how important these findings are, but I've noticed three
instances of unnecessarily predictable inputs in ESNI:

1) Trailing padding after domain names are zeros.
2) The checksum calculation seems to start with predictable version bytes
in draft -04, and in shipping implementations
3) In practice, NSS inserts 8 bytes of zeros at the beginning of its AAD
input (<https://github.com/tlswg/draft-ietf-tls-esni/issues/190>)

It seems like these values should all be allowed to be opaque, and I am not
sure why NSS is prepending zeros to its AAD (although I asked in the github
issue).

thanks,
Rob