Re: [Cfrg] I-D Action: draft-irtf-cfrg-hpke-06.txt

Christopher Patton <cpatton@cloudflare.com> Mon, 26 October 2020 17:05 UTC

Return-Path: <cpatton@cloudflare.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CBC5F3A0D75 for <cfrg@ietfa.amsl.com>; Mon, 26 Oct 2020 10:05:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, 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 (1024-bit key) header.d=cloudflare.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4nTp9ePckJi8 for <cfrg@ietfa.amsl.com>; Mon, 26 Oct 2020 10:05:01 -0700 (PDT)
Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 67D723A0D72 for <cfrg@ietf.org>; Mon, 26 Oct 2020 10:05:01 -0700 (PDT)
Received: by mail-qt1-x82a.google.com with SMTP id h19so7241900qtq.4 for <cfrg@ietf.org>; Mon, 26 Oct 2020 10:05:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BZeaWcPV89zHnA2kDr9CEf/McMkjtjfCN0bVL+b3D6I=; b=B6PXvzD3lyo4MqfjPyqOnffkr1/g17PImrLu/+LqC9S1LR8qN6Y9uiYuYxQDWn8S01 pWWanOdsT689gdUwYsjlBNnbhTBjp/CeqBDh5wzz+87e2dafCwFCov5pfMswQqYgDF7Z 6W9slk3aEmVJuPjavTCgdF5LCSyC+ZqbjDNB4=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BZeaWcPV89zHnA2kDr9CEf/McMkjtjfCN0bVL+b3D6I=; b=aaf9lv1x5bZiq5b6spIznTmtZ3KDHk3OsveeKaOZCRVXRDMqsnjxor5sn9E+Bk/5Fs PkreiQH80PC05IUId2yafuxYwU0zEuYruCkIHzCrqeMjDc0LjPFyeBO/BXnRCVhrjuD/ AOsLwHYQ51SzcZEeI3Y6Y2r8kbSL1QcJTJ8jFrJyYf/PjGsbqY5toimRLnQmQ3bx9T7w 6dM0J8iKV5scBrCaXyUrEwj9Lp+6bTtOZP48UaORplTVTWS2wbVAwE+ecrl5ZhqDvZeG p78+6bWJuEEhHFDQwgs5HkZmbqspdod+SlBhJiybJulNXX4k5DVQv7r4GCqpBE4ChaE1 QtBg==
X-Gm-Message-State: AOAM532WlQ5gSEOG7BHD7srdi4qYY8T9nLZqRTTqs6D4v63byF/BlQDH 20zkYK+nOgAol7JG1YZPULjsj9yUaeo6qdF6/P6rOg==
X-Google-Smtp-Source: ABdhPJzX8P8QnTzO20/ejVcg4+BOQQ1NboR2JI1fAedgb/m4fY3uqOMfc6D81ZSdn4Bp2ZdV6HFEgzcsIkt9wA8Fbpc=
X-Received: by 2002:ac8:744a:: with SMTP id h10mr18118521qtr.388.1603731900292; Mon, 26 Oct 2020 10:05:00 -0700 (PDT)
MIME-Version: 1.0
References: <CAGiyFdejssUBrs3wmQL7QVKS_YkAr4aoOjow9wOgPHfcsPv+UA@mail.gmail.com> <SJ0PR09MB684891C13A558A4E53E9DD84F3190@SJ0PR09MB6848.namprd09.prod.outlook.com>
In-Reply-To: <SJ0PR09MB684891C13A558A4E53E9DD84F3190@SJ0PR09MB6848.namprd09.prod.outlook.com>
From: Christopher Patton <cpatton@cloudflare.com>
Date: Mon, 26 Oct 2020 10:04:49 -0700
Message-ID: <CAG2Zi214vikhdR4wa=0M6Yiyw0NTeHygKqTtwT_h=r1OR+WthQ@mail.gmail.com>
To: "Dang, Quynh H. (Fed)" <quynh.dang=40nist.gov@dmarc.ietf.org>
Cc: Jean-Philippe Aumasson <jeanphilippe.aumasson@gmail.com>, "cfrg@ietf.org" <cfrg@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000003b8e2305b295ee11"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/zxE6fHep02rbz1Qq7cAukwKvYoU>
Subject: Re: [Cfrg] I-D Action: draft-irtf-cfrg-hpke-06.txt
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Oct 2020 17:05:04 -0000

Hi all,

I agree that we shouldn't discourage adoption of alternatives to HKDF.
However, I don't think the spec does so: it merely requires adherence to
the Extract-then-Expand API. There should be ways to securely "wrap"
alternatives into Extract-then-Expand API providers, perhaps at the cost of
CPU cycles. (E.g., how Noise uses Blake2b as pointed out above.)

Best,
Chris P.

