Re: [Moq] E2E encryption

Luke Curley <kixelated@gmail.com> Wed, 22 March 2023 23:56 UTC

Return-Path: <kixelated@gmail.com>
X-Original-To: moq@ietfa.amsl.com
Delivered-To: moq@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 296B6C1524AE for <moq@ietfa.amsl.com>; Wed, 22 Mar 2023 16:56:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.094
X-Spam-Level:
X-Spam-Status: No, score=-2.094 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, 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
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 tWWqyVrZDanj for <moq@ietfa.amsl.com>; Wed, 22 Mar 2023 16:56:48 -0700 (PDT)
Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) (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 30AD4C14CF1B for <moq@ietf.org>; Wed, 22 Mar 2023 16:56:48 -0700 (PDT)
Received: by mail-ed1-x52c.google.com with SMTP id cn12so34105759edb.4 for <moq@ietf.org>; Wed, 22 Mar 2023 16:56:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679529406; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3EMbkWZy44wvqbpI2g+0ZT7fe+eDo+NqWKrpUpZV2EM=; b=a2VSIA439DZBGQpNR9XWZntQ3pEFO9+a/aDuHt0bCyIJCweeUHiDShWeWvVrtaaKO+ J8amGVWIfcIfFHCtd/pSPjEFBaU7f4RwPy5Rag1H+qP9g0fXAWsLynq3zZIR2359GuNE pBkf63WzpzL2MQbNXGm5GLr05VTT9zVfrmmDPJ5n9CEXJHKaRYfp8SbL69acrW3LaF4E MOUqfGmoSpUWvY7/Wf9ygpDeTbiWON8omyUw55uln1L8RG3rABdwHVlpqzX9+3M73JZp wa5jT3eIIsSFUd14pVubRcFEyrAL/fSqc3LUEbe4dShJ29aB1wfpA5WLvLZiVU1ZeLgI 3nBA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679529406; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3EMbkWZy44wvqbpI2g+0ZT7fe+eDo+NqWKrpUpZV2EM=; b=whGxfWZTaOrFlvL4qbYPlUSAGfOZNWAon6JtQYSpFY+TyXhqbQvfWWwSerHJvlxrO0 3K8o2+xOqFi+ReHh6eltl6xNfLo5cMV9XngcZe1L3o4YhuMAMbnA8k8zS4ICjnHu6iwr zKrqQ16WTIGTANAV7IcNUQq5XMqT/c0qUZuskS/tl/7HeJiBTg6GeLa0NcMxteIsd568 5RfsAI8UQjfrR/pKeH++KqcATIceuxvsKQE74xoRxBmgDgQ/iFQJAp2zvtdZQ2ZpsvFj eWKkl7C82Lrcnm+04Wlt641/zVrkOsqGWKPyDZO2Rmwcn6cQwgxLI7A9aKkjmXeIJTel nqDA==
X-Gm-Message-State: AO0yUKULQmk0woOoXQa6P3b2q1N+F/ILEI8kEK/oho++BkCKBE31/aC/ 6wVb/W1sjjDCN2/h7KnmMePbLbZiuICAqrNDtqyabJsB
X-Google-Smtp-Source: AK7set83RuYmf3+FVsuDZ6AHTWsAvgz3PJPepaZSd+XEdwZ7LOJgfWcJjwWx76cb2hfdSRcEGp3AriHIQX1es6xlFGQ=
X-Received: by 2002:a50:c343:0:b0:4fa:cef4:a27f with SMTP id q3-20020a50c343000000b004facef4a27fmr4570419edb.2.1679529406480; Wed, 22 Mar 2023 16:56:46 -0700 (PDT)
MIME-Version: 1.0
References: <1996E649-A467-4420-8C35-F50EF60536F0@cisco.com> <CAHVo=Zmuy=AgksZM2o75dbmDWv6_nSHZw-E8T_rVEtcqgqmA+g@mail.gmail.com> <CAMRcRGSdSUy8uU+UxrhxpsbxJncKfwoZgRLvoK-FzmgB+upn6Q@mail.gmail.com> <CAHVo=Zk1h5Jen3rDr1n8jrAUsJX5K2Nnyrbb-qrHP52Vw5M=JQ@mail.gmail.com> <fd3a2219294d44a18e9c7e6c11f067ad@huawei.com> <CAAZo2nEEo2VXJKQsY9kQUxR44RLm2m1wZct7dt0pvvCP3YwVJw@mail.gmail.com> <CAMRcRGRkhWwSjryz1bWHTo_URdqZ-L0QwOY=GTkKwbf=8c1KFA@mail.gmail.com>
In-Reply-To: <CAMRcRGRkhWwSjryz1bWHTo_URdqZ-L0QwOY=GTkKwbf=8c1KFA@mail.gmail.com>
From: Luke Curley <kixelated@gmail.com>
Date: Wed, 22 Mar 2023 16:56:35 -0700
Message-ID: <CAHVo=Zngzi35_o4Oz-5rUXyA1=-ZxX3pRqrdkMBSSDieQboJbw@mail.gmail.com>
To: Suhas Nandakumar <suhasietf@gmail.com>
Cc: Chuan Ma <simonkorl0228@gmail.com>, "Shihang(Vincent)" <shihang9=40huawei.com@dmarc.ietf.org>, "Mo Zanaty (mzanaty)" <mzanaty=40cisco.com@dmarc.ietf.org>, Victor Vasiliev <vasilvv=40google.com@dmarc.ietf.org>, Cullen Jennings <fluffy@iii.ca>, MOQ Mailing List <moq@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000a9c34405f785e9ab"
Archived-At: <https://mailarchive.ietf.org/arch/msg/moq/Xgr4lAcHIrCWmbnxR08WguWuBps>
Subject: Re: [Moq] E2E encryption
X-BeenThere: moq@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Media over QUIC <moq.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/moq>, <mailto:moq-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/moq/>
List-Post: <mailto:moq@ietf.org>
List-Help: <mailto:moq-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/moq>, <mailto:moq-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 22 Mar 2023 23:56:52 -0000

Hey all,

My original idea in warp-02 is that every stream started with a HEADERS
message containing the send order, so control messages could be prioritized
alongside data messages. I'm not sure this is necessary though.


Here's my current mental model:

*Data streams are end-to-end*. The relay is unaware of the contents of the
data steam, outside of a few forwarding instructions in the header. ex.
OBJECT
*Control streams are hop-to-hop*. The relay is aware of the contents of the
control stream and uses it to change its behavior. This can include
propagating a message to an upstream depending on deduplication. ex.
SUBSCRIBE


Does this make sense? It's a similar design to HTTP/3, although without
QPACK complicating the picture.


We still might use control streams for end-to-end purposes, like
authentication, but any bulk transfers should be over a data stream. I
think we can safely say that control streams are always the highest
priority.


On Wed, Mar 22, 2023, 8:26 AM Suhas Nandakumar <suhasietf@gmail.com> wrote:

>
> On the control channel, PRs 96
> <https://github.com/kixelated/warp-draft/pull/96> and 97
> <https://github.com/kixelated/warp-draft/pull/97> does provide support
> for it. PR needs to be updated to reflect the multiple tracks in one
> subscribe/publish message, if needed.
>
> Also moq-transport
> <https://datatracker.ietf.org/doc/html/draft-nandakumar-moq-transport-00#section-4.1>
> proposes some ideas along those lines.
>
> Agree that we need to discuss the scope and usage of control and data
> streams in general.
>
> Also  on E2E encryption, we need to spend some time defining its scope
> (what aspect of OBJECT payload it applies to) and implications. For control
> messages themselves, there might be few cases where one has to carry a
> payload that is end to end encrypted and the same E2EE properties might
> apply as well.
>
>
>
>
>
>
> On Wed, Mar 22, 2023 at 5:59 AM Chuan Ma <simonkorl0228@gmail.com> wrote:
>
>> Dear All:
>>
>> I agree that we should define a control stream to offer
>> reliable transmission and be marked with the highest priority. Such a
>> stream can not only solve the problem of E2E authentication but also
>> transmit other control messages, such as updates of subscriptions. The side
>> effect mentioned in Hang's reply may be solved by leaving multiple control
>> stream channels and assigning different priorities to them. Then it is
>> possible to avoid head-of-line blocking in the control stream and helps to
>> offer a flexible extension to MoQ endpoints.
>>
>> Nevertheless, this issue heavily depends on the design of the behavior of
>> the MoQ relays. The critical question is that a relay may act differently
>> when it receives different types of OBJECTS while the data is encrypted. In
>> this discussion, we have at least two basic behaviors of a relay: changing
>> the sending order of packets and dropping the packets. If we try to solve
>> this problem by adding more flags to the OBJECT, we should first define all
>> the possible behaviors the relay can do and how to use the flag to
>> enable/disable a behavior. Considering the current MoQ's design, there may
>> be other scenarios when the relay must act differently, and we may define
>> more relay behaviors. So it may be better for us to clarify* "What kinds
>> of service the relay should offer" *and* "How the endpoint should 'ask
>> for' the transport service the relays offer*." In the current scope, I'd
>> like to say if we are trying to hide the relays from the endpoints, then we
>> should design something like control flows; if we are trying to make the
>> relays cooperate with the endpoints, then we should consider ways to change
>> the relay's action like using flags. How do you like this idea?
>>
>> Thanks,
>> Chuan Ma
>>
>> On Wed, Mar 22, 2023 at 4:20 PM Shihang(Vincent) <shihang9=
>> 40huawei.com@dmarc.ietf.org> wrote:
>>
>>> It seems like the requirement of the E2E encryption is that some
>>> message/OBJECT needs to be transmitted reliably. Are there any other
>>> messages(SUBSCRIBE/SETUP/GOAWAY/CATALOG) sharing the same reliability
>>> requirement?
>>>
>>> This is related to https://github.com/kixelated/warp-draft/issues/105
>>> proposed by Luke. We can specify a dedicated stream(say stream 0) for these
>>> messages which needs to transmitted reliably and ASAP(which means highest
>>> priority). All other streams can be used to transmit the media data OBJECT
>>> which can be dropped. The side effect of a dedicated stream is that they
>>> all share the same priority, will be delivered in order(which implies that
>>> the newer message depends on the older message). Are these side effects
>>> acceptable?
>>>
>>>
>>>
>>> Cheers,
>>>
>>> Hang
>>>
>>> *From:* Moq <moq-bounces@ietf.org> *On Behalf Of *Luke Curley
>>> *Sent:* Tuesday, March 21, 2023 7:41 AM
>>> *To:* Suhas Nandakumar <suhasietf@gmail.com>
>>> *Cc:* Mo Zanaty (mzanaty) <mzanaty=40cisco.com@dmarc.ietf.org>; Victor
>>> Vasiliev <vasilvv=40google.com@dmarc.ietf.org>; Cullen Jennings <
>>> fluffy@iii.ca>; MOQ Mailing List <moq@ietf.org>
>>> *Subject:* Re: [Moq] E2E encryption
>>>
>>>
>>>
>>> Hey Suhas,
>>>
>>>
>>>
>>> We could add an incremental (or atomic) flag. It makes sense in Mo's
>>> example; when packaging multiple frames into a single authenticated OBJECT
>>> payload. I would still add text to say that a relay SHOULD NOT buffer
>>> objects, even when flagged as atomic, because that will add latency at each
>>> hop.
>>>
>>>
>>>
>>> On an implementation detail, we could reuse the message size. A size of
>>> 0 means incremental and continues until the end of the stream, while a
>>> non-zero size means atomic and the specified number of bytes. A separate
>>> flag works too.
>>>
>>>
>>>
>>>
>>>
>>> As for auth tags, the premise of end-to-end encryption is that a
>>> middle-man (relay) cannot modify or drop any of the payload, including the
>>> signature. The signature doesn't need any special treatment and should just
>>> be part of the opaque object payload; with AEAD it's usually just appended
>>> to the ciphertext. Could you explain why you think this would be an attack
>>> vector?
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Mar 20, 2023 at 11:40 AM Suhas Nandakumar <suhasietf@gmail.com>
>>> wrote:
>>>
>>> Hey Luke,
>>>
>>> On Mon, Mar 20, 2023 at 10:49 AM Luke Curley <kixelated@gmail.com>
>>> wrote:
>>> >
>>> > On Mon, Mar 20, 2023 at 10:12 AM Mo Zanaty (mzanaty) <mzanaty=
>>> 40cisco.com@dmarc.ietf.org> wrote:
>>> >>
>>> >> The problem is if relays are blind to E2E authentication, they can
>>> make poor delivery decisions. For example, delivering most or all packets
>>> except the last packet containing the E2E auth tag, which is highly likely
>>> in a scheme like warp which starves or drops the tail of old data to send
>>> new data.
>>> >
>>> >
>>> > Just to clarify, Warp will only starve the tail of an OBJECT during
>>> congestion if you send an even more important OBJECT (decreasing send
>>> order). If you're going to put the auth tag at the end of a large object
>>> (ex. an entire GoP), then you're going to want some form of head-of-line
>>> blocking (increasing send order). Or possibly an incremental flag like
>>> HTTP/3 Priority to indicate when OBJECTs are (not) atomic.
>>>
>>> That would work if we define how to identify the incremental chunks
>>> and define where to find the authn tag.  Relays need to know this ,
>>> otherwise, there is a security issue when relays don't forward the
>>> authn tag and will be an attack vector.
>>>
>>> Thoughts ?
>>>
>>> > --
>>> > Moq mailing list
>>> > Moq@ietf.org
>>> > https://www.ietf.org/mailman/listinfo/moq
>>>
>>> --
>>> Moq mailing list
>>> Moq@ietf.org
>>> https://www.ietf.org/mailman/listinfo/moq
>>>
>>