Re: [DNSOP] Multiplexing DNS & HTTP over TLS (was: extension of DoH to authoritative servers)

Joe Abley <> Thu, 14 February 2019 12:34 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id A74D2131160 for <>; Thu, 14 Feb 2019 04:34:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.999
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, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id s_YGKh8hgAHZ for <>; Thu, 14 Feb 2019 04:34:15 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4864:20::143]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 01ED0130F06 for <>; Thu, 14 Feb 2019 04:34:15 -0800 (PST)
Received: by with SMTP id i2so13919337ite.5 for <>; Thu, 14 Feb 2019 04:34:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OMz+IvzANWsVCaFb02BRXJHY9Ao6nBEHpf/qeIwrvIg=; b=CkCsSdNR6RqNUWBQsXGsO9XiNqOxDGYY99H3bnOJ4UVnL4VNizDyUom51IYUq8o+z0 VZSPHqWCRWjEpgyQlTCVgSvyZ5Ymjgi8pgmu2rXCUxKaiQBXOwBs97iOmIETD+InpbJG XEUva11lLKhi/t5N/tfXhVlpo5nGmcm/j4jGw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=OMz+IvzANWsVCaFb02BRXJHY9Ao6nBEHpf/qeIwrvIg=; b=TTx9UfEpgMGMZOb/egJabGR9znA1+laOzkHqNuNRTv972RbpH96PK83vREeKO533q0 eWuQmJHdHLOg+tUbzBwOkt2jyjM3zzuRKCDxpUrivUN0tOGTxf2hzyAZNbB2EYautjcL Pj2mB9H119XLoIzdzrRl/m7Olr+JQRjVV/iZ12P2R880E0Y6IxBG8t9EadaGv+CFxe2S FgojlOg9tZTCqGO6vUjv6O3TtFgjcTvSq6Xf7v6db3elSQox627f8x850fQr77TZBYrA 2Opx0CuwsgZdBkSBIAizj/2+WMCVDQzFrCP7HC4EwbQgahUF+6Rzi7z0kh66OpFsy1pU RvYw==
X-Gm-Message-State: AHQUAuYuSTW+rV+azP4+qC/ZMO8GmoRNgRGVYbSP7e/euDAcKtjcNV3e gRIDkg52pfka7EVXKB4HkaVNQMPJQDQ=
X-Google-Smtp-Source: AHgI3IYoggWq8aLooApdApiocTop4eNlwmwkeAYRfj7H5AElftc9yL0RBd2xsy+MR4iFy5HCq1WUJg==
X-Received: by 2002:a5e:9615:: with SMTP id a21mr1970553ioq.126.1550147653619; Thu, 14 Feb 2019 04:34:13 -0800 (PST)
Received: from ?IPv6:2607:f2c0:101:3:1925:fb8b:4a96:9b47? ([2607:f2c0:101:3:1925:fb8b:4a96:9b47]) by with ESMTPSA id 70sm1076681ity.9.2019. (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 04:34:12 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\))
From: Joe Abley <>
In-Reply-To: <>
Date: Thu, 14 Feb 2019 07:34:10 -0500
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <> <>
To: Shane Kerr <>
X-Mailer: Apple Mail (2.3445.102.3)
Archived-At: <>
Subject: Re: [DNSOP] Multiplexing DNS & HTTP over TLS (was: extension of DoH to authoritative servers)
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 14 Feb 2019 12:34:18 -0000

On 14 Feb 2019, at 05:03, Shane Kerr <> wrote:

> On 14/02/2019 09.05, Stephane Bortzmeyer wrote:
>> On Wed, Feb 13, 2019 at 10:51:00PM +0100,
>>  Vladimír Čunát <> wrote
>>  a message of 118 lines which said:
>>> Technically you can run DoT on whatever port you like.
>>> Example: with knot-resolver it's easy - you just add @443, either on
>>> side of server and/or on the side of forwarding over TLS.
>> The problem is that you cannot then share this port with HTTPS
>> services (the dkg draft on demultiplexing was abandoned, apparently
>> because it doesn't work). In a world of scarce IPv4 public addresses,
>> this is a serious problem.
> Interesting. I know that the multi-purpose usage smelled bad but I didn't know that it didn't work.
> Is there a write-up on this?
> Thinking about it naively, a demultiplexer really only needs to say "is there a non-ASCII character in the first 2 or 3 bytes of a TLS session?".

I think we can consider explicit payload identification an important feature of successful protocols. Encapsulating layers need to signal key information about the nature of their contents explicitly, or you wind up with the kind of nonsense that we saw in flow-hashing in MPLS where expected network behaviours depended on which transport protocol or address family you happen to be using way up the stack, and ugly hacks abound.

Your thought-algorithm above might be ok for discriminating between DoT and HTTPS (although I think anything that depends on a condition like "non-ASCII" is highly suspect :-) but what about other protocols, current and imagined future, that might use TLS as an encapsulating protocol, e.g. to address similar privacy concerns? This doesn't seem like a problem that is particularly theoretical.

Running whatever protocol I like on whatever port I like is fine so long as I am informed about the nature of the communication (e.g. I am involved in the decisions at both ends; I configure my ssh client and my ssh server both to use 53/tcp for my own special reasons so the use of that port is understood and doesn't need to be negotiated). In the DNS, one endpoint often has no prior knowledge of even the existence of the other endpoint. Asking one or both sides to make inferences about the nature of a session without explicit signalling does not seem robust.