Re: [Pearg] I-D Action: draft-irtf-pearg-numeric-ids-generation-02.txt

Christopher Wood <caw@heapingbits.net> Wed, 20 May 2020 03:04 UTC

Return-Path: <caw@heapingbits.net>
X-Original-To: pearg@ietfa.amsl.com
Delivered-To: pearg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 63A593A094A for <pearg@ietfa.amsl.com>; Tue, 19 May 2020 20:04:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=heapingbits.net header.b=iWsohBdX; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=dxcwrzPF
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 2Owu_3jxMGqX for <pearg@ietfa.amsl.com>; Tue, 19 May 2020 20:04:54 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2590F3A0949 for <pearg@irtf.org>; Tue, 19 May 2020 20:04:54 -0700 (PDT)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 1FD135C01FA for <pearg@irtf.org>; Tue, 19 May 2020 23:04:53 -0400 (EDT)
Received: from imap4 ([10.202.2.54]) by compute1.internal (MEProxy); Tue, 19 May 2020 23:04:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heapingbits.net; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=cJm2Jvh/MhSyzqPYCosl2j9KD3RvrpX eltI1vWXKM8U=; b=iWsohBdX4fsnd6Bcy2rtzzoEW39+DpVg1T5loxhXKjcv0VJ zhI7DyRJKU3EIBKBqhOZuGI+bSKJChr+25qMJ9wrog9A2/PlN8KpyE8VEEaJ0KuI 1rO5lasaVj1D9BL/8bOpgKi1cep/iPQAt620SGh8mAt8bj1nNmwRMtz3GTSxO//W QGJoLKtjlXz77TqLkTvI/1LO5w4o6CjzjRVbWnjQI7cf+Ij6YZfeV23q74iqs3SL BGu/UGJTpVP8H4TDwD00qMrRWppzN47aGSf8QZxuoxFiJpUc8FXS6hbqf4p4QbPZ b6y+JFAIAJAX5yvyX8S2PhL7rUu0oBhDAEFJulA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=cJm2Jv h/MhSyzqPYCosl2j9KD3RvrpXeltI1vWXKM8U=; b=dxcwrzPFav1vIPtQZulUT7 vLacYzwzegtuVp8v2AGpYzUssRHpb2a4XhYgNfXG3zN1AtTrTlSZS+PG701ixoiK iDlKu2KOe0MqLmCunFl7rbokqvWJDTKawB8hxCe6Eo2/vaR8ltGd258/SAkQ33QD 20ykBqJjYkfKQ4DTY6iTmBZWPijpL96fPvdobKYv7D3NF2xAt7Gj28UJdqdRIz0S +jjNDmTc2OkzS5QMXqhZQ3/siyXbrsglAyxYepRaVLOW9G/tYeqQ7POvCLcs8wmn PHg98ZUMyQFH+TCoOuTGh0l7L6ff7+pgoUwqFGgWLoxf8dLKMrf+cu0w3uyQNQuA ==
X-ME-Sender: <xms:VJ7EXpEQJb53Horll68LpZ2pnXAk7Dm6--h8eNm2kG0sS_uLtOvQAA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddtkedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderreejnecuhfhrohhmpedfvehhrhhishhtohhphhgvrhcuhghoohgufdcuoegtrgif sehhvggrphhinhhgsghithhsrdhnvghtqeenucggtffrrghtthgvrhhnpeefgffgjeeghe evieegtdekudetuedvueelvedtueelveehtedvvedvheefvdelveenucffohhmrghinhep ihgvthhfrdhorhhgpdhirhhtfhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurf grrhgrmhepmhgrihhlfhhrohhmpegtrgifsehhvggrphhinhhgsghithhsrdhnvght
X-ME-Proxy: <xmx:VJ7EXuVvTI4S1uPPod-RB9o2_jzbYSDGRVrwqSqxNHipcZIBTudrDg> <xmx:VJ7EXrK6j_cgKgOl-YXE-Zh0Qt2yD47aLQ6oQz8-xLVEQwgQMmPWbA> <xmx:VJ7EXvHV6UboRLWJJh-3XqTZhF9atM_qoNGChBNVEY0ZIcjVCzEcgw> <xmx:VZ7EXsVOhFPbm2Zs6oCZgEoZn9Q4qSbuA7LZMOZfvizj-r5Yl_1Xvw>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id B12D13C00A1; Tue, 19 May 2020 23:04:52 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-dev0-464-g810d66a-fmstable-20200518v1
Mime-Version: 1.0
Message-Id: <de6a1fba-f2dd-44c7-b17c-e9953947a4b3@www.fastmail.com>
In-Reply-To: <158950494825.32676.4874273590052962910@ietfa.amsl.com>
References: <158950494825.32676.4874273590052962910@ietfa.amsl.com>
Date: Tue, 19 May 2020 20:04:17 -0700
From: Christopher Wood <caw@heapingbits.net>
To: pearg@irtf.org
Content-Type: text/plain
Archived-At: <https://mailarchive.ietf.org/arch/msg/pearg/7GAOjlLssjFBORob3KEqMovBfP4>
Subject: Re: [Pearg] I-D Action: draft-irtf-pearg-numeric-ids-generation-02.txt
X-BeenThere: pearg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Privacy Enhancements and Assessment Proposed RG <pearg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/pearg>, <mailto:pearg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/pearg/>
List-Post: <mailto:pearg@irtf.org>
List-Help: <mailto:pearg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/pearg>, <mailto:pearg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Wed, 20 May 2020 03:04:58 -0000

