Re: [tcpm] question about TCP-AO and rekeying

Joe Touch <touch@ISI.EDU> Tue, 16 June 2009 13:46 UTC

Return-Path: <touch@ISI.EDU>
X-Original-To: tcpm@core3.amsl.com
Delivered-To: tcpm@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id B47363A6B7C for <tcpm@core3.amsl.com>; Tue, 16 Jun 2009 06:46:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.473
X-Spam-Level:
X-Spam-Status: No, score=-2.473 tagged_above=-999 required=5 tests=[AWL=0.127, BAYES_00=-2.599]
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 WYhNTa52QFTW for <tcpm@core3.amsl.com>; Tue, 16 Jun 2009 06:46:21 -0700 (PDT)
Received: from vapor.isi.edu (vapor.isi.edu [128.9.64.64]) by core3.amsl.com (Postfix) with ESMTP id 9954E28C163 for <tcpm@ietf.org>; Tue, 16 Jun 2009 06:46:21 -0700 (PDT)
Received: from [192.168.1.46] (pool-71-105-84-152.lsanca.dsl-w.verizon.net [71.105.84.152]) by vapor.isi.edu (8.13.8/8.13.8) with ESMTP id n5GDjcBT025982; Tue, 16 Jun 2009 06:45:40 -0700 (PDT)
Message-ID: <4A37A202.9020500@isi.edu>
Date: Tue, 16 Jun 2009 06:45:38 -0700
From: Joe Touch <touch@ISI.EDU>
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
MIME-Version: 1.0
To: Eric Rescorla <ekr@networkresonance.com>
References: <4A2AB973.3030203@isi.edu> <20090616131807.75C481BC6EB@kilo.networkresonance.com>
In-Reply-To: <20090616131807.75C481BC6EB@kilo.networkresonance.com>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
X-ISI-4-43-8-MailScanner: Found to be clean
X-MailScanner-From: touch@isi.edu
Cc: tcpm Extensions WG <tcpm@ietf.org>
Subject: Re: [tcpm] question about TCP-AO and rekeying
X-BeenThere: tcpm@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TCP Maintenance and Minor Extensions Working Group <tcpm.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tcpm>
List-Post: <mailto:tcpm@ietf.org>
List-Help: <mailto:tcpm-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpm>, <mailto:tcpm-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 16 Jun 2009 13:46:22 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



Eric Rescorla wrote:
> At Sat, 06 Jun 2009 11:46:11 -0700,
> Joe Touch wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi, all,
>>
>> One open issue remaining is how to express what was formerly a database
>> with a particular structure (TAPD, previously TSAD) in ways that impact
>> rekeying and possibly future master key management protocols. We decided
>> at the last meeting in SFO to do as follows:
>>
>> 	- require that each segment match only one key
>> 		- segments for established connections must match
>> 		only one connection key
>> 		- segments for new connections (SYNs) must match
>> 		only one master key
>>
>> Connection keys never overlap; there would never be two connection keys
>> with the same keyID and socket pair. The open issue focuses on master
>> keys, which would more likely be specified with wildcards, masks, or
>> ranges, esp. for remote port numbers, but also potentially for addresses
>> or local port numbers. This issue is particularly relevant for rekeying
>> - - adding new master keys that would result in new connection keys being
>> derived for existing connections - and how an endpoint would be able to
>> ensure uniqueness as above.
>>
>> Do we need additional constraints to ensure that master key descriptions
>> never overlap?
>>
>> As review, the previous description of keys as a database also implied,
>> by its structure, constraints on wildcards/masks/ranges. Each TAPD entry
>> was:
>>
>>     a socket pair descriptor
>>         which may include wildcards or masks
>>
>>     one or more MKTs, each of which includes:
>>         sendID
>>         recvID
>>         crypto info:
>>             master key
>>             MAC info
>>             KDF info
>>
>> The TAPD was defined so that a segment matched at most one socket pair
>> descriptor, and that MKTs within that descriptor had distinct sendIDs
>> and recvIDs.
>>
>> If we remove that data structure, it would most obviously be replaced
>> with MKTs with their own socket descriptors, i.e.:
>>
>>     MKT
>>         socket pair descriptor (may include wildcards/masks)
>>         sendID
>>         recvID
>>         crypto info
>>
>> The question that remains is whether MKTs that match a segment all have
>> identical socket pair descriptors, even down to their
>> wildcards/ranges/masks (which was previously required). If
>> not, then how do we ensure that MKTs don't interfere?
> 
> I don't understand why this is a problem. The invariant that
> the system needs to enforce is that for any given packet 
> there be at most one valid MKT with a given key-id, right?

KeyID doesn't come into play for outgoing packets, so we can ignore that.

However, the invariant is twofold:

	a) for a given packet, only one MKT applies

	b) for two endpoints with multiple MKTs,
	the *same* MKT applies.

The second invariant requires that either:

	a) no two MKTs have patterns that overlap

	b) MKTs are ordered identically on the two endpoints

If two endpoints solve this differently, a KMP could try to install the
same keys on the two ends and fail, either because one side would refuse
a new key (as overlapping), or because the two sides vary in how they
order the keys.

> There are a number of ways to enforce this, including:
> 
> 1. Having some kind of database.
> 2. Tying MKTs to sockets directly at the time of instantiation
>    (including half-open sockets).

We need to ensure that both sides pick the same MKT. That needs to
happen at connection establishment (could be during socket
instantiation), but ALSO needs to happen for re-keying, FWIW. That
doesn't change the nature of the problem.

>> If we throw our hands up and say this is "implementation detail", then
>> IMO we could be hobbling any KMP, since there would be no common data
>> for the KMP to coordinate.
> 
> I don't see this. Obviously, any KMP will need some model for
> how it thinks about keys and any particular implementation of
> a KMP will need to interact with the system on which it is
> implemented in order to match that model to the system's
> implementation, but I don't see how that's a problem. It's
> not like we're defining a C API for the KMP implementations
> to call.

If we don't specify some level of commonality, we can't expect to ever
define such an API.

Joe
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAko3ogIACgkQE5f5cImnZrtDoACgqfBUxsXk52jQsNa4AiDeXdOm
KCIAoLphIibqh3KVm2cm6QIsZTOn2bvS
=JuFx
-----END PGP SIGNATURE-----