Re: [jose] New Version Notification for draft-rha-jose-hpke-encrypt-02.txt

Neil Madden <neil.e.madden@gmail.com> Wed, 24 January 2024 20:11 UTC

Return-Path: <neil.e.madden@gmail.com>
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 1E2ACC151983 for <jose@ietfa.amsl.com>; Wed, 24 Jan 2024 12:11:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level:
X-Spam-Status: No, score=-2.104 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, T_SCC_BODY_TEXT_LINE=-0.01, 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 NiEtORQMtoS0 for <jose@ietfa.amsl.com>; Wed, 24 Jan 2024 12:11:13 -0800 (PST)
Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) (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 C3351C151707 for <jose@ietf.org>; Wed, 24 Jan 2024 12:11:13 -0800 (PST)
Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2cf3191a28cso920031fa.0 for <jose@ietf.org>; Wed, 24 Jan 2024 12:11:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706127071; x=1706731871; darn=ietf.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=csTsMBoYxepS/Mtd5DIS3XtJH5ctFs99pf2sF88oMSQ=; b=nX5wgXBfqwVEhKBbGO9USr0Tr5Gjfb242WMLiK8Ta4ut8zqlr0KK+aloIF1A71mXOq oXFkscPpWPIZyLOatN2WtqOOGdManDeIFWWZzNr0Gvq0WPVyHzv7Xjoe7l7/y0mY2opE 6xwScSEUFEPff87wUApCNrndkzovRJws/17bTSd0uWT+h7HtPacsd1N8XjYQpP7E2SKW N9FRIbDskLqyJh0Vg95Qy8DnyP4l03W4iSjJJIGkWwgUM4X2QJmSBfUVwXrRIGbBo2R5 fInYJsxldN1M66lOGfw4gQ7b5QNPoUsol6ySBgok3jqGmMKnPcU2RIGbX5f5NdOCfwS0 U+KA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706127071; x=1706731871; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=csTsMBoYxepS/Mtd5DIS3XtJH5ctFs99pf2sF88oMSQ=; b=IFWB7KqSRpb5bi6Aw6RGg8T72uc4+OBQEm8dNrjfSL0hF9Bd5/3Cy8bvUtEdEYM6Bi aAh39erSQRKZXicTcs+hrmLJw7MQcIgL3F04PfVubItN9Xlh9EBS43DCnebpBZoQcAb/ SqPjE1z4YofdjiLZmiygH1Gn9Hh9fZpIVpPP428vpVq8pPMDTgHS36E7uL8mvLfisnTE Sv9qsZEwT4EvytuQpLIQulMJNLEhMLLnTS6I1PWDRfXUapHvDSFA8/hkguLtRDaedy4a LRUToDY1TG8SMq43VY5ZtUkADNBZmJpwV5ZEhJa2yf424Lzx7TlKD2UMiw6Lmwum4c/R emqg==
X-Gm-Message-State: AOJu0YxhwuNUqUoAzOtsEOodHQR1EV499Fvnl7ehrC3ZvH8IvW2+YZdh NU0ITW199UDsWCT/x+iOBuigZACi6+Q8/39BwCX7zwD/bccZ3oXL2K/1UvEgTSE=
X-Google-Smtp-Source: AGHT+IHUhw8MIeAiwv/gMieyz3yFa8Wfw19yE0hpH+Hlm2NudoiaWcpr6fPLQmEsCCN4HYVwbBI16A==
X-Received: by 2002:a2e:9586:0:b0:2cf:1325:342 with SMTP id w6-20020a2e9586000000b002cf13250342mr2305526ljh.4.1706127071105; Wed, 24 Jan 2024 12:11:11 -0800 (PST)
Received: from smtpclient.apple (180.249.143.150.dyn.plus.net. [150.143.249.180]) by smtp.gmail.com with ESMTPSA id er25-20020a056402449900b0055a829811ddsm5888839edb.48.2024.01.24.12.11.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2024 12:11:10 -0800 (PST)
From: Neil Madden <neil.e.madden@gmail.com>
Message-Id: <8B54F6D5-3470-480F-A923-CA9A5284A5C8@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_08661126-A725-49C9-B56A-D1CB2F7FC5FE"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\))
Date: Wed, 24 Jan 2024 20:11:09 +0000
In-Reply-To: <CAFpG3gfqHyoRcXW=05GpKEWdRW1un+kjUsbj4rtZ+-zr=NZdhw@mail.gmail.com>
Cc: JOSE WG <jose@ietf.org>
To: tirumal reddy <kondtir@gmail.com>
References: <170590097450.21260.16560132335128856800@ietfa.amsl.com> <CAFpG3gfqHyoRcXW=05GpKEWdRW1un+kjUsbj4rtZ+-zr=NZdhw@mail.gmail.com>
X-Mailer: Apple Mail (2.3696.120.41.1.4)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/-1rVajt_tnl2Ai-Cz3ioRI8BxtQ>
Subject: Re: [jose] New Version Notification for draft-rha-jose-hpke-encrypt-02.txt
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Jan 2024 20:11:18 -0000

I have read this document and have a few comments.

In the Introduction it states "The motivation for standardizing a public key encryption scheme [...]". But, of course, *cough*, HPKE is not a standard and so doesn't standardise anything. If you look at the nits output it is also flagging this:
  ** Downref: Normative reference to an Informational RFC: RFC 9180
I'm not convinced that HPKE is a good fit for JOSE. For example, section 9.1.2 of RFC 9180 states:

"A detailed computational analysis of HPKE's Auth mode single-shot encryption API has been done in [ABHKLR20 <https://www.rfc-editor.org/rfc/rfc9180#ABHKLR20>]. The paper defines security notions for authenticated KEMs and for authenticated public key encryption, using the outsider and insider security terminology known from signcryption [SigncryptionDZ10 <https://www.rfc-editor.org/rfc/rfc9180#SigncryptionDZ10>]. The analysis proves that DHKEM's AuthEncap()/AuthDecap() interface fulfills these notions for all Diffie-Hellman groups specified in this document."

But this is factually incorrect. What the referenced paper actually states is that one of the 4 security notions it analyses, namely Insider-Auth security, is *not* achieved by HPKE and it is in fact infeasible to achieve in HPKE's DH-AKEM. I find it quite disturbing that an RFC would misrepresent the literature in this way.

Insider-Auth security is *extremely* important in the context of something like JOSE where there are multi-recipient messages. Without it, when Alice sends a message to both Bob and Charlie, Bob can then turn around and send a forged message to Charlie that looks like it came from Alice. This is not a minor security property, it is absolutely crucial to the notion of data origin authentication! My own (now expired due to lack of interest) draft defining an authenticated public key encryption mode for JOSE went to pains to prevent this kind of attack [1] because it is so crucial. The only way to prevent it in this draft as it stands would be to also sign the content, which renders the authentication redundant.

My understanding is that HPKE doesn't address this because HPKE was designed for MLS and MLS solves it at a higher level. But JOSE doesn't, so will have to do something else instead. If you got rid of the authenticated KEM variants from this draft, then the remaining unauthenticated DHKEM variants are so similar to ECDH-ES that I wonder why we need them?

-- Neil

[1]: https://datatracker.ietf.org/doc/html/draft-madden-jose-ecdh-1pu-04#section-2.1 <https://datatracker.ietf.org/doc/html/draft-madden-jose-ecdh-1pu-04#section-2.1> 

> On 22 Jan 2024, at 05:26, tirumal reddy <kondtir@gmail.com> wrote:
> 
> Hi all,
> 
> This revision of the draft https://datatracker.ietf.org/doc/html/draft-rha-jose-hpke-encrypt <https://datatracker.ietf.org/doc/html/draft-rha-jose-hpke-encrypt> addresses comments from Illari. 
> Further comments and suggestions are welcome.
> 
> Cheers,
> -Tiru
> 
> ---------- Forwarded message ---------
> From: <internet-drafts@ietf.org <mailto:internet-drafts@ietf.org>>
> Date: Mon, 22 Jan 2024 at 10:53
> Subject: New Version Notification for draft-rha-jose-hpke-encrypt-02.txt
> To: Michael B. Jones <michael_b_jones@hotmail.com <mailto:michael_b_jones@hotmail.com>>, Tirumaleswar Reddy.K <kondtir@gmail.com <mailto:kondtir@gmail.com>>, Aritra Banerjee <aritra.banerjee@nokia.com <mailto:aritra.banerjee@nokia.com>>, Hannes Tschofenig <Hannes.Tschofenig@gmx.net <mailto:Hannes.Tschofenig@gmx.net>>, Hannes Tschofenig <hannes.tschofenig@gmx.net <mailto:hannes.tschofenig@gmx.net>>, Orie Steele <orie@transmute.industries>
> 
> 
> A new version of Internet-Draft draft-rha-jose-hpke-encrypt-02.txt has been
> successfully submitted by Tirumaleswar Reddy and posted to the
> IETF repository.
> 
> Name:     draft-rha-jose-hpke-encrypt
> Revision: 02
> Title:    Use of Hybrid Public-Key Encryption (HPKE) with Javascript Object Signing and Encryption (JOSE)
> Date:     2024-01-22
> Group:    Individual Submission
> Pages:    16
> URL:      https://www.ietf.org/archive/id/draft-rha-jose-hpke-encrypt-02.txt <https://www.ietf.org/archive/id/draft-rha-jose-hpke-encrypt-02.txt>
> Status:   https://datatracker.ietf.org/doc/draft-rha-jose-hpke-encrypt/ <https://datatracker.ietf.org/doc/draft-rha-jose-hpke-encrypt/>
> HTML:     https://www.ietf.org/archive/id/draft-rha-jose-hpke-encrypt-02.html <https://www.ietf.org/archive/id/draft-rha-jose-hpke-encrypt-02.html>
> HTMLized: https://datatracker.ietf.org/doc/html/draft-rha-jose-hpke-encrypt <https://datatracker.ietf.org/doc/html/draft-rha-jose-hpke-encrypt>
> Diff:     https://author-tools.ietf.org/iddiff?url2=draft-rha-jose-hpke-encrypt-02 <https://author-tools.ietf.org/iddiff?url2=draft-rha-jose-hpke-encrypt-02>
> 
> Abstract:
> 
>    This specification defines Hybrid public-key encryption (HPKE) for
>    use with Javascript Object Signing and Encryption (JOSE).  HPKE
>    offers a variant of public-key encryption of arbitrary-sized
>    plaintexts for a recipient public key.
> 
>    HPKE works for any combination of an asymmetric key encapsulation
>    mechanism (KEM), key derivation function (KDF), and authenticated
>    encryption with additional data (AEAD) function.  Authentication for
>    HPKE in JOSE is provided by JOSE-native security mechanisms or by one
>    of the authenticated variants of HPKE.
> 
>    This document defines the use of the HPKE with JOSE.
> 
> 
> 
> The IETF Secretariat
> 
> 
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose