Subject: Re: [MEXT] Call for WG adoption of I-D: draft-korhonen-mext-mip6-altsec

From: Julien Laganier <[email-masked]>
Date: Fri, 4 Feb 2011 15:51:50 -0800

Jouni,

> Jouni wrote:
>>
>> Hmm.. we do handle SPIs differently and our "ESP" can be absent even if
>> UDP encap is used. Would that be an issue regarding the reuse of
>> existing formats?

The issue with reusing of the ESP syntax outside ESP is that it is
duplication of the same protocol functionality which goes against one
of the Architectural Principles of the Internet again: "If a previous
design, in the Internet context or elsewhere, has successfully solved
the same problem, choose the same solution unless there is a good
technical reason not to.  Duplication of the same protocol
functionality should be avoided as far as possible, without of course
using this argument to reject improvements.choose the same solution
unless there is a good technical reason not to"

So what is your good technical reason not to reuse IPsec ESP and
simply provide an underlying UDP encapsulation?

Also -- turning my earlier statements into questions in case it wasn't
clear I was expecting clarifications / answers :

On Fri, Jan 28, 2011 at 3:10 PM, Laganier, Julien <[email-masked]> wrote:
> None of these two points explains to me why you have to duplicate ESP functionality:
>
> 1) You have chosen to handle SPI differently, but I don't know why.

So, why?

> 2) As to ESP being absent, if the goal is to not protect some of the user-plane traffic,
> you can use ESP-NULL, or just the UDP encap...

So why wouldn't that be sufficient?

--julien

---

From: jouni korhonen <[email-masked]>
Date: Sat, 5 Feb 2011 11:34:28 +0200

Hi Julien,

> 1) You have chosen to handle SPI differently, but I don't know why. 

That was a design decision for easily to detect the type of the UDP payload. In some other cases folks have used algorithms, hash functions and such to encode more information into the SPI but we thought that would an too much. Therefore, we just dedicated few bits of the SPI for additional information.

> 2) As to ESP being absent, if the goal is to not protect some of the user-plane traffic, you can use ESP-NULL, or just the UDP encap...

Well, yes-ish. However, if I decided to send a packet without being protected, then after dispatching the packet (that is based on our SPI with type information) why would I need to do any further processing on it? If you got ESP-NULL, you still need to do additional processing like integrity check (if I were to follow ESP rules). I admit it might be "minor" but still.

So, I'll just ask once more. If I were to use ESP format laid out in other RFC and reference to them to make sure the format processing goes right, is it OK for me then to go against all MUSTs and SHALLs for the rest of the ESP rules, for example when it comes to handling of ESP-NULL?

- JOuni

> 
> --julien
> 
> None of the above explains why you need to 
> 
> Jouni wrote:
>> 
>> - Jouni
>> On Jan 29, 2011, at 12:29 AM, Laganier, Julien wrote:
>> 
>>> Either.
>>> 
>>> IMHO both would be cleaner that the current approach. I understand
>> the latter might also have some caveat but maybe they can be dealt with
>> in an elegant manner, without introducing too much complexity, e.g.,
>> see Arnaud's m6t (http://tools.ietf.org/html/draft-ebalard-mext-m6t-
>> 02.txt)
>>> 
>>> --julien
>>> 
>>> Jouni wrote:
>>>> 
>>>> Just a question for my clarification. Do you mean simply taking the
>> UDP
>>>> encap + ESP format or also inheriting everything those respective
>> RFCs
>>>> say about their processing etc?
>>>> 
>>>> - JOuni
>>>> 
>>>> 
>>>> On Jan 28, 2011, at 9:18 PM, Laganier, Julien wrote:
>>>> 
>>>>> Hello again,
>>>>> 
>>>>> Thought that maybe making my question a bit more specific would
>> help:
>>>>> 
>>>>> So, why don't you simply define a UDP encapsulation to ESP, instead
>>>> of duplicating ESP functionality into your framework?
>>>>> 
>>>>> --julien
>>>>> 
>>>>> Laganier, Julien wrote:
>>>>>> 
>>>>>> Hi Jouni,
>>>>>> 
>>>>>> I understand you "follow the ESP format but feel no shame on
>>>> changing
>>>>>> it if we see a reason to do so", but I am (shamelessly ;)
>> wondering
>>>>>> about the actual reason to do so, as per one of the famous
>>>>>> Architectural Principles of the Internet documented in RFC 1958:
>>>>>> 
>>>>>> 3.2 If there are several ways of doing the same thing, choose one.
>>>>>> If a previous design, in the Internet context or elsewhere, has
>>>>>> successfully solved the same problem, choose the same solution
>>>> unless
>>>>>> there is a good technical reason not to.  Duplication of the same
>>>>>> protocol functionality should be avoided as far as possible,
>>>> without
>>>>>> of course using this argument to reject improvements.
>>>>>> 
>>>>>> Would you mind enlightening us?
>>>>>> 
>>>>>> --julien
>>>>>> 
>>>>>> jouni korhonen wrote:
>>>>>>> 
>>>>>>> Few things. The draft already states that "The Padding, Pad
>> Length,
>>>>>>> Next Header and ICV fields follow the rules of Section 2.4 to 2.8
>>>> of
>>>>>>> [RFC4303] unless otherwise stated in this document." So, we
>> follow
>>>>>>> the ESP format but feel no shame on changing it if we see a
>> reason
>>>>>>> to do so.
>>>>>>> 
>>>>>>> The reason why we chose to do it like this was two fold: 1) some
>>>>>>> ciphers etc when used would need ~equivalent encapsulation anyway.
>>>>>>> 2) if we had come up with our very own format the question on the
>>>>>>> list would have been "why not using RFC4303 encapsulation format".
>>>>>>> Actually.. the latter already happened offline.
>>>>>>> 
>>>>>>> - Jouni
>>>>>>> 
>>>>>>> 
>>>>>>> On Jan 26, 2011, at 12:48 AM, Laganier, Julien wrote:
>>>>>>> 
>>>>>>>> Hi Raj,
>>>>>>>> 
>>>>>>>>> Inline:
>>>>>>>>> 
>>>>>>>>> On 1/24/11 3:58 PM, "ext Arnaud Ebalard" <[email-masked]>
>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> To me, what the draft describes is a patchwork based on MIPv6,
>>>>>> ESP
>>>>>>> and
>>>>>>>>>> TLS. Instead of building on top of those protocols (read
>>>>>> modularity
>>>>>>>>> and
>>>>>>>>>> interoperability), it reuses (hijacks) various blocks of
>>>>>> associated
>>>>>>>>>> standards in a non-modular way. For instance, one has to
>>>>>>> reimplement
>>>>>>>>> ESP
>>>>>>>>>> in userspace to support the protocol.
>>>>>>>>> 
>>>>>>>>> We are specifying an encapsulation method in the I-D. To say
>> that
>>>>>>> one
>>>>>>>>> has to reimplement ESP in userspace is incorrect.
>>>>>>>> 
>>>>>>>> The encapsulation format you have in the I-D is:
>>>>>>>> 
>>>>>>>> 0                   1                   2                   3
>>>>>>>> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>>> |
>> |
>>>>>>>> :         IPv4 or IPv6 header (src-addr=Xa, dst-
>> addr=Ya)        :
>>>>>>>> |
>> |
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>>> |
>> |
>>>>>>>> :            UDP header (src-port=Xp,dst-
>> port=Yp)               :
>>>>>>>> |
>> |
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> -
>>>>>> --
>>>>>>> ---
>>>>>>>> |PType=8|                    SPI
>> |
>>>>>>> ^Int.
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>> |Cov-
>>>>>>>> |                      Sequence Number
>> |
>>>>>>> |ered
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> |
>>>>>> -
>>>>>>> ---
>>>>>>>> |                    Payload Data* (variable)
>> |
>>>> |
>>>>>>> ^
>>>>>>>> :
>> :
>>>> |
>>>>>>> |
>>>>>>>> |
>> |
>>>>>>> |Conf.
>>>>>>>> +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>> |Cov-
>>>>>>>> |               |     Padding (0-255 bytes)
>> |
>>>>>>> |ered*
>>>>>>>> +-+-+-+-+-+-+-+-+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> |
>>>>>>> |
>>>>>>>> |                               |  Pad Length   | Next Header
>> |
>>>> v
>>>>>>> v
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> -
>>>>>> --
>>>>>>> ---
>>>>>>>> |         Integrity Check Value-ICV   (variable)
>> |
>>>>>>>> :
>> :
>>>>>>>> |
>> |
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>>> 
>>>>>>>>    Figure 7: UDP Encapsulated Binding Management Message Format
>>>>>>>> 
>>>>>>>> Which looks like a copy/paste of the ESP specification
>> [RFC4303]:
>>>>>>>> 
>>>>>>>> 0                   1                   2                   3
>>>>>>>> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> -
>>>>>> --
>>>>>>> -
>>>>>>>> |               Security Parameters Index (SPI)
>> |
>>>>>>> ^Int.
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>> |Cov-
>>>>>>>> |                      Sequence Number
>> |
>>>>>>> |ered
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> |
>>>>>> -
>>>>>>> ---
>>>>>>>> |                    Payload Data* (variable)
>> |
>>>> |
>>>>>>> ^
>>>>>>>> ~
>> ~
>>>> |
>>>>>>> |
>>>>>>>> |
>> |
>>>>>>> |Conf.
>>>>>>>> +               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>> |Cov-
>>>>>>>> |               |     Padding (0-255 bytes)
>> |
>>>>>>> |ered*
>>>>>>>> +-+-+-+-+-+-+-+-+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> |
>>>>>>> |
>>>>>>>> |                               |  Pad Length   | Next Header
>> |
>>>> v
>>>>>>> v
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>> -
>>>>>> --
>>>>>>> ---
>>>>>>>> |         Integrity Check Value-ICV   (variable)
>> |
>>>>>>>> ~
>> ~
>>>>>>>> |
>> |
>>>>>>>> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
>> +
>>>>>>>> 
>>>>>>>>         Figure 1.  Top-Level Format of an ESP Packet
>>>>>>>> 
>>>>>>>> 
>>>>>>>> So the question is: Is your intent to provide a UDP
>> encapsulation
>>>>>>> format for the already specified ESP protocol, or to provide an
>>>>>>> alternative encapsulation format to ESP?
>>>>>>>> 
>>>>>>>> --julien
>>>>>>>> _______________________________________________
>>>>>>>> MEXT mailing list
>>>>>>>> [email-masked]
>>>>>>>> https://www.ietf.org/mailman/listinfo/mext
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> MEXT mailing list
>>>>>>> [email-masked]
>>>>>>> https://www.ietf.org/mailman/listinfo/mext
>>>>>> _______________________________________________
>>>>>> MEXT mailing list
>>>>>> [email-masked]
>>>>>> https://www.ietf.org/mailman/listinfo/mext
>>> 
>

---

From: Julien Laganier <[email-masked]>
Date: Mon, 7 Feb 2011 13:10:41 -0800

Hi Jouni,

> That was a design decision for easily to detect the type of the UDP payload. In some other cases folks have used algorithms, hash functions and such to encode more information into the SPI but we t…

Can't you use some bits at the beginning of the UDP payload instead of
overloading the SPI semantic? If so that would remove the different
SPI handling point.

> So, I'll just ask once more. If I were to use ESP format laid out in other RFC and reference to them to make sure the format processing goes right, is it OK for me then to go against all MUSTs and…

Forget about ESP-NULL. The solution to pass user-plane traffic
unprotected is to pass it clear text over your UDP encapsulation. What
is the problem with the rest of the ESP rules?

--julien

---

From: Jouni <[email-masked]>
Date: Tue, 8 Feb 2011 00:14:42 +0200

Hello Julien,

> overloading the SPI semantic? If so that would remove the different

Do you mean like RFC3948? And then e.g. reusing the non-esp marker place holder but just in different ports..? That could most likely work.

> unprotected is to pass it clear text over your UDP encapsulation. What

Good.

> is the problem with the rest of the ESP rules?

Not a problem with ESP rules per se but I just want to be sure that using RFC4303 as-is does not imply the rest of the stuff we purposely ran away.

- Jouni

---

From: Julien Laganier <[email-masked]>
Date: Wed, 9 Feb 2011 11:05:25 -0800

Hello Jouni,

Please see inline:

> Do you mean like RFC3948? And then e.g. reusing the non-esp marker place holder but just in different ports..? That could most likely work.

That's a possibility too.

What I had in mind was that you define a new UDP encapsulation (as is
done in Arnaud's M6t draft) on top of which you have IPsec SAs to
protect DSMIPv6 signaling, and possibly different IPsec SAs to protect
user plane. If user plane needs not to be protected it would just be
layered cleartext on top of the UDP encapsulation. If you need to
indicate which UDP packets contains what for the scheme to work, you
can pick a fixed number of the first bytes of the payload to encode
whatever you need.

Then you define a new key exchange as you've been doing, based on TLS,
but that key exchange establish IPsec SAs in the stack, instead of
your protocol / software duplicating ESP functionality. Security wise
it is safer, and implementation wise it is easier. On Linux, *BSD,
SunOS, PFKEY is there. Having it in Linux already covers Android,
Maemo, Meego, etc.

If we do this, you simplify the interactions between IPsec and
DSMIPv6. You no longer have interactions with IKEv2. Your system is
modular and cleaner. I believe that it would satisfy the goals you set
when working out this approach.

> Not a problem with ESP rules per se but I just want to be sure that using RFC4303 as-is does not imply the rest of the stuff we purposely ran away.

See above. If you provide the UDP encapsulation under IPsec ala M6t,
IPsec processing and DSMIPv6 processing is decoupled to the point that
your DSMIPv6 UDP tunneling code only need to check the CoA in outbound
packets (any address for BU, only registered CoA for data.) There
seems to be nothing left to run away from :-)

Please let me know what you think.

--julien