I reviewed this document with no hats on. My feedback is below (I hope it's useful)! 

In general, this is a nicely written document with clear structure and guidance. I think there are some issues with the details, and perhaps a bit too much redundancy, but overall it's heading in the right direction. I especially like the appendix, which captures our lessons learned the hard way.

Before progressing this draft further, is it possible to get feedback from folks in the transport area? We might also try and request an additional review from secdir, if they're willing.

Best,
Chris

~~~

Document: https://datatracker.ietf.org/doc/html/draft-irtf-pearg-numeric-ids-generation-02

Summary: Has Issues

Comments:

- Section 1. I'd suggest rephrasing this text:

   Recent history indicates that when new protocols are standardized or
   new protocol implementations are produced, the security and privacy
   properties of the associated identifiers tend to be overlooked, and
   inappropriate algorithms to generate transient numeric identifiers
   are either suggested in the specification or selected by
   implementers.

to something that emphasizes these problems in the past. Certainly, modern protocols such as QUIC paid very close attention to these details.

- Section 2. The terminology is duplicated in the ids-history draft. Perhaps we can note this?

- Section 3. Can the attacker generate traffic at will, or modify existing traffic? I would reference RFC3552 for the threat model here. (The same should probably go for the ids-history draft.)

- Section 4. This seems largely redundant with the history draft, no? Can we remove this section entirely?

- Section 7. I would drop either 7.1.1 or 7.1.2. We don't need two algorithms for generating random identifiers, do we? (7.1.2 seems simpler to reason about, given that it calls random during each loop iteration.) Can we also clarify the failure probability of this algorithm? 

- Section 7.3. Is "F() must be a cryptographically-secure hash function" correct? What we really want, I think, is for F to be a PRF keyed on "secret_key". RFC6528 uses a PRF here, for example (https://tools.ietf.org/html/rfc6528). Similar to the comment above, can we clarify the failure probability?

- Section 7.3. The "check_suitable_id" function is described inline here, yet is referenced in prior sections. Can we lift the utility functions used in these algorithms to a prior section to simplify the text that goes along with each function?

- Section 7.4.1. Code nit (inconsistent whitespace between comments and the next expression, and inconsistent spacing around braces

       /* Initialization code */
       id_inc = 1;

       /* Numeric ID selection function */
//---->
       count = max_id - min_id + 1;

        ...

       if(lookup_counter(CONTEXT) == ERROR){ <--- insert spaces between "if" and "(", for example

This should also apply to other code blocks, too. :-)

- Section 7.4.1. id_inc seems like it should be a parameter, rather than baked into the algorithm. 

- Section 7.4.2. Again, I think we need a PRF here for F().

- Section 7.4.3. I would remove this section. Do any implementations use this particular algorithm? 

- Section 8/9. I wonder if these sections in their entirety should be moved to the ids-sec-considerations draft, if only because they help motivate the need for these considerations. (In contrast, I see this document focusing on the *mechanisms* by which these considerations can be addressed.) What do you think?

On Thu, May 14, 2020, at 6:09 PM, internet-drafts@ietf.org wrote:
> 
> A New Internet-Draft is available from the on-line Internet-Drafts 
> directories.
> This draft is a work item of the Privacy Enhancements and Assessments 
> Research Group RG of the IRTF.
> 
>         Title           : On the Generation of Transient Numeric Identifiers
>         Authors         : Fernando Gont
>                           Ivan Arce
> 	Filename        : draft-irtf-pearg-numeric-ids-generation-02.txt
> 	Pages           : 34
> 	Date            : 2020-05-14
> 
> Abstract:
>    This document performs an analysis of the security and privacy
>    implications of different types of "numeric identifiers" used in IETF
>    protocols, and tries to categorize them based on their
>    interoperability requirements and the associated failure severity
>    when such requirements are not met.  Subsequently, it provides advice
>    on possible algorithms that could be employed to satisfy the
>    interoperability requirements of each identifier category, while
>    minimizing the security and privacy implications, thus providing
>    guidance to protocol designers and protocol implementers.  Finally,
>    this describes a number of algorithms that have been employed in real
>    implementations to generate transient numeric identifiers and
>    analyzes their security and privacy properties.
> 
> 
> The IETF datatracker status page for this draft is:
> https://datatracker.ietf.org/doc/draft-irtf-pearg-numeric-ids-generation/
> 
> There are also htmlized versions available at:
> https://tools.ietf.org/html/draft-irtf-pearg-numeric-ids-generation-02
> https://datatracker.ietf.org/doc/html/draft-irtf-pearg-numeric-ids-generation-02
> 
> A diff from the previous version is available at:
> https://www.ietf.org/rfcdiff?url2=draft-irtf-pearg-numeric-ids-generation-02
> 
> 
> Please note that it may take a couple of minutes from the time of submission
> until the htmlized version and diff are available at tools.ietf.org.
> 
> Internet-Drafts are also available by anonymous FTP at:
> ftp://ftp.ietf.org/internet-drafts/
> 
> 
> -- 
> Pearg mailing list
> Pearg@irtf.org
> https://www.irtf.org/mailman/listinfo/pearg
>