[jose] Re: Strawperson consensus call for changes to draft-ietf-jose-hpke-encrypt-01

Orie Steele <orie@transmute.industries> Fri, 12 July 2024 22:54 UTC

Return-Path: <orie@transmute.industries>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 188AEC14F69D for <jose@ietfa.amsl.com>; Fri, 12 Jul 2024 15:54:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 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, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=transmute.industries
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 N-yi1UVgOAJU for <jose@ietfa.amsl.com>; Fri, 12 Jul 2024 15:54:16 -0700 (PDT)
Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) (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 D65BBC14F69C for <jose@ietf.org>; Fri, 12 Jul 2024 15:54:16 -0700 (PDT)
Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-2c1a4192d55so1913925a91.2 for <jose@ietf.org>; Fri, 12 Jul 2024 15:54:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=transmute.industries; s=google; t=1720824856; x=1721429656; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PRDL16eqwQ9lP3b2aP0CG0P8mc3GmsiMUruNWPJ0DmM=; b=S44jScTmiYYNpHZyyFX1swsLFBz2eYP6wk/dTEMkfkjxsmhUYIXNYYTS1nf4TM/PZQ TdLtGJ/zlCJyb8h/PaeFx/dOJtXu9d/RNmhkJ1IlLiIkiB6nH4VO5cnSkLf5S09cDTuC 6CnNvQd/cVsE1hGSFv5plGMSH93PUcVN9dANSMHgendeOakhGIFIiV6rq6Z/9VVTKIJe 1ZFBZYJwZ2iJUu0BH370bUPWePie9Koa79FIcWWOhZ8Thiq6Alv2zX2QM6xnk+cqujvl SzdUBUIHXM81rFlMa6qwsWDlHkhgTWgBXGmXPtC0XeJJeklPX26S7EIlsRrNU0Wp5PoS PfCg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720824856; x=1721429656; 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=PRDL16eqwQ9lP3b2aP0CG0P8mc3GmsiMUruNWPJ0DmM=; b=osBNVMwQyzSztp5mpeev9NgxttnTpl3Z9XnxHH7jDQbdI+Fvwa4yW9J19Hvkc5acRR m/ArJQoDP++3IhGe4GyrLuZ/UjL6PRFaTVNNL+ikZNL0Yd1eSxpNLCjqL24mMcbmX0jA qKYu1mkeNdbnd/hJsnWx3h3hNcqr9Mx2+foPCL86DhzeCTTCJfqdKfR7b6OirVJFOqc7 7/icnscOXP+q3A1Xeh6lQKjE+ogVMB8L9buKPw3uT47qh/1EvGJILHUiMJ9YdWFY6Ifa uGJtuPrtkN3Y4UgnFRWpYD3AVTOXR9Lgr0HoetlHQOx518qfiJJwLiVzwdi2umC6/wBH TqLA==
X-Gm-Message-State: AOJu0YwbXFW1QCRkMRE5VCvkaD3JZnXzE9hgmpXnyR8ELGsB6GeAzDlM TP9ltgtQpoh8BEhzapTKJ8AjdJ6XuI98j/iVQJ+RQAs9HhhsCxrK0WNCMDvz4eZGz9AiYOLLi2s bYjA5A2Lqh+uFqvP9e6emihjvpuArWXJmNo0L+w==
X-Google-Smtp-Source: AGHT+IGWv5vlHL1zAvJwMRqtk8uNmJA238a/rpqipFckWMYDK56kAJhRgP0luoZWg5KWIG+pbY/wzvUzJUvQiDWmqBc=
X-Received: by 2002:a17:90b:1d8b:b0:2c9:6751:7539 with SMTP id 98e67ed59e1d1-2ca35d535fbmr9936667a91.44.1720824855963; Fri, 12 Jul 2024 15:54:15 -0700 (PDT)
MIME-Version: 1.0
References: <CAN8C-_KEv4s2SHBYi9ZeCi+Jjxk08r9tg+sqt1wtcgnyswCBgQ@mail.gmail.com> <CA+k3eCRWtTmP9ObFjQOvhrUh3yDXwXA8tRbzT1r_Z1Z2mnjuYw@mail.gmail.com>
In-Reply-To: <CA+k3eCRWtTmP9ObFjQOvhrUh3yDXwXA8tRbzT1r_Z1Z2mnjuYw@mail.gmail.com>
From: Orie Steele <orie@transmute.industries>
Date: Fri, 12 Jul 2024 17:54:05 -0500
Message-ID: <CAN8C-_KH-=W1wj2_oFWo42hp0YfaZrKBvnLR-Aa+QSFsAo9HLQ@mail.gmail.com>
To: Brian Campbell <bcampbell@pingidentity.com>
Content-Type: multipart/alternative; boundary="00000000000042ca45061d14c2dd"
Message-ID-Hash: 5BF742BXNKAGVJPZXZ2R4MUD6ALHXIO7
X-Message-ID-Hash: 5BF742BXNKAGVJPZXZ2R4MUD6ALHXIO7
X-MailFrom: orie@transmute.industries
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-jose.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: JOSE WG <jose@ietf.org>, jose-chairs@ietf.org
X-Mailman-Version: 3.3.9rc4
Precedence: list
Subject: [jose] Re: Strawperson consensus call for changes to draft-ietf-jose-hpke-encrypt-01
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/2yjwzRoDc2WdZbJs0lftvPviYe4>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Owner: <mailto:jose-owner@ietf.org>
List-Post: <mailto:jose@ietf.org>
List-Subscribe: <mailto:jose-join@ietf.org>
List-Unsubscribe: <mailto:jose-leave@ietf.org>

Brian,

You are correct.

This is why I wrote : The working group SHALL draft text explaining what
"enc:dir" means, and how it is related to "alg".

Perhaps this might look like:

This document updates RFC7516.

This document defines a new value "dir" for "enc".

When "enc:dir" is present tag and iv are empty.

"enc:dir" can only be used with "alg" values that use an AEAD to perform
authenticated encryption on plaintext to produce ciphertext, when these
algorithms are used iv and tag are empty.

As you have just pointed out, it would be incorrect to use "enc: A128GCM"
for integrated encryption because no tag and no iv are present.

I suggest we defer discussion of the exact text the working group would
need for integrated encryption, since that is not necessary to agree to the
general approach.

If we cannot agree to writing text that explains what integrated encryption
is and how it is related to "enc" and "alg", the only other option I can
see is to drop support for integrated encryption with HPKE for JWEs.

I've incorporated your feedback, and highlighted changes in bold:

## draft-ietf-jose-hpke-encrypt-01 call topic number 1 (Yes / No):

### For HPKE JWE Integrated Encryption Mode:

The algorithm name SHALL be of the form "HPKE-P256-SHA256-A128GCM".
The "enc" value SHALL be "dir".
The working group SHALL draft text explaining what "enc:dir" means, and how
it related to "alg"*, including updating RFC7516 Section 4.1.2 as needed.*
The hpke-aad SHALL be from JWE Section 5.1 step 14.
The hpke-info SHOULD be empty.

## draft-ietf-jose-hpke-encrypt-01 call topic number 2 (Yes / No):

### For HPKE JWE Key Encryption Mode:

The algorithm name SHALL be of the form "HPKE-P256-SHA256-A128GCM".
The "enc" value SHALL be any registered AEAD here -
https://www.iana.org/assignments/jose/jose.xhtml, per section of RFC7518.
The hpke-aad SHALL be ECDH-ES FixedInfo  *(citation needed @ilari can you
provide a reference here please?) *
The hpke-info SHOULD be empty.



On Fri, Jul 12, 2024 at 5:11 PM Brian Campbell <bcampbell@pingidentity.com>
wrote:

>
>
> On Wed, Jul 10, 2024 at 9:45 AM Orie Steele <orie@transmute.industries>
> wrote:
>
>>
>> ### For HPKE JWE Integrated Encryption Mode:
>>
>
>
>> The "enc" value SHALL be "dir".
>> The working group SHALL draft text explaining what "enc:dir" means, and
>> how it related to "alg".
>>
>
> This doesn't work with RFC7516/JWE's definition of the "enc" header
> <https://datatracker.ietf.org/doc/html/rfc7516#section-4.1.2>, which
> states that the `enc` "(encryption algorithm) Header Parameter identifies
> the content encryption algorithm used to perform authenticated encryption
> on the plaintext to produce the ciphertext and the Authentication Tag. This
> algorithm MUST be an AEAD algorithm with a specified key length."
>
>
>
>
>
> *CONFIDENTIALITY NOTICE: This email may contain confidential and
> privileged material for the sole use of the intended recipient(s). Any
> review, use, distribution or disclosure by others is strictly prohibited.
> If you have received this communication in error, please notify the sender
> immediately by e-mail and delete the message and any file attachments from
> your computer. Thank you.*



-- 


ORIE STEELE
Chief Technology Officer
www.transmute.industries

<https://transmute.industries>