Re: [nbs] [Int-area] New draft related to name-based sockets

Pete McCann <mccap@petoni.org> Sat, 11 December 2010 17:02 UTC

Return-Path: <mccap@petoni.org>
X-Original-To: nbs@core3.amsl.com
Delivered-To: nbs@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 605783A6B23; Sat, 11 Dec 2010 09:02:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.977
X-Spam-Level:
X-Spam-Status: No, score=-2.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3yBBHP9FIg7i; Sat, 11 Dec 2010 09:02:55 -0800 (PST)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id 1CA1E3A6AA4; Sat, 11 Dec 2010 09:02:54 -0800 (PST)
Received: by wyf23 with SMTP id 23so4608590wyf.31 for <multiple recipients>; Sat, 11 Dec 2010 09:04:28 -0800 (PST)
MIME-Version: 1.0
Received: by 10.227.134.206 with SMTP id k14mr510292wbt.5.1292087068047; Sat, 11 Dec 2010 09:04:28 -0800 (PST)
Received: by 10.227.13.136 with HTTP; Sat, 11 Dec 2010 09:04:27 -0800 (PST)
X-Originating-IP: [64.53.131.166]
In-Reply-To: <4D02E9D9.2030508@isi.edu>
References: <AANLkTin4-uiFXoS9DaDWtTQartUb6DKEee+B8717odm5@mail.gmail.com> <4CFFFD8D.2000601@isi.edu> <AANLkTi=KG_CL5hQ0k4JQAy6oB=3RV3UWGQxTbYzGmsR3@mail.gmail.com> <72504C2E-CE17-4AE0-ACBC-E6BB4F002267@isi.edu> <AANLkTimmQ-HKJBpoqQCc9t1P=GFPFa8VojPTFh-D8Nay@mail.gmail.com> <4D011EF3.8080407@isi.edu> <AANLkTi=+PQKxMj4C83A90-DK3V-89ydBR02rR5zvA68L@mail.gmail.com> <4D0129B3.4050906@isi.edu> <AANLkTi=j1NdofgpJUDjFPcGSTT_96GByLaNTRxx7yuCy@mail.gmail.com> <4D01CE2A.9090804@isi.edu> <AANLkTim4jRQUE=FOvtQRZa7mFH1LS1h=OwkdspEV2k_J@mail.gmail.com> <4D02E9D9.2030508@isi.edu>
Date: Sat, 11 Dec 2010 11:04:27 -0600
Message-ID: <AANLkTimFfCcd4AnVejtp0cBwj6y-KVF+jCdH69nw3=xr@mail.gmail.com>
From: Pete McCann <mccap@petoni.org>
To: Joe Touch <touch@isi.edu>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "int-area@ietf.org" <int-area@ietf.org>, "nbs@ietf.org" <nbs@ietf.org>
Subject: Re: [nbs] [Int-area] New draft related to name-based sockets
X-BeenThere: nbs@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Name based sockets discussion list <nbs.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/nbs>, <mailto:nbs-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/nbs>
List-Post: <mailto:nbs@ietf.org>
List-Help: <mailto:nbs-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nbs>, <mailto:nbs-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 11 Dec 2010 17:02:57 -0000

Hi, Joe,

On Fri, Dec 10, 2010 at 9:02 PM, Joe Touch <touch@isi.edu> wrote:
>> The goal is to enable middleboxes to filter out unwanted traffic as close
>> to the sender as possible.  By adding a public-key based authentication
>> tag, middleboxes unknown to the original sender at the time he sends
>> the first packet can independently validate the signature and check the
>> reputation of the sender (similar to what DKIM does for e-mail, but this
>> is for transport connections).
>
> If a middlebox isn't on the path of the first packet, then:
>
> a) it isn't a NAT; that traffic would be blocked
>
> b) every packet would need to contain ALL the information needed to explain
> how to authenticate itself
>
> The latter seems prohibitive, in terms of space (just as an overhead,
> regardless of whether it fits in the TCP option space).

