Re: [IPsec] I-D Action:draft-ietf-ipsecme-ikev2-fragmentation-03.txt

"Valery Smyslov" <svanru@gmail.com> Thu, 10 October 2013 05:44 UTC

Return-Path: <svanru@gmail.com>
X-Original-To: ipsec@ietfa.amsl.com
Delivered-To: ipsec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C428E21E8284 for <ipsec@ietfa.amsl.com>; Wed, 9 Oct 2013 22:44:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5 tests=[AWL=-0.000, BAYES_00=-2.599, STOX_REPLY_TYPE=0.001]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TUqqQL5lgtJL for <ipsec@ietfa.amsl.com>; Wed, 9 Oct 2013 22:44:44 -0700 (PDT)
Received: from mail-la0-x230.google.com (mail-la0-x230.google.com [IPv6:2a00:1450:4010:c03::230]) by ietfa.amsl.com (Postfix) with ESMTP id 4368F11E8132 for <ipsec@ietf.org>; Wed, 9 Oct 2013 22:44:42 -0700 (PDT)
Received: by mail-la0-f48.google.com with SMTP id er20so1604059lab.35 for <ipsec@ietf.org>; Wed, 09 Oct 2013 22:44:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:cc:references:subject:date:mime-version :content-type:content-transfer-encoding; bh=6hOPusNEKAU2UHVUhbdO5IAyPqda/80cZb41QZuidmo=; b=igQvDFsojkxR2nmv+hCz3hbqwWdUAMEAW6A8gUy3yDoiZLKjtdSNPd0x+m/qJ93d8D M6or+yT9pwMclDqVAs65ubahTcLn9lTW6F1HkFKoTdfnUIiGNwd12kIP3vF87HGezE65 WwUvZzHSWw58Bf/QItB9WVlSTJovUiZ3t5Rlmykj6B4PaLIz0R1LxOhc48ZWwkVKOGiL S+vhSIsaVsP8kE2pMKACU3UoyPhQeo7eNzb+IxQz89/2NitwvG1R9gss1+kvVoLFkxPC GeffosJSX3GAWHjAqkOxfcBFrC6aeMP0QRVgydP2AIeSMj4h3G7u64WN7X7k09AauXmc VyVw==
X-Received: by 10.152.87.143 with SMTP id ay15mr9860426lab.2.1381383881102; Wed, 09 Oct 2013 22:44:41 -0700 (PDT)
Received: from buildpc ([93.188.44.200]) by mx.google.com with ESMTPSA id f17sm28568105lbo.12.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 09 Oct 2013 22:44:40 -0700 (PDT)
Message-ID: <270FB1A1195F4F17B8BCCE1395DBB839@buildpc>
From: Valery Smyslov <svanru@gmail.com>
To: Tero Kivinen <kivinen@iki.fi>
References: <20131004123552.12797.87073.idtracker@ietfa.amsl.com><44D6A1836A274C98907D95D59E530FE6@buildpc><524EC6D8.9040006@gmail.com><8B0A76CCEF2F4C65A9101BBD717B5C0F@buildpc><alpine.LFD.2.10.1310041144500.10965@bofh.nohats.ca><E46CD124E88F442495758F38BC026897@chichi> <21077.17123.827427.858811@fireball.kivinen.iki.fi>
Date: Thu, 10 Oct 2013 09:44:47 +0400
MIME-Version: 1.0
Content-Type: text/plain; format="flowed"; charset="iso-8859-1"; reply-type="original"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.5931
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157
Cc: ipsec@ietf.org, Paul Wouters <paul@cypherpunks.ca>
Subject: Re: [IPsec] I-D Action:draft-ietf-ipsecme-ikev2-fragmentation-03.txt
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of IPsec protocols <ipsec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ipsec>, <mailto:ipsec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ipsec>
List-Post: <mailto:ipsec@ietf.org>
List-Help: <mailto:ipsec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ipsec>, <mailto:ipsec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 10 Oct 2013 05:44:44 -0000

Hi Tero,

> Valery Smyslov writes:
>> There is no field "id" in IKEv2 Fragmentation Payload - just Fragment 
>> Number
>> and Total Fragments. But Total Fragments field plays a dual role if
>> peer uses PMTU discovery - i.e. tries several fragment sizes.
>> In this case Total Fragments allows to distinguish between fragments from
>> different sets (assuming that trying smaller fragment size results in
>> increasing number of fragments).
>
> This was the thing that confiused me when reading the document. The
> section 2.5 should explain the Total Fragments much better. I.e.
> change the definition something like:
>
>   o  Total Fragments (2 octets) - number of fragments original message
>      was divided into. If original message is resent with different
>      fragmentation boundaries this value MUST be larger than the
>      previously used Total Fragments value, i.e the responder will
>      use this to detect whether the incoming message belongs to the
>      group of packets fragmented in same way. This field MUST NOT be
>      zero.
>
> Or something like that.

OK.

> Also I do not understand why the Fragment Number and Total Fragments
> start from 1. I think it would be more logical to have first fragment
> be 0, second 1, and the Total Fragments would be The Last Fragment#
> field. That way we do not need to have special check that fragment
> needs to be ignored if Fragment Number or Total Fragments are 0.

That's a matter of taste. Actually, I wanted to leave one special value - 
zero,
just in case the protocol needs to be extended in the future.
I have currently no idea how it can be extended (if ever), but anyway
it is a good practice in protocol design to leave this possibility.

> In general I think the sending and receiving rules should be explained
> a bit more.
>
> For example the
>
>   o  Check message validity - in particular, check whether values of
>      Fragment Number and Total Fragments in Encrypted Fragment Payload
>      are valid.  If not - message MUST be silently discarded.
>
> should be changed to say:
>
>   o  Check message validity - in particular, check whether values of
>      Fragment Number (must be <= Total Fragments) and Total Fragments
>      (must be >= previously seen Total Fragments for this message) in
>      Encrypted Fragment Payload are valid. If not - message MUST be
>      silently discarded.

OK.

> It should clearly say that if Total Fragments is less than previously
> seen then this fragment needs to be discarded.
>
> Now when I am reading th text several times through I see that all the
> required things are there, but when I was reading it first time
> through it was really hard to parse what is going on, and especially
> as I missed the dual role of the Total Fragments I got confused.
>
> It might be enough to just add more text in the Total Fragments
> description, clearly stating that it has dual role, i.e. telling what
> is the max fragment number of this message, and to separate the
> different fragmentation boundaries. My text above does not yet
> properly describe that either, so some better text is needed.

OK, I'll try to explain in more details.

Thanks,
Valery.