Re: [quicwg/base-drafts] Define an anti-forgery limit (#3620)

David Schinazi <notifications@github.com> Fri, 08 May 2020 22:49 UTC

Return-Path: <noreply@github.com>
X-Original-To: quic-issues@ietfa.amsl.com
Delivered-To: quic-issues@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5A4993A0F45 for <quic-issues@ietfa.amsl.com>; Fri, 8 May 2020 15:49:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.101
X-Spam-Level:
X-Spam-Status: No, score=-3.101 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=github.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 Aqle3GL8Dzqd for <quic-issues@ietfa.amsl.com>; Fri, 8 May 2020 15:48:59 -0700 (PDT)
Received: from out-1.smtp.github.com (out-1.smtp.github.com [192.30.252.192]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B231B3A0E93 for <quic-issues@ietf.org>; Fri, 8 May 2020 15:48:58 -0700 (PDT)
Received: from github-lowworker-25680bd.va3-iad.github.net (github-lowworker-25680bd.va3-iad.github.net [10.48.17.61]) by smtp.github.com (Postfix) with ESMTP id B6D02C60D49 for <quic-issues@ietf.org>; Fri, 8 May 2020 15:48:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1588978137; bh=FCw24Xn6rB46KCAwb8cK52sJD1J3TcXzk8/C+03wwws=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=aLGv7f0c3EenA1M7LPoMG2kDy63LXjcdv3YdFJ9fhWcyV3ViJOmBl4DteH3XE/MJp orz3WWvpNnII39goUe9RgRl7ngCoKw8roewr+oPGRqRTvSr9mmpOc9+sobr/Ql4Fc0 t8gEO8ovtG3wcfP3IUttsKPfe+k49f+02Ah0tTP8=
Date: Fri, 08 May 2020 15:48:57 -0700
From: David Schinazi <notifications@github.com>
Reply-To: quicwg/base-drafts <reply+AFTOJKYZCY5RNCEUL2BDT5V4YHBNTEVBNHHCIZGB6U@reply.github.com>
To: quicwg/base-drafts <base-drafts@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Message-ID: <quicwg/base-drafts/pull/3620/review/408565073@github.com>
In-Reply-To: <quicwg/base-drafts/pull/3620@github.com>
References: <quicwg/base-drafts/pull/3620@github.com>
Subject: Re: [quicwg/base-drafts] Define an anti-forgery limit (#3620)
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="--==_mimepart_5eb5e1d9a8a44_6dd73ff85a0cd9641161b7"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Precedence: list
X-GitHub-Sender: DavidSchinazi
X-GitHub-Recipient: quic-issues
X-GitHub-Reason: subscribed
X-Auto-Response-Suppress: All
X-GitHub-Recipient-Address: quic-issues@ietf.org
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic-issues/JrvZ9jIyqe-JlWP7PKX3JXG-pQQ>
X-BeenThere: quic-issues@ietf.org
X-Mailman-Version: 2.1.29
List-Id: Notification list for GitHub issues related to the QUIC WG <quic-issues.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic-issues/>
List-Post: <mailto:quic-issues@ietf.org>
List-Help: <mailto:quic-issues-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic-issues>, <mailto:quic-issues-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 08 May 2020 22:49:02 -0000

@DavidSchinazi commented on this pull request.

This feels like playing with fire to me. I think I'd almost prefer to remove CCM from the spec entirely, and add it as an extension document once there exists a peer-reviewed analysis that doesn't have the 2^14 record size caveat.

> +AEAD_AES_128_CCM, but the analysis in {{ccm-bounds}} shows that a limit of 2^23
+packets can be used to obtain the same confidentiality protection as the limits
+specified in TLS.
+
+The usage limits defined in TLS 1.3 exist to provide protection against attacks
+on confidentiality and apply to successful applications of AEAD protection. The
+integrity protections in authenticated encryption also depend on limiting the
+number of attempts to forge packets. TLS achieves this by closing connections
+after any record fails an authentication check. In comparison, QUIC ignores any
+packet that cannot be authenticated, allowing multiple attempts at defeating
+integrity protection.
+
+Endpoints MUST count the number of packets that are received but cannot be
+authenticated.  If the number of packets that fail authentication exceeds a
+limit that is specific to the AEAD in use, the endpoint MUST immediately close
+the connection.  Endpoints MUST initiate a key update before reaching this

This text feels unclear to me. It could be interpreted as "you MUST close the connection and initiate key rotation" which is silly. I think what's missing is the fact that the counter of invalid packets received is rest on key rotation. But if we have a "MUST initiate rotation", what's the point of the "MUST close the connection"?

> +successfully forge a packet; see {{AEBounds}} and {{ROBUST}}.
+
+For AEAD_AES_128_GCM, AEAD_AES_256_GCM, and AEAD_CHACHA20_POLY1305, the limit on
+the number of packets that fail authentication is 2^36.  Note that the analysis
+in {{AEBounds}} supports a higher limit for the AEAD_AES_128_GCM and
+AEAD_AES_256_GCM, but this specification recommends a lower limit.  For
+AEAD_AES_128_CCM, the limit on the number of packets that fail authentication
+is 2^23.5; see {{ccm-bounds}}.
+
+Note:
+
+: These limits were originally calculated using assumptions about the
+  limits on TLS record size. The maximum size of a TLS record is 2^14 bytes.
+  In comparison, QUIC packets can be up to 2^16 bytes.  However, it is
+  expected that QUIC packets will generally be smaller than TLS records.
+  Where packets might be larger than 2^14 bytes in length, smaller limits might

This sounds scary to me. It feels like the spec is saying `Computing the limits for larger packet sizes is left as an exercise to the reader.` As a reader of this specification, I personally do not feel competent to get that right.

> @@ -2029,6 +2079,104 @@ ffff00001b0008f067a5502a4262b574 6f6b656ea523cb5ba524695f6569f293
 a1359d8e
 ~~~
 
+# Analysis of Limits on AEAD_AES_128_CCM Usage {#ccm-bounds}

Would it make sense to move this to an appendix? Ideally I would prefer for this to not be in the draft at all, and instead have a reference to a peer-reviewed paper, but I suspect that doesn't exist today.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/3620#pullrequestreview-408565073