Re: [IPsec] ESP Signally to higher layers

Robert Moskowitz <rgm-sec@htt-consult.com> Mon, 23 May 2022 14:06 UTC

Return-Path: <rgm-sec@htt-consult.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 6C2DDC15E6D3 for <ipsec@ietfa.amsl.com>; Mon, 23 May 2022 07:06:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.752
X-Spam-Level:
X-Spam-Status: No, score=-3.752 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, NICE_REPLY_A=-1.857, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
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 quxE3zQzGZAg for <ipsec@ietfa.amsl.com>; Mon, 23 May 2022 07:06:25 -0700 (PDT)
Received: from z9m9z.htt-consult.com (z9m9z.htt-consult.com [23.123.122.147]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 91ECDC15E6D2 for <ipsec@ietf.org>; Mon, 23 May 2022 07:06:25 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by z9m9z.htt-consult.com (Postfix) with ESMTP id D557162776; Mon, 23 May 2022 10:05:38 -0400 (EDT)
X-Virus-Scanned: amavisd-new at htt-consult.com
Received: from z9m9z.htt-consult.com ([127.0.0.1]) by localhost (z9m9z.htt-consult.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uorvvqjQcHKT; Mon, 23 May 2022 10:05:32 -0400 (EDT)
Received: from [192.168.160.11] (unknown [192.168.160.11]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by z9m9z.htt-consult.com (Postfix) with ESMTPSA id BED376247F; Mon, 23 May 2022 10:05:30 -0400 (EDT)
Message-ID: <c34bfefa-a7e1-e38f-7f2a-322d4a4e97be@htt-consult.com>
Date: Mon, 23 May 2022 10:06:11 -0400
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0
Content-Language: en-US
To: Michael Richardson <mcr@sandelman.ca>
Cc: IPsecME WG <ipsec@ietf.org>
References: <76129f8a-9287-e19d-ec32-5c743a7afdf2@htt-consult.com> <886536.1653131601@dooku>
From: Robert Moskowitz <rgm-sec@htt-consult.com>
In-Reply-To: <886536.1653131601@dooku>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/ipsec/VIfXvnCZirnOzl6SH677Iq2BtMg>
Subject: Re: [IPsec] ESP Signally to higher layers
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: Mon, 23 May 2022 14:06:29 -0000


On 5/21/22 07:13, Michael Richardson wrote:
> Robert Moskowitz <rgm-sec@htt-consult.com> wrote:
>      > This is an item that goes back to the beginning of ESP work:
>      > Minimally, how does the higher level 'learn' that it is secure:
>
> Are you asking how *TCP* learns of this, or how an application with an open
> socket(2) learns of this?

App  TCP or UDP.

>      > Encrypted/Authenticated/CrCed...  ?
>      > And as ESP has a seq#, how might it be convied to the higher layer?
>
> Do you mean replay counter here, or did you mean SPI?

SPI SHOULD have no value to the higher layer.  It is the actual Seq # 
that may be of value.

> Preferably, never, because it will get rekeyed, so really, whatever you want
> to do really needs to be communicated abstracted to the key daemon, who will
> do the right thing, and keep track of updates to the SPI#
>
>      > Case in point:  MAVlink has a 1-byte seq# in its payload.  How might
>      > this be provided by ESP?
>
> Now I think maybe you really do mean sequence/replay counter.

Yes.

>      > https://mavlink.io/en/guide/message_signing.html
>
>      > So I have been thinking about this vis-a-vis diet-esp.  What is the
>      > mechanism/trigger that can best work across a number of higher layers
>      > to inform of operating environment and values available (seq#)?
>
>      > Is this done anywhere now?
>
> Doubtful.

MAVlink does its own seq# processing, so if I squeeze it out in 
transporting the MAVlink packet, I need to rebuild it when passing it up 
to MAVlink.  Now a formal SCHC layer SHOULD be able to do this.  One 
would think.

There are other layer 5 protocols with Seq #.  Like RTP.