Re: [TLS] Are we holding TLS wrong?

Martin Thomson <martin.thomson@gmail.com> Mon, 12 November 2018 00:57 UTC

Return-Path: <martin.thomson@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 EEE691276D0; Sun, 11 Nov 2018 16:57:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=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 TEnUzLZPK5up; Sun, 11 Nov 2018 16:57:27 -0800 (PST)
Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) (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 67072123FFD; Sun, 11 Nov 2018 16:57:27 -0800 (PST)
Received: by mail-ot1-x342.google.com with SMTP id 32so5968710ota.12; Sun, 11 Nov 2018 16:57:27 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wUNK4ziYtE5P/reNo/GIh+s8a0QrLb0CoQZcUPeaEAE=; b=QRZJ2001Y7n13ZmllawzyXj+iJ3/Zx1AicWZ+B39N+JQoMdCfwGrHOk8NQKLHhq3hR k1GS4uqqYfuN3D+0z9S6yA0VQAe3XSjjfLhZ9e7kFYWFBD/6Nh0b8dq4ocstTaCDtYAD iw6EeDIWjyHLuiSGhpAOCXTpFdGjOuaOIy4XZZl4tS138ziJ7WpDfsOa+r1KuHmPHbRO WrRa4GMuPMBSMeoHxGdqjk7jgmNRUUhVgCsaU5yecFiFZSyEfSUzwd/lZeu8ltMjpicn /s4SR0RYoaXD0OI28o0UHegYP2KT7bTlPDUu0CreXa/eL0Dsjee6cvMzs4SA6tG+MoAU 7lKA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wUNK4ziYtE5P/reNo/GIh+s8a0QrLb0CoQZcUPeaEAE=; b=PNB6MS53zc/bp5WX+1wKZ9SQoewA+PpdlyHlbTOaZsY/TQu5QIQ4HJrJBcU4jK/QS2 +pQ5jtYvtIlQ6cV0VvCy+PdFGYO4aBPOHiwIIsTC8D2OQJ7GOCCtUV1CiDWWWDo5ewjn h6l+i93/eA8cd48eg9RTpE5t6iHlCWvW9Fkhydf87wF7Xvr0qEmrCL1hvrDNK5AQGc98 Xs/z1tt5Py8nYvtCcqPTBh3ahRU8vretdRPRsCm53biHrFZ/YwM5xo0B+QPexciN8ZFy 0UUEZExcUbSr1RGu6dwEFTLEPWE8hBFJA6BzisXR2YlaFBaI8tr3UeOeFExwfTHz4bxT TXmg==
X-Gm-Message-State: AGRZ1gItafVY+qgEjlyv81e3PXBtqrYCx4nlZJS+tssxZvVQFQz/+PDE ltGzDp4CaeM1T/mS0CWrfylnAR8ANnwp/UZS2qU=
X-Google-Smtp-Source: AJdET5d8Fi/wS+FRHmCaxafyGy/HoXVq9sfWTgSyluSny3Ld3MZi6R1EnuXRi8jQ/wgR9dsEwks4d6ugNIo/59NrH+U=
X-Received: by 2002:a9d:2da2:: with SMTP id g31mr11338110otb.310.1541984246670; Sun, 11 Nov 2018 16:57:26 -0800 (PST)
MIME-Version: 1.0
References: <CAPDSy+7-ceNNLJpFK0Z4SitBaUgxTpxiea8Z0QtpeSr+MNLKFg@mail.gmail.com> <CABkgnnWF6_cqhMCKMWHYNcdOTU=4BjRYaYMtfz-A3jtxprRAHA@mail.gmail.com> <87wopmw7sh.wl-jch@irif.fr>
In-Reply-To: <87wopmw7sh.wl-jch@irif.fr>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Mon, 12 Nov 2018 07:57:16 +0700
Message-ID: <CABkgnnXFWvLKKcgxCs=AwPJifFwUANH_87ocQV+FNYiVoHH_XA@mail.gmail.com>
To: jch@irif.fr
Cc: dschinazi.ietf@gmail.com, "<tls@ietf.org>" <tls@ietf.org>, draft-ietf-babel-dtls@ietf.org
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/cJce8ozosk0MzYJFAQNX5uj9VRQ>
Subject: Re: [TLS] Are we holding TLS wrong?
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: Mon, 12 Nov 2018 00:57:29 -0000

On Fri, Nov 9, 2018 at 11:10 PM Juliusz Chroboczek <jch@irif.fr>; wrote:
> > Offhand, it seems like replays are possible if you allow the possibility
> > of the node crashing and dumping state.
>
> Unless I've missed something -- they are not, assuming you have
> a sufficiently strong random number generator.  The challenge mechanism
> rebuilds the shared state in a secure manner, and the index mechanism
> ensures that an (index, seqno) pair is never reused.

I had a really hard time understanding this, even with this help.
Right now, I don't know what key is used for HMAC.  I think that the
expectation is that each peer has a fixed HMAC key, but the contents
of the packet always change, thereby ensuring that the resulting MAC
is different for every packet.

Given how non-intuitive this whole thing is, I would suggest that a
formal analysis would be a good idea.  Or you could just use DTLS and
get things like post compromise security and nice things like that.