Sorry, all I was trying to say was that the client doesn't need to
know what middleboxes are on the path at the time it sends its
first transport packet.  These are dynamically discovered as the
first packet passes along the path.

Certainly, if the path changes, some kind of path restoration will
be needed.  That could be done end-to-end by periodic refreshes
of the ESTABLISH message or by some middlebox that has knowledge
of the path change and is both on the old path and the new path.

>> By performing a dynamic key derivation
>> operation, the endpoint and the middlebox can agree on a shared secret
>> to protect subsequent packets with an HMAC-based tag which should
>> be verifiable at line rate.
>
> You expect the middlebox to derive a shared key with the endpoint WHILE in
> order to protect subsequent packets?
>
> What will you be doing with the packets for the connection in the meantime?
> (this will take a while)

An elliptic curve cofactor diffie-hellman computation on known keys
takes less than 10^6 cycles:

http://cr.yp.to/ecdh/reports.html

This would be under a millisecond on modern processors in software.
Faster if hardware acceleration is available.  As Moore's law continues,
I expect that the connection setup time will be dominated by the
message propagation delay which will be one or two orders of magnitude
higher than this.

> HMAC verificiation at line rate is likely to require additional hardware
> that middleboxes typically don't have (and cannot afford, AFAICT).

I haven't run the experiments, but from data on the web it looks like
an HMAC is about two orders of magnitude faster than a D-H key
derivation.  I think we could get up to a substantial fraction of 1gpbs
even with a software implementation.  Hardware assist should have
no problem keeping up at higher line rates.

>>> - signing the headers, i.e., to provide secure 'safe packet' tags, is
>>> insufficient protection against attack; an attacker can still read AND
>>> modify the data in the packets
>>
>> Completely agree; note that signing headers only is just one of the
>> options supported by the draft, and I expect coverage of the full
>> data packet will be commonly used.  But, the option to cover just
>> the header (or to omit the HMAC and just use a cookie) are there
>> to provide a low-overhead solution for particular threat models, e.g.,
>> when all attackers are off-path.
>
> How do you know when attackers are off-path?

It's just an assumption of the threat model in a particular deployment.
If you feel the need to protect against on-path attackers, by all means,
do a full HMAC over the packet.

> A problem statement would be a start, including a threat model and a
> description of the costs (overhead, computation, etc).

Will work on this, thanks.

> Also how much effort will this require of the protected endpoints. I'm not
> sure I want to negotiate keys with a dozen middleboxes that all are trying
> to be helpful to me, and all are upstream on the same connection.

The number of middleboxes on any given path is likely to be proportional
to the number of administrative domains through which the packet passes.
I expect this will be less than 10 for most paths.  Also, the key derivation
only needs to be done once the first time you interact with a given hostname.
You should cache the Long-Term-Shared-Secret after that and use simple
HMACs to derive keys for subsequent transport connections.

> Well, you'll introduce a lot of delays every time you meet a middlebox in
> the middle of a connection. The overhead in EACH packet that is required to
> ensure that a packet can be signed is a bit prohibitive, AFAICT, as well
> (what's the raw number?)

Hopefully the discussion above clarifies.  The public key operations are
only on the first time two parties interact in some way.  An ECC digital
signature with NIST P-256 is 64 octets long.  The HMAC tag in subsequent
packets (when using the pickle packet fragment signature header given
in the draft) is 20 bytes plus variable amount depending on what level
of protection is desired.  I expect SHA-1 (20 bytes) to be nominal for
most connections.  The draft has enough flexibility to allow multiple
HMACs on each packet to account for multiple middleboxes that all
want to validate a tag from the same endpoint; however, I expect in
most deployments that the tags will be computed on a pairwise basis
between adjacent middleboxes so only one signature per packet will
be needed.

>
>> TCP-AO is in an architecturally similar place in the stack but is also
>> end-to-end
>> and doesn't have any key management defined for it.
>
> The key management is separate, but as you note there's not enough
> information after connection start to establish shared keys with new parties
> (the ISNs are gone).

But configuration of the root symmetric shared secrets must be done
manually, no?  Public key cryptography offers more flexibility and security
in this respect.

-Pete