Re: [TLS] Working group last call for draft-ietf-tls-dtls-heartbeat-02

Nikos Mavrogiannopoulos <nmav@gnutls.org> Mon, 22 August 2011 19:45 UTC

Return-Path: <n.mavrogiannopoulos@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 F200D21F8C87 for <tls@ietfa.amsl.com>; Mon, 22 Aug 2011 12:45:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.449
X-Spam-Level:
X-Spam-Status: No, score=-3.449 tagged_above=-999 required=5 tests=[AWL=-0.150, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rKd-8HLpAmDN for <tls@ietfa.amsl.com>; Mon, 22 Aug 2011 12:45:10 -0700 (PDT)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by ietfa.amsl.com (Postfix) with ESMTP id 0073121F8C86 for <tls@ietf.org>; Mon, 22 Aug 2011 12:45:09 -0700 (PDT)
Received: by wyg8 with SMTP id 8so4388951wyg.31 for <tls@ietf.org>; Mon, 22 Aug 2011 12:46:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; bh=TD+2y3Cvh8nkZDZQC8KG0yX7Dba1+51Jc0Qh9+uFjrQ=; b=QF4NWI3FfEF8jvqoso5SvghYnNlEhkxyU5qwEc6hNiVmAtCwfrDfkWxNQgZ3a5WY69 Qco1+/GtBQC+E9LHBXYS8JODkEKKTJ37jUEo7sHa7jEsJKjDNwMBoMTKEJ5R2fzpS2K0 f/HNQFWGEM3fQuGIt5U2GPgViD2wH96tvxvjE=
Received: by 10.216.169.211 with SMTP id n61mr2428795wel.83.1314042375085; Mon, 22 Aug 2011 12:46:15 -0700 (PDT)
Received: from [10.100.2.14] (94-225-167-75.access.telenet.be [94.225.167.75]) by mx.google.com with ESMTPS id s49sm4166344wec.1.2011.08.22.12.46.13 (version=SSLv3 cipher=OTHER); Mon, 22 Aug 2011 12:46:14 -0700 (PDT)
Sender: Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
Message-ID: <4E52B204.2020707@gnutls.org>
Date: Mon, 22 Aug 2011 21:46:12 +0200
From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11
MIME-Version: 1.0
To: Michael Tüxen <Michael.Tuexen@lurchi.franken.de>
References: <67629EB8-CDF5-47B3-BC6E-C1A76E08C294@cisco.com> <4E520063.7020206@gnutls.org> <B07FDAE5-4AB4-4277-8F0A-EA0A190280E1@lurchi.franken.de>
In-Reply-To: <B07FDAE5-4AB4-4277-8F0A-EA0A190280E1@lurchi.franken.de>
X-Enigmail-Version: 1.1.2
OpenPGP: id=96865171
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Cc: tls@ietf.org
Subject: Re: [TLS] Working group last call for draft-ietf-tls-dtls-heartbeat-02
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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, 22 Aug 2011 19:45:11 -0000

On 08/22/2011 11:46 AM, Michael Tüxen wrote:

>> I believe more rationale is needed in the draft on _why_ should 
>> these issues be solved at TLS or DTLS level. For (1), TCP has a
>> keepalive mechanism, so reintroducing it at TLS doesn't make much
>> sense, and UDP throws the burden to user protocol. So why not throw
>> the burden on the protocol above?
>> The only discussion on text is: "Sending HeartbeatRequest messages
>> allows the sender to make sure that it can reach the peer and the
>> peer is alive.  Even in case of TLS/TCP this allows this check at a
>> much higher rate than the TCP keepalive feature would allow." So is
>> this just a high-rate TCP keepalive? Why do we need that at the 
>> security layer? Why not propose a high-rate TCP keepalive?
> Regarding the keepalive feature: Our main motivation is not TCP
> keepalives. The point is that there are application protocols running
> over UDP which do not have a

Why not restrict the scope of this extension to DTLS then? (unless I'm
missing some other application of this in TLS).

> mechanism in the app protocol to do this. This is fine when running 
> over UDP since the lower layer does not have any state. However, when
> the lower layer becomes DTLS instead of UDP, there is state, and it
> is not a good idea to keep this state there forever. So having a way
> for DTLS to detect that the peer is gone, helps.

Ok, now I understand what you try to address with this extension (and it
might be better for the draft text to express it as well). However is
this the right solution for the problem? This does not make DTLS
stateless, thus it is different in operation as the previous UDP server.
Anyway you'll have to trigger the keepalive messages manually (with
input from the application layer) or after some fixed time.

Wouldn't this be equivalent (in resources and behavior) with trying
to resume the DTLS connection after a fixed amount of time?
(the handshake resumption is 3 messages, this is one message more than
the 2 keep-alive messages).

>> About (2) Both TCP and UDP don't bother with a special PMTU
>> discovery mechanism. Why should DTLS or TLS provide it? Are there
>> advantages on making a PMTU discovery at this level?
> Where else? TLS has no problem since TCP segments user messages.
> DTLS running over UDP can not rely on it. That is why DTLS should
> determine the PMTU. For doing this, it needs some messages for
> testing, preferable not app data which might et lost during the
> testing. Using the HB, you have a tool to do this without relying on
> ICMP message.

Just from curiosity how has this been implemented in a library (or how
you think of being implemented)? How did the keep-alive messages are
being exchanged without the application noticing?


Nits:
section 3:
> "it has to be answered with a corresponding HeartbeatResponse
> message
immediately."
I don't think the immediately adds to the sentence. It just adds
confusion. What if it was sending an application data packet on a
different thread? Should I stop?

> "HeartbeatRequest messages from older epochs SHOULD be discarded."
Why HeartbeatRequest messages are treated differently? Aren't all
messages with older epochs to be discarded?

5.2:
"HeartbeatRequest messages SHOULD only be sent after an idle period
that is at least multiple round trip times long."
This is more than unclear. Why not specify how many? What if I decide 2
times and another implementor discards my message because for him
multiple was > 3?


regards,
Nikos