Re: [shara] port randomization (draft-ymbk-aplusp-03)

<teemu.savolainen@nokia.com> Thu, 12 March 2009 16:55 UTC

Return-Path: <teemu.savolainen@nokia.com>
X-Original-To: shara@core3.amsl.com
Delivered-To: shara@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 35B4B3A6BEE for <shara@core3.amsl.com>; Thu, 12 Mar 2009 09:55:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.765
X-Spam-Level:
X-Spam-Status: No, score=-5.765 tagged_above=-999 required=5 tests=[AWL=-0.166, BAYES_00=-2.599, J_BACKHAIR_46=1, RCVD_IN_DNSWL_MED=-4]
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 rBLDo37XAOfW for <shara@core3.amsl.com>; Thu, 12 Mar 2009 09:55:48 -0700 (PDT)
Received: from mgw-mx06.nokia.com (smtp.nokia.com [192.100.122.233]) by core3.amsl.com (Postfix) with ESMTP id 28C563A6940 for <shara@ietf.org>; Thu, 12 Mar 2009 09:55:47 -0700 (PDT)
Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n2CGuISN005200; Thu, 12 Mar 2009 18:56:22 +0200
Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Mar 2009 18:56:15 +0200
Received: from smtp.mgd.nokia.com ([65.54.30.7]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Mar 2009 18:56:11 +0200
Received: from NOK-EUMSG-01.mgdnok.nokia.com ([65.54.30.86]) by nok-am1mhub-03.mgdnok.nokia.com ([65.54.30.7]) with mapi; Thu, 12 Mar 2009 17:56:10 +0100
From: <teemu.savolainen@nokia.com>
To: <randy@psg.com>, <shara@ietf.org>
Date: Thu, 12 Mar 2009 17:55:36 +0100
Thread-Topic: [shara] port randomization (draft-ymbk-aplusp-03)
Thread-Index: AcmjLhVWfwgpFRsPRNOxQKiLXo1R3QAAIOYw
Message-ID: <18034D4D7FE9AE48BF19AB1B0EF2729F27F25FF603@NOK-EUMSG-01.mgdnok.nokia.com>
References: <022a01c9a2ab$fd5abf60$fd736b80@cisco.com> <A99B171D26E1564B92D36826128CD66127EE038A28@NOK-EUMSG-01.mgdnok.nokia.com> <040401c9a327$974763a0$fd736b80@cisco.com> <m24oxyg1gk.wl%randy@psg.com>
In-Reply-To: <m24oxyg1gk.wl%randy@psg.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginalArrivalTime: 12 Mar 2009 16:56:11.0213 (UTC) FILETIME=[723E87D0:01C9A333]
X-Nokia-AV: Clean
Subject: Re: [shara] port randomization (draft-ymbk-aplusp-03)
X-BeenThere: shara@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Sharing of an IPv4 Address discussion list <shara.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/shara>, <mailto:shara-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/shara>
List-Post: <mailto:shara@ietf.org>
List-Help: <mailto:shara-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/shara>, <mailto:shara-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Mar 2009 16:55:54 -0000

Depends on technique chosen for realizing non-contiguous port range. Let's look at the draft-bajko-pripaddrassign's crypto algorithm in DHCP scenario.

These reflect my current understanding.

DHCP server allocating crypto-addresses:
- needs to generate random key per public IPv4 address 
- needs to manage parameters given to each client, but does not need to calculate what ports actually are allocated (just keeps track of 'starting point' and 'number of delegated ports')
- needs to manage lease times per port set instead of per address
=>I don't think DHCP server really has resource or scaling problems 

DHCP client using crypto-addresses:
- The draft-bajko-pripaddrassign's crypto algorithm requires 3 AES-128 bit calls per allocated port, e.g. for 2048 allocated port numbers ~6000 calls are required for AES, which should be similar as encrypting 96 kilobytes of data. Not a concern for devices that able to use e.g. HTTPS for web browsing. Client can do this calculation on-demand when new source port is needed (in which case in bind-phase only 3 AES calls are needed), or in one-time run at the moment of receiving port restricted address from DHCP server.
- A node may need to implement NAT to show private IPv4 addresses on internal side. This is nothing unusual - various devices and CPEs implement NATs already (even some mobile phones have NATs).

Multiplexing gateway:
- The gateway that multiplexes traffic by the port has to calculate these ports as well. For all ports of an IPv4 address this equals encryption of ~3MB (3*64000*128bits)
- The gateway has two options:
1) have precalculated mapping table for each port<->client (e.g. point-to-point link), which is very similar to what NATs have. But as the ports are pre-calculated, the gateway has to have the mappings in memory even if not in use (to allow unsolicited inbound traffic). The memory consumption is probably bigger issue than CPU here. I don't know exactly how much memory one mapping takes (guessing that 16bits of port, and what - 32bits per point-to-point link identifier + some control data would equal ~6 bytes per mapping -> ~375kB per IP address?).
2) calculate ports on fly = when client sends packet, verify that the source port is in allowed range (3 aes calls I think also in this direction), and when (unsolicited) packet is received and no mapping exist yet in memory, find out the correct client based on the observed destination port (3 aes calls I think) - and this calculation is done only for first IP packet of a flow passing trough.

Now if the non-contiguous port set is less random, say contains multiple non-contiguous ranges allocated with port masks (see the same draft), less effort is needed in dhcp-client (no AES calls needed) and multiplexing gateway, as no AES calls are needed and mapping tables can be simpler (as bitmasks can be used). In DHCP server effort is pretty similar except for key generation part that is not needed.

Comments? This is interesting topic to look into.

I don't think these are issues for the end-nodes, but maybe someone who would be involved in gateway implementation could comment their perspectives?

Best regards,

	Teemu


>-----Original Message-----
>From: shara-bounces@ietf.org [mailto:shara-bounces@ietf.org] 
>On Behalf Of ext Randy Bush
>Sent: 12 March, 2009 18:18
>To: shara@ietf.org
>Subject: Re: [shara] port randomization (draft-ymbk-aplusp-03)
>
>would a potential implementor care to speak to any resource 
>and scaling aspects of non-contiguous port assignment?
>
>randy
>_______________________________________________
>shara mailing list
>shara@ietf.org
>https://www.ietf.org/mailman/listinfo/shara
>