Re: [core] DTLS and Epochs

Jim Schaad <ietf@augustcellars.com> Mon, 15 May 2017 15:44 UTC

Return-Path: <ietf@augustcellars.com>
X-Original-To: core@ietfa.amsl.com
Delivered-To: core@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 13BEB12EAE7 for <core@ietfa.amsl.com>; Mon, 15 May 2017 08:44:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.602
X-Spam-Level:
X-Spam-Status: No, score=-0.602 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-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=augustcellars.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 3xEViNEzQSVR for <core@ietfa.amsl.com>; Mon, 15 May 2017 08:44:22 -0700 (PDT)
Received: from mail4.augustcellars.com (augustcellars.com [50.45.239.150]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 669A5129461 for <core@ietf.org>; Mon, 15 May 2017 08:37:48 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Language: en-us
DKIM-Signature: v=1; a=rsa-sha256; d=augustcellars.com; s=winery; c=simple/simple; t=1494862666; h=from:subject:to:date:message-id; bh=nYk7yrBV6e6ZG7OkNypXLd8f+p/sk2dAoj0ZFvmHlXw=; b=D8UKXPSMHwPFxXZgsr5od9rqhHHJp41EGqhTIq4g0a3SPhbsO+kLh31uDvUkaoCuuKmyFRUkSnv jQ5OGeEQyxJHAzDUYkhHBjLqknuUwfJYXMTEXWQn3VLrHed17OKZOJXJtXL0gOZy4B6M9jteGcLqd 0Gt15PrkAFXDoNvvsAq8NFDHqThCoJWf6wHOoQ7FLrs9ApKg8shUirWopyM7UEUraMVu2qHqu4mKW Io/y4LNiNRCKZcbPcqEZzRIKHeIAvk9fj2h2zrhzfTdCx2tSfVH2wJyBH7bnGh+Ulmd3QJ+5KkdTH 8d+5HSQOU5LcoBN5dj0JcAa4UVXtwJmYJdzA==
Received: from mail2.augustcellars.com (192.168.1.201) by mail4.augustcellars.com (192.168.1.153) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Mon, 15 May 2017 08:37:45 -0700
Received: from Hebrews (24.21.96.37) by mail2.augustcellars.com (192.168.0.56) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Mon, 15 May 2017 08:37:37 -0700
From: Jim Schaad <ietf@augustcellars.com>
To: 'Klaus Hartke' <hartke@tzi.org>
CC: core@ietf.org
References: <003501d2cd32$c4417a10$4cc46e30$@augustcellars.com> <CAAzbHvYb39cPMmw_S0eZ4RSwzzmcE7636tjyu=kyCbUtBOwb0g@mail.gmail.com>
In-Reply-To: <CAAzbHvYb39cPMmw_S0eZ4RSwzzmcE7636tjyu=kyCbUtBOwb0g@mail.gmail.com>
Date: Mon, 15 May 2017 08:26:50 -0700
Message-ID: <005e01d2cd8f$ae548dc0$0afda940$@augustcellars.com>
MIME-Version: 1.0
X-Mailer: Microsoft Outlook 16.0
Thread-Index: AQDNpaiTKhTjOCugYu4GMFgItWlKOAHYofZfo/EOhfA=
X-Originating-IP: [24.21.96.37]
Archived-At: <https://mailarchive.ietf.org/arch/msg/core/Z_9JwqfTX7E16-omcmAwZrheQ9g>
Subject: Re: [core] DTLS and Epochs
X-BeenThere: core@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: "Constrained RESTful Environments \(CoRE\) Working Group list" <core.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/core>, <mailto:core-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/core/>
List-Post: <mailto:core@ietf.org>
List-Help: <mailto:core-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/core>, <mailto:core-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 15 May 2017 15:44:27 -0000

At this point I would have to ask why similar language is not in the TLS draft as well.

Note however that this has nothing to do with epochs and everything to do with additional authentication.  I think that an errata is called for to clarify this.

It turns out that my DTLS libraries are unable to give me the fact that an epoch has changed, but would know if additional authentication was done.  Two very different operations.

Jim


-----Original Message-----
From: Klaus Hartke [mailto:hartke@tzi.org] 
Sent: Monday, May 15, 2017 5:02 AM
To: Jim Schaad <ietf@augustcellars.com>
Cc: core@ietf.org WG <core@ietf.org>
Subject: Re: [core] DTLS and Epochs

Hi Jim,

the requirement was added for the case that the epoch changes due to client or server authentication.

Example:

      1. A client connects to a server using DTLS. The server
         authenticates with a server certificate; the client
         is unauthenticated.

      2. The client sends a request that requires the client
         to be authenticated.

      3. The server requests the client to authenticate.

      4. The client authenticates with a client certificate;
         a new epoch starts.

      5. The server processes the request, assuming it comes
         from the now authenticated client. Oops!

Requiring that the request is sent in the same epoch as the response prevents this. It seems the language in the RFC was made too broad when trying to say that, though. An erratum could make it more precise.

Klaus


On 15 May 2017 at 06:21, Jim Schaad <ietf@augustcellars.com> wrote:
> I am working on getting my DTLS code to work correctly and I have come 
> across something that I do not understand.  I did not see any messages 
> in the mailing list that dealt with this so I would like to get an 
> explanation if possible.
>
> RFC 7252 states that a response is not to be correlated with a request 
> unless the message id, the DTLS session and the DTLS epoch are the 
> same.  I can understand the reasoning behind the id and session being 
> the same, however I am unsure of the reason that the epoch would need 
> to be the same as well.  I cannot see of a reason why the epoch should 
> matter.  The security session is still the same.  I could understand 
> that there would be a reason to kill an association if additional 
> client or server authentication information had been passed along, but 
> while that would change the epoch, an epoch can change just because 
> enough messages have been sent over the pipe.
>
> Can somebody please explain the reasoning to me.
>
> Jim