Re: [Tcpcrypt] New version of the charter text

Tero Kivinen <kivinen@iki.fi> Wed, 30 April 2014 13:51 UTC

Return-Path: <kivinen@iki.fi>
X-Original-To: tcpcrypt@ietfa.amsl.com
Delivered-To: tcpcrypt@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1DC241A0684 for <tcpcrypt@ietfa.amsl.com>; Wed, 30 Apr 2014 06:51:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.552
X-Spam-Level:
X-Spam-Status: No, score=-2.552 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RP_MATCHES_RCVD=-0.651, SPF_PASS=-0.001] autolearn=ham
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 fmwfDT1Gw0aP for <tcpcrypt@ietfa.amsl.com>; Wed, 30 Apr 2014 06:51:55 -0700 (PDT)
Received: from mail.kivinen.iki.fi (fireball.kivinen.iki.fi [IPv6:2001:1bc8:100d::2]) by ietfa.amsl.com (Postfix) with ESMTP id E101B1A6F2F for <tcpcrypt@ietf.org>; Wed, 30 Apr 2014 06:51:54 -0700 (PDT)
Received: from fireball.kivinen.iki.fi (localhost [127.0.0.1]) by mail.kivinen.iki.fi (8.14.8/8.14.7) with ESMTP id s3UDpctV001171 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 30 Apr 2014 16:51:38 +0300 (EEST)
Received: (from kivinen@localhost) by fireball.kivinen.iki.fi (8.14.8/8.14.7/Submit) id s3UDpa2k001042; Wed, 30 Apr 2014 16:51:36 +0300 (EEST)
X-Authentication-Warning: fireball.kivinen.iki.fi: kivinen set sender to kivinen@iki.fi using -f
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Message-ID: <21344.65512.465866.311361@fireball.kivinen.iki.fi>
Date: Wed, 30 Apr 2014 16:51:36 +0300
From: Tero Kivinen <kivinen@iki.fi>
To: Joe Touch <touch@isi.edu>
In-Reply-To: <535E71E8.6020001@isi.edu>
References: <53576572.5030805@it.uc3m.es> <53589161.4090700@mti-systems.com> <20140424155532.GR43976@funkthat.com> <21342.18899.736731.804370@fireball.kivinen.iki.fi> <535E71E8.6020001@isi.edu>
X-Mailer: VM 8.2.0b under 24.3.1 (x86_64--netbsd)
X-Edit-Time: 6 min
X-Total-Time: 9 min
Archived-At: http://mailarchive.ietf.org/arch/msg/tcpcrypt/4cMC0Aziya91mQY1viW2sRXCEhc
Cc: Wesley Eddy <wes@mti-systems.com>, John-Mark Gurney <jmg@funkthat.com>, tcpcrypt@ietf.org
Subject: Re: [Tcpcrypt] New version of the charter text
X-BeenThere: tcpcrypt@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussion list for adding encryption to TCP." <tcpcrypt.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tcpcrypt>, <mailto:tcpcrypt-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tcpcrypt/>
List-Post: <mailto:tcpcrypt@ietf.org>
List-Help: <mailto:tcpcrypt-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tcpcrypt>, <mailto:tcpcrypt-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 30 Apr 2014 13:51:57 -0000

Joe Touch writes:
> > The current IPsec specifications (IKEv2, RFC5996) do specify how rekey
> > happens and it is specified so that no packets are lost: i.e. first
> > create new Child SA proactively, i.e. before the old Child SA expires;
> > then wait for traffic to move to this new SA (i.e. when you see
> > packets on new Child SA, you know that other end has installed it);
> > and only then remove old Child SA.
> 
> You can't ensure that no packets are lost that way. Once you transition 
> to a new SA - even if you coordinate that handoff - there may be 
> out-of-order packets that arrive after that coordination.

The timer to delete the old SA after the new is up (and we are seeing
traffic on the new SA) are usually in order of 5-10 seconds or
something like that, just to take care of the old packets.

If the out-of-order packet is delayed by more than 5-10 seconds before
it finally arrive to the other peer, it might already be dropped by
the replay window checks (depending how big window you are using), and
it would most likely already been considered as being lost by the
upper layers.

Note, also that after the rekey has been finished, and we have see
packets on the new SA, and when we start deleting the old SA, we still
accept packets on the old SA, because the delete is two way. I.e. we
send delete notification saying we are not going to send data our
outgoing old SA, and only when we get response back from the other
where it tells he will not be sending data on his old outgoing SA (i.e
our incoming SA), we actually delete the inbound SA.

I.e. in normal case there is no lost packets. 
-- 
kivinen@iki.fi