Exercising Version Negotiation

Eric Rescorla <ekr@rtfm.com> Thu, 22 March 2018 12:04 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EABB51270B4 for <quic@ietfa.amsl.com>; Thu, 22 Mar 2018 05:04:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.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 3wvft6JDClwP for <quic@ietfa.amsl.com>; Thu, 22 Mar 2018 05:04:17 -0700 (PDT)
Received: from mail-ot0-x22f.google.com (mail-ot0-x22f.google.com [IPv6:2607:f8b0:4003:c0f::22f]) (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 767F0126CD6 for <quic@ietf.org>; Thu, 22 Mar 2018 05:04:17 -0700 (PDT)
Received: by mail-ot0-x22f.google.com with SMTP id i28-v6so9132221otf.8 for <quic@ietf.org>; Thu, 22 Mar 2018 05:04:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=0csmeNC2LYfs9nFR2OxQUeIrvrKmp0j1oRX4OBIOrrU=; b=0Dwk7McmAzbpK2HDNIt95C61a23GtXQu0PvYEcUms/vi86f8T4N6mS5tIl1xSNTTJM 7BXaWvbuLYkBXhP9G+9Um55nmcSUiY0UQhVrDkebNUID1tWNgsyyLqaRzTI/3lT6c2z9 RrDw/P4q15/mkkUHyibfJH2YWfqYxWkQF2d8wE4I5yMmdGTxP5jp8cgUCeR40CMI6rST hy5VJXLcpa3fMKpIUKXzJoMFmPVB9ETd7F5K20L8cra6p8MqsMVUg1eksFHpoLf6hv/q 29/jFvJCPUq1fsJBp9TDyMulU0JIQk7nD+/pekwJYayNiah/3q/E7kod3uSIZjpdqT06 8+YA==
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=0csmeNC2LYfs9nFR2OxQUeIrvrKmp0j1oRX4OBIOrrU=; b=V/qyH90JWkBMeSPLrtlMtH1VE2h/TMYAyoXQsPCFLh/DN8zPK8bmgKDO+lMdEYGnXb 6+w1wO5aDUnAtjY9RhRJBRQRSEVIqGq9CxphKqK6u26jicUEuI+rQDBZGUEz2bpeG3LE 1EHcwcUkU8tVuvACpYnTsb72XoN3QZe+Iw4VIfGVY8l0YjKeHIVTcWgN4GszOKrmByeD mwyf3SC16VI15K66e4WyDJ5yMQQqpRDW08/YtG94FCugH4t2K8E0PQvv1RKo3V3b5hOS Q84ZfzxJWPNMDSWm6tGcEIJQp0A5+Pnli/zm+qpYmRuNM+oPL8yY16sTLafr/Ls6mpJC IVoQ==
X-Gm-Message-State: AElRT7ExsyBl1mX6NFbRDCi6+a/KAf5GVhH3Yk5WlMDjHYwkRzdobjt0 sG2nsm6HimJD7pOgEvx1+gZbhL1u1Vta1WRXzJR+sqwT
X-Google-Smtp-Source: AG47ELtDgZ9v5jtpYST8U2Wm+HdX5peU/uWfQ4az95xdf4mYlVfT8BMblz5+lch9GsqVtzkasbCUxS93ciLBT88KFHA=
X-Received: by 2002:a9d:782:: with SMTP id 2-v6mr15905479oto.217.1521720256558; Thu, 22 Mar 2018 05:04:16 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.201.23.21 with HTTP; Thu, 22 Mar 2018 05:03:36 -0700 (PDT)
From: Eric Rescorla <ekr@rtfm.com>
Date: Thu, 22 Mar 2018 12:03:36 +0000
Message-ID: <CABcZeBMv5BqZOtgVA2wfqaaGCd94gcNPB9bTXkrvNXXRveU8wA@mail.gmail.com>
Subject: Exercising Version Negotiation
To: IETF QUIC WG <quic@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000570ee40567ff1b22"
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/EQWpPnYdayyFeQbZ1PQ8Fa5Tig0>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 22 Mar 2018 12:04:19 -0000

Following up on the discussion at the mic, I do think it is useful to
exercise the VN function, but I don't think it's useful to have those
versions be different, because that creates perverse incentives.

Here's what I suggest instead: create two versions (we can call them QUIC
v1+i  and QUIC v1-i), each with its own code point [0]. They should be
essentially identical except for two trivial differences, intended to
ensure that if you screw up version negotiation, you get failed interop.

- The constant in the handshake salt (5.2.2)
- The HKDF expansion constants

I suggest we handle each of these by just inverting the bits.

We would then suggest to people that they somewhat randomize their
preferences (e.g., 99% of the time prefer v1+i, 1% of the time prefer
v1-i). This will almost always result in matching versions, but will
occasionally result in a mismatch, thus forcing us to test VN.

-Ekr

[0] Obviously we can do this for draft versions. We just say that the two
versions are
ff0000XX and ffffffXX.