Re: Pseudorandom Flow Labels

Fernando Gont <fernando@gont.com.ar> Thu, 07 April 2011 17:11 UTC

Return-Path: <fernando.gont.netbook.win@gmail.com>
X-Original-To: ipv6@core3.amsl.com
Delivered-To: ipv6@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id EBBCF28C164 for <ipv6@core3.amsl.com>; Thu, 7 Apr 2011 10:11:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.532
X-Spam-Level:
X-Spam-Status: No, score=-3.532 tagged_above=-999 required=5 tests=[AWL=-0.533, BAYES_00=-2.599, J_CHICKENPOX_43=0.6, 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 KnGQbq+G5eg9 for <ipv6@core3.amsl.com>; Thu, 7 Apr 2011 10:11:51 -0700 (PDT)
Received: from mail-yi0-f44.google.com (mail-yi0-f44.google.com [209.85.218.44]) by core3.amsl.com (Postfix) with ESMTP id DE27828C168 for <ipv6@ietf.org>; Thu, 7 Apr 2011 10:11:50 -0700 (PDT)
Received: by yic13 with SMTP id 13so1326140yic.31 for <ipv6@ietf.org>; Thu, 07 Apr 2011 10:13:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:openpgp:content-type:content-transfer-encoding; bh=2JsVspisUKu4qUAD8QAoBkTW3/ovkQAlO7Cz3rEEIPc=; b=AE50A5+06WEgKW3joUeLA5/MJ1o1RcXFlbuve5WBvTjqe+jjisbdHHggyUP0zzf/Dj C6mZfENEj/V9M4pc7cT/7jEDradnXLC2y99e0DsRsrUwuXLe7a7rHaG6NlcLKRIfIuXm G1BJKPGXwItl0P+5KxQa9UJnp4TjyFzJix+i4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:openpgp:content-type :content-transfer-encoding; b=nC7IB0YMOLNPuS7a7cJ0dhYEH9QSeMxM/ILgT1rWcFttWcYJgAPL0Ag4UoFBn1Wccf UVUZaRSe1Qjw5csJi5f9rDVvh3vr1HtyUwPYtpFGjO9BQouDaRv1uHKXT8FGSkLC9VBn /5AJsT3xKTZclrb0IPmK5RIpn/WaMxGgo+4xU=
Received: by 10.101.145.37 with SMTP id x37mr898589ann.22.1302196415398; Thu, 07 Apr 2011 10:13:35 -0700 (PDT)
Received: from [192.168.123.102] ([190.48.227.167]) by mx.google.com with ESMTPS id k16sm2010638anb.11.2011.04.07.10.13.32 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 07 Apr 2011 10:13:34 -0700 (PDT)
Sender: Fernando Gont <fernando.gont.netbook.win@gmail.com>
Message-ID: <4D9DF0B9.6070209@gont.com.ar>
Date: Thu, 07 Apr 2011 14:13:29 -0300
From: Fernando Gont <fernando@gont.com.ar>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: Fernando Gont <fernando@gont.com.ar>
Subject: Re: Pseudorandom Flow Labels
References: <BD901061-96AC-4915-B7CE-2BC1F70861A5@castlepoint.net> <201104051958.p35JwaJP019044@cichlid.raleigh.ibm.com> <4D9CAA66.9090402@gont.com.ar>
In-Reply-To: <4D9CAA66.9090402@gont.com.ar>
X-Enigmail-Version: 1.1.1
OpenPGP: id=D076FFF1
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Cc: Thomas Narten <narten@us.ibm.com>, 6man List <ipv6@ietf.org>
X-BeenThere: ipv6@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "IPv6 Maintenance Working Group \(6man\)" <ipv6.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ipv6>
List-Post: <mailto:ipv6@ietf.org>
List-Help: <mailto:ipv6-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipv6>, <mailto:ipv6-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 07 Apr 2011 17:11:52 -0000

On 06/04/2011 03:01 p.m., Fernando Gont wrote:

>> I think we can assume that if we use both the src/dst, we will get a
>> good degree of distribution in the values. Adding the Flow Label gives
>> more. I am just not convinced that to get good distribution we need to
>> *require* (or strongly suggest) psuedo randomness in the Flow
>> Lable. We know that by simply incrementing the Flow Label by 1 for
>> each flow, we get sufficient distribution. That is *way* easier to
>> implement than something else.
> 
> What we want is unpredictable flow numbers, with a low frequency of FL
> reuse. A typical call to random() would be just *one*¨way to do it. But,
> as noted, there are others.
> 
> For hash-based algorithms, you only compute the hash once for each flow.
> Then you simply increment the FL for each packet you send for that flow.

Sorry. Please let me correct myself:

The hash is computed only once for each flow. And every time a new flow
is created, a global counter is incremented.

When a new flow is created, the FL is selected by the expresion:
FL = hash(src ip, dst ip) + counter
and the counter is incremented

So, the FL of successive Flow Labels between the same set of IPv6
addresses will have monotonically-increasing FLs.

The table in
http://tools.ietf.org/html/draft-gont-6man-flowlabel-security-01
illustrates this much better.

Thanks,
-- 
Fernando Gont
e-mail: fernando@gont.com.ar || fgont@acm.org
PGP Fingerprint: 7809 84F5 322E 45C7 F1C9 3945 96EE A9EF D076 FFF1