On Mon, Oct 26, 2020 at 9:49 AM Dang, Quynh H. (Fed) <quynh.dang=
40nist.gov@dmarc.ietf.org> wrote:

> Hi all,
>
> I agree with JPA here.
>
> A sponge-construction hash function can be a good KDF such as a KMAC or
> SHAKE128 (or 256) (m, d) for any fixed application-specific value d where m
> is input and d is the length of the output.
>
> Regards,
> Quynh.
> ------------------------------
> *From:* Cfrg <cfrg-bounces@irtf.org> on behalf of Jean-Philippe Aumasson <
> jeanphilippe.aumasson@gmail.com>
> *Sent:* Monday, October 26, 2020 10:08 AM
> *To:* cfrg@ietf.org <cfrg@ietf.org>
> *Subject:* [Cfrg] I-D Action: draft-irtf-cfrg-hpke-06.txt
>
>
> Hi!
>
> quick comments on the new draft, as solicited by the chairs (thanks for
> reminding me of this!):
>
> as commented in my review, and as discussed more recently with Ben Lipp, I
> just find that directly defining the KDR in terms extract/expand internal
> operations will prevent the adoption of other KDFs than HKDF. The
> construction could be defined in terms of a generic KDF block and retain
> its security properties (KeySchedule() might have to be adapted).
>
> Otherwise no objection :)
>
> Cheers,
>
> JP
>
> --
>
> A New Internet-Draft is available from the on-line Internet-Drafts
> directories.
> This draft is a work item of the Crypto Forum RG of the IRTF.
>
>         Title           : Hybrid Public Key Encryption
>         Authors         : Richard L. Barnes
>                           Karthik Bhargavan
>                           Benjamin Lipp
>                           Christopher A. Wood
> Filename        : draft-irtf-cfrg-hpke-06.txt
> Pages           : 87
> Date            : 2020-10-23
>
> Abstract:
>    This document describes a scheme for hybrid public-key encryption
>    (HPKE).  This scheme provides authenticated 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) encryption function.  We provide
>    instantiations of the scheme using widely-used and efficient
>    primitives, such as Elliptic Curve Diffie-Hellman key agreement,
>    HKDF, and SHA2.
>
>
> The IETF datatracker status page for this draft is:
> https://datatracker.ietf.org/doc/draft-irtf-cfrg-hpke/
> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fdraft-irtf-cfrg-hpke%2F&data=04%7C01%7Cquynh.dang%40nist.gov%7Ce8fead0f0a784fa9b1a308d879b8cefd%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637393181948562903%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=IVt0ZuwFRX95wPmtB0d9yNbLbRCdhyfuU8PnPz3JWo4%3D&reserved=0>
>
> There is also an HTML version available at:
> https://www.ietf.org/archive/id/draft-irtf-cfrg-hpke-06.html
> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Farchive%2Fid%2Fdraft-irtf-cfrg-hpke-06.html&data=04%7C01%7Cquynh.dang%40nist.gov%7Ce8fead0f0a784fa9b1a308d879b8cefd%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637393181948562903%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=3pki68T7PGEpMxgXD3LzaPB25xF1yvAejVqP6uiCjeA%3D&reserved=0>
>
> A diff from the previous version is available at:
> https://www.ietf.org/rfcdiff?url2=draft-irtf-cfrg-hpke-06
> <https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Frfcdiff%3Furl2%3Ddraft-irtf-cfrg-hpke-06&data=04%7C01%7Cquynh.dang%40nist.gov%7Ce8fead0f0a784fa9b1a308d879b8cefd%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637393181948572867%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vaTyIy8uEMj5P2HXHy%2BiWbcsisToYr1GzilZmiuQnu4%3D&reserved=0>
>
>
> Please note that it may take a couple of minutes from the time of
> submission
> until the htmlized version and diff are available at tools.ietf.org
> <https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Ftools.ietf.org%2F&data=04%7C01%7Cquynh.dang%40nist.gov%7Ce8fead0f0a784fa9b1a308d879b8cefd%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637393181948582821%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=12%2FJbuGen2vw8OnF9UHebilkVHSK2cfkG7EuFzuqw8U%3D&reserved=0>
> .
>
> Internet-Drafts are also available by anonymous FTP at:
> ftp://ftp.ietf.org/internet-drafts/
> <https://gcc02.safelinks.protection.outlook.com/?url=ftp%3A%2F%2Fftp.ietf.org%2Finternet-drafts%2F&data=04%7C01%7Cquynh.dang%40nist.gov%7Ce8fead0f0a784fa9b1a308d879b8cefd%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C637393181948582821%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=h0TzBJysx%2B6Tahqpqtakc1007jTWpWi97DUWEqnfO4Y%3D&reserved=0>
>
>
> [Cfrg] I-D Action: draft-irtf-cfrg-hpke-06.txt  internet-drafts
> _______________________________________________
> Cfrg mailing list
> Cfrg@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg
>