Re: [IPsec] diet-esp - How do you know?

Daniel Migault <mglt.ietf@gmail.com> Tue, 24 May 2022 20:47 UTC

Return-Path: <mglt.ietf@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 0850CC2740D0 for <ipsec@ietfa.amsl.com>; Tue, 24 May 2022 13:47:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ada_mAd5Vg7a for <ipsec@ietfa.amsl.com>; Tue, 24 May 2022 13:47:45 -0700 (PDT)
Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D7C5AC2740D2 for <ipsec@ietf.org>; Tue, 24 May 2022 13:47:45 -0700 (PDT)
Received: by mail-lj1-x22d.google.com with SMTP id u7so21570851ljd.11 for <ipsec@ietf.org>; Tue, 24 May 2022 13:47:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/IRCEDszu2Q3Q5LTgVz9FAcC30tVRU+oe950kzEnpCU=; b=ABi3ZszkZ8r0NXyQSLAVwxBRs3DVBkliarQc1hTBZc0QM9rM44QQFODrHgjgw8aNXl UdbUgP+hNDk23SmEtFCxALv3FZzQFVhODjyNH3jP1BfuRmhjezL3ytA789DujgPyU9lK PmM7y4xV4k2DXwv0zSP1h1MF7kDG7dlBBB+EE0NFY3XE10ylPy1oBjq5T6K3pbMOftQP JdkQZd1evxPyhjhUFnQLSlW2oFUpDv+gcgVnAbMXdSX1ifH/ZE84/Uj/suWeTl1YmiG4 Thw23SXc6sIkhwsK7blCZJyp4wOjJQ4NF+eRtmwh8t0O+0H8KCwnWatB6uDl/rFmI8h/ csHg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/IRCEDszu2Q3Q5LTgVz9FAcC30tVRU+oe950kzEnpCU=; b=hZpj5p0Z+Gazrdxj1bsyNzx+I2FPBFhc0j5nrksf+/AuLrurd5HuDy7Vi4whQ5Af1C oH5tcPy5eKNwTbIO7z61PGNVM4gVkJDr3g05BA6/R+gmxpU+hi44HEPMOMPBb3Uu6Y7x 1Ul3baJ2wlSGblTJ5eoOA+EWZM/ils8TuB0M0lx+OKiYUETGbC0yYXRpFbqD0WBdKRLY Iu97NV7Q3P7Gl6Wp6rmlyGQgFr8orCUlEOalHpsrU+adbfxMIKtkv4nGypOL4oFzdahQ mbO1t+N2ZJiX9dd5dMtNkC1ORxXYuVsmmFyHXyWhTPshs4YW8o+jngQ1lktUrBoYnf3+ u72g==
X-Gm-Message-State: AOAM533G/EG03EcpaqY8MNZZ7j28Vl5BE76OY1wMPlgGUN680+Z7vyS/ 5ZhKAQXs03QXHlZVCiTN9mJvuZsTzM/pcMkN9DI=
X-Google-Smtp-Source: ABdhPJxe5h0ku3cbpB0jQ/pwz4PZpBmi/Gsmw2cY8Y4SABNHKkq7KIhSMyVuq4N+7TTpC3yAPO1t7ZBnNR4XWYyZRSs=
X-Received: by 2002:a2e:9f4f:0:b0:253:cee8:62a2 with SMTP id v15-20020a2e9f4f000000b00253cee862a2mr16664674ljk.107.1653425263722; Tue, 24 May 2022 13:47:43 -0700 (PDT)
MIME-Version: 1.0
References: <245277bb-6d70-dbcd-b99e-badc435b9c4d@htt-consult.com> <CAGL5yWa=hjCZD912YJPWM-x_=ChTo=yULk1P5FRfkfB9Db9+Gg@mail.gmail.com> <CADZyTknARDjj=SZmstnBqxo5hJp-NzH09a6cH5Dxj3Zg7VfyAw@mail.gmail.com> <f55061a1-b1af-8ce5-7ecc-8d7ccef0ee03@htt-consult.com>
In-Reply-To: <f55061a1-b1af-8ce5-7ecc-8d7ccef0ee03@htt-consult.com>
From: Daniel Migault <mglt.ietf@gmail.com>
Date: Tue, 24 May 2022 16:47:32 -0400
Message-ID: <CADZyTknQSiCrBvdsnjQU8OcTCRhCOBeNW0CC10xhK6cHnD+76g@mail.gmail.com>
To: Robert Moskowitz <rgm-sec@htt-consult.com>
Cc: Paul Wouters <paul.wouters=40aiven.io@dmarc.ietf.org>, IPsecME WG <ipsec@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000081c68c05dfc811ea"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/W-A9Cwtq_r4Ixgga0LJ8x4aX7f0>
Subject: Re: [IPsec] diet-esp - How do you know?
X-BeenThere: ipsec@ietf.org
X-Mailman-Version: 2.1.34
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: <https://mailarchive.ietf.org/arch/browse/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: Tue, 24 May 2022 20:47:48 -0000

The issue only comes when a gateway wants to support all sizes of SPIs 0 -
1 - 2 - 3 - 4 bytes - which is very unlikely. For a deterministic lookup, I
would suggest using IP addresses and the minimum allowed byted compressed
SPI.
If you use 2 - 3 bytes, the likelihood of collision might still be very low
to support an additional signature check.

Yours,
Daniel

On Tue, May 24, 2022 at 4:30 PM Robert Moskowitz <rgm-sec@htt-consult.com>
wrote:

> That is the 'easy' part.
>
> What does the code do when it receives an ESP packet?  How do it know that
> it is a diet-esp packet and apply the rules?
>
> Next Header just says: ESP.
>
> On 5/24/22 16:23, Daniel Migault wrote:
>
> This is correct. IKEv2 is used both to agree on the use of Diet-ESP as
> well as values to be used for the compression/decompression.
>
> Yours,
> Daniel
>
> On Tue, May 24, 2022 at 11:14 AM Paul Wouters <paul.wouters=
> 40aiven.io@dmarc.ietf.org> wrote:
>
>>
>> On Sun, May 22, 2022 at 9:20 PM Robert Moskowitz <rgm-sec@htt-consult.com>
>> wrote:
>>
>>> I think there is something else I am missing here.
>>>
>>> How does the receiving system 'know' that the packet is a diet-esp
>>> packet?
>>>
>>
>>
>> https://datatracker.ietf.org/doc/html/draft-mglt-ipsecme-ikev2-diet-esp-extension-02
>>
>> It's negotiated with IKEv2.
>>
>> I guess the IKE stack has to signal this to the ESP implementation on
>> what to expect when
>> the policy is installed ?
>>
>> Paul
>>
>> _______________________________________________
>> IPsec mailing list
>> IPsec@ietf.org
>> https://www.ietf.org/mailman/listinfo/ipsec
>>
>
>
> --
> Daniel Migault
> Ericsson
>
> _______________________________________________
> IPsec mailing listIPsec@ietf.orghttps://www.ietf.org/mailman/listinfo/ipsec
>
>
>

-- 
Daniel Migault
Ericsson