Re: [Hipsec] Eric Rescorla's No Objection on draft-ietf-hip-rfc4423-bis-19: (with COMMENT)

Eric Rescorla <ekr@rtfm.com> Tue, 08 January 2019 13:58 UTC

Return-Path: <ekr@rtfm.com>
X-Original-To: hipsec@ietfa.amsl.com
Delivered-To: hipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 58788124BE5 for <hipsec@ietfa.amsl.com>; Tue, 8 Jan 2019 05:58:24 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20150623.gappssmtp.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 gsgJsDkZQbLZ for <hipsec@ietfa.amsl.com>; Tue, 8 Jan 2019 05:58:20 -0800 (PST)
Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 559B71277D2 for <hipsec@ietf.org>; Tue, 8 Jan 2019 05:58:20 -0800 (PST)
Received: by mail-lj1-x233.google.com with SMTP id t18-v6so3484151ljd.4 for <hipsec@ietf.org>; Tue, 08 Jan 2019 05:58:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=dTgEupotgLajl/g5/HnthK+tzIB+TAwiwE8xZb1zgqk=; b=Q5fxdFQcULoz3kaTNyhjSaAtG0P5DHQamDLAwUHWIffiB7e8rJk246vBBDEx0RV88D JwngN/k+iin0bblWdbo8Lz0hBut3+UZPLUmaBOw3U1UbzfgeKrkWufwmXfoeZn4HoeoW fWrnx3sfikRaDOVOozblU7s2k9jZOe3MzvhBpwsWBM6kaHLruyACSjV7OcNlbARYCBRr 1b3VVoH70J98OjI19PNvl+SYHKTW2Mp03neBVpCY0xcNPai45TVqGfGEwIBWy12NDNbT bFLbqLOB1nsBhZ9S/T/Pmupx6fbIwyFWmYKTLWiNQ0cG5dKqpH4ToCaKVdStj36sye4Z CbJQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=dTgEupotgLajl/g5/HnthK+tzIB+TAwiwE8xZb1zgqk=; b=GGfjid6UczsX0m8XkZL5PKjKa5c6JgZ9YTt/iY/9nQ8ChBn1mLfhXCYhKXEjQKTRce bgkMeLmlE5j+7d4KlLfl0FHJ7LDgEbXtvbo6caPabgBGDGXElV9+CVF6mHdbF9fxRcVH c66hkOvIhErguMw/7pAPhI9thSGMw/X6qs6Ik6D8+BwXCdy/9jMj2+DUF5sT4xduOEtE G5lOdBFhyPKTBoSLGOo7WoOrIV1DmKstffoxKN41xbJempFH2a/C4cCsadA5vKFHNYq1 X7G0YRJXWxKJBRcTHPUST3609nlRPEyc/u+TR6a5Qy0+2rGzdxJl6yBQhbDshfpTgBcZ gwfw==
X-Gm-Message-State: AJcUukfFjRrZwukxpvoQ/n7JB7e0j97p6A5sxRFYzwKPx2iqkNUnY6Rm WRj/kWPg7jrleg0U4u19AqU0WafZzLGB/aPdmkjoUQ==
X-Google-Smtp-Source: ALg8bN72J8vViWoBiO4w7pbc1qL4f8uBggz7JFzDiu/DRly38wGE9q78qCgXxAeKVL+vQTJHaB4xi8V3baqA7aEWjGo=
X-Received: by 2002:a2e:3218:: with SMTP id y24-v6mr1229419ljy.157.1546955898498; Tue, 08 Jan 2019 05:58:18 -0800 (PST)
MIME-Version: 1.0
References: <152564286489.26793.2457846656783140871.idtracker@ietfa.amsl.com> <70e4c94f-0097-0b13-140c-db0a5732ab67@kapsi.fi> <CABcZeBPUvZW0qa5X+SGzAaDgJhArw5Q3NSnSj6cYhBce4cnzqw@mail.gmail.com> <f02e449f-75af-1329-c94c-f53bd2b4bd08@tomh.org>
In-Reply-To: <f02e449f-75af-1329-c94c-f53bd2b4bd08@tomh.org>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 08 Jan 2019 05:57:41 -0800
Message-ID: <CABcZeBPKCOq7hO85CRAd3XRiH4v=G7ohG7p8X5GDeENX9+8B8g@mail.gmail.com>
To: Tom Henderson <tomh@tomh.org>
Cc: mkomu@kapsi.fi, draft-ietf-hip-rfc4423-bis@ietf.org, hipsec@ietf.org, hip-chairs@ietf.org, IESG <iesg@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d04731057ef2bcde"
Archived-At: <https://mailarchive.ietf.org/arch/msg/hipsec/K4cL6UimSMC_Ob6dDFV0Kv9IEEs>
Subject: Re: [Hipsec] Eric Rescorla's No Objection on draft-ietf-hip-rfc4423-bis-19: (with COMMENT)
X-BeenThere: hipsec@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the official IETF Mailing List for the HIP Working Group." <hipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hipsec>, <mailto:hipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hipsec/>
List-Post: <mailto:hipsec@ietf.org>
List-Help: <mailto:hipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hipsec>, <mailto:hipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 08 Jan 2019 13:58:25 -0000

On Mon, Jan 7, 2019 at 9:58 PM Tom Henderson <tomh@tomh.org> wrote:

> Eric, Miika asked me to share some off-list discussion we had on your
> questions about second preimage attacks in HIP (inline below, trimming to
> the relevant parts).
>
> - Tom
>
> On 11/21/18 11:37 AM, Eric Rescorla wrote:
>
>
>
> On Tue, Nov 20, 2018 at 12:07 PM Miika Komu <mkomu@kapsi.fi> wrote:
>
>>
>> > Eric Rescorla has entered the following ballot position for
>> > draft-ietf-hip-rfc4423-bis-19: No Objection
>> >
>> >
>
>
>
>
>> > COMMENTS
>> > S 3.1.
>> >>          were obtained.  For 64 bits, this number is roughly 4
>> billion.  A
>> >>          hash size of 64 bits may be too small to avoid collisions in a
>> >>          large population; for example, there is a 1% chance of
>> collision
>> >>          in a population of 640M.  For 100 bits (or more), we would not
>> >>          expect a collision until approximately 2**50 (1 quadrillion)
>> >>          hashes were generated.
>> >
>> > It's not just a matter of collisions being hard, but also of being
>> > difficult to produce an HI with a given name.
>>
>> ....where name would be the hash (i.e. HIT). So I added:
>>
>> Besides accidental collisions, it is also worth noting that intentional
>> collisions are difficult to accomplish because generating a valid,
>> colliding hash along with its private-public key is computationally
>> challenging.
>>
>> Did I capture your thinking correctly?
>>
>
> Well, this isn't a collision; it's what's called a preimage. I.e.,
> computing a public
> key with a given HIT. Anyway, as far as I can tell, in HIP being able to
> compute
> a preimage for HIT Y = H(K_X) is equivalent to breaking key K_X, so that
> means
> that that function must have reasonable strength. 2^64 is nowhere near
> enough and the typical expected security level of IETF protocols is 2^128,
> so that means that the full width of the IPv6 address has to be used.
>
> The second preimage attack resistance is 96 bits, plus whatever work is
> needed to generate the keys.
>
I agree that this is in RFC 7343, but it doesn't seem to be stated anywhere
in this document, and  given that this text talks about both 64 bit and >=
100 bit hash functions, I'm not sure how to get it from this text, which is
in context quite confusing/

There isn't any mechanism defined to extend this, such as the CGA Hash
> Extension, but it seems to me that HIP could be extended in a similar way.
> My recollection is that the WG had thought 96 bits to be strong enough
> preimage resistance.
>
Generally, we are targeting the 128-bit security level for new deployments


>
>
>
>> > S 4.3.
>> >>       packet.  Consequently, a HIT should be unique in the whole IP
>> >>       universe as long as it is being used.  In the extremely rare
>> case of
>> >>       a single HIT mapping to more than one Host Identity, the Host
>> >>       Identifiers (public keys) will make the final difference.  If
>> there
>> >>       is more than one public key for a given node, the HIT acts as a
>> hint
>> >>       for the correct public key to use.
>> >
>> > How do you handle second-preimage attacks on the hash?
>>
>> I guess you are referring to this:
>>
>> https://tools.ietf.org/html/rfc7343#section-5
>>
>> (Please let me know if an explicit reference is needed)
>>
>
> No, I'm referring to the point I raised above.
>
> Would you prefer to add a statement such as "The defense against second
> preimage attacks on the hash is the length of the hash truncation (96
> bits), the work required to generate keys to try, and the possible
> distribution of both the host identity and HIT to end systems."?
>
I think you need to lay the situation out rather more completely than this.
I mean, the current text doesn't even say "preimage". You need to describe
the threat, how the-potential attack works, and why it's difficult

-Ekr