Re: [CFRG] HPKE and Key Wrapping

Shay Gueron <shay.gueron@gmail.com> Tue, 31 May 2022 17:15 UTC

Return-Path: <shay.gueron@gmail.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 8A331C15AAD8 for <cfrg@ietfa.amsl.com>; Tue, 31 May 2022 10:15:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.107
X-Spam-Level:
X-Spam-Status: No, score=-2.107 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=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 BU1VXVKQKRfj for <cfrg@ietfa.amsl.com>; Tue, 31 May 2022 10:15:35 -0700 (PDT)
Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) (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 8BE38C14792E for <cfrg@irtf.org>; Tue, 31 May 2022 10:15:35 -0700 (PDT)
Received: by mail-il1-x136.google.com with SMTP id d3so10032027ilr.10 for <cfrg@irtf.org>; Tue, 31 May 2022 10:15:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=k7X3UDotftDZFN2lAJ9ewaf1enI5GccMBqmLPXFyeMc=; b=hfqqgm/jw9LyeSEwUMP571IUdA4X6V9SggCSrw8MiudD2kUnNOsAQ7wini5GJ2u4U5 vZIUQtXL02gja698Z9IvHc7KhZNvyWxIt/rz87ALJFM01iQ7mekFJKlFB8WVPRzE+Yfg uHtoTMpdYisDYhUysjiODu0YNXChvWZXd802SfqhaSqjf4nqnnoViMX0kjUYqr81YOZJ r5lNwek8vo/ZsTt3CpeerMmJ0FMWVSKPOzj6Q8MBoome9J6hqeLFPL2q/Jxys1TqUybe ojYT6vvrC6sojmv/rqeZlkxEmjj8srVSC2Hsj35cvxXOndUzdXbbn6Na1ypcTK3vg+5g Pq6A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=k7X3UDotftDZFN2lAJ9ewaf1enI5GccMBqmLPXFyeMc=; b=x1USmWxeQuGEUN9N74hHjekcpn26Oqqaq/lxpueTvIya4lREYwBKNkZjiuqOcvGvda 51nO7kFZgdr97hJ5bpOCRb8+83E+I+p2PW0fA9OCNneKxhsj1kSFIhuE44fATDp6Kw0w oG6Aq9YXBlKJmATkYzgSviFWvDt5wzPJz5lbQUoqCJs1Wo+/1aHxqZD92WJGmajlD5YB QNl0cg3tqcwr4HQ00gskTlkBUy0utTuHeCtjuQEsrhw0UYNbAbZsF8ABKHZJLjnPbU+O YNgqZNhQox2BWzLLcpmO+7Y7ATzwNYPxYBYu8eJJcJYLAmKIkd7CXzMc5o62c0cIBKXc iEWA==
X-Gm-Message-State: AOAM533gldxRhKCUhR5eLWoTHv/UbFrtwpNX+kgv2B7MN2LiPvWPkEb4 PNx/0CsKNf68iaipW1FPg0tY9jL0csfyDB54Q5U=
X-Google-Smtp-Source: ABdhPJzFA8Iz56s2xuVSXexIeoti6hUYjQUHLKsPEKdw8fdVm/mvIEOPBvFtT+JwHqG02zbtGSpxVIAoify6NeLH2qc=
X-Received: by 2002:a92:de0d:0:b0:2cd:6d7b:e12f with SMTP id x13-20020a92de0d000000b002cd6d7be12fmr31520950ilm.179.1654017334254; Tue, 31 May 2022 10:15:34 -0700 (PDT)
MIME-Version: 1.0
References: <HE1PR0701MB3050AFD941AABAB80D7EC31E891E9@HE1PR0701MB3050.eurprd07.prod.outlook.com> <7c67e7a0-ddaa-4f2e-9a1e-91af4956c0f1@beta.fastmail.com> <4627F814-4AE0-4E13-ADA3-2C30AF258385@vigilsec.com> <YkWDnvnHyJOUu3ol@LK-Perkele-VII2.locald> <C0494995-0D2E-42BE-8D21-4BB23C4E8E19@gmail.com> <aff51f72-8a3c-3172-fc91-87fcf156b4ac@lounge.org> <BE3C3092-9C44-442F-AFC8-2415B9182894@ll.mit.edu>
In-Reply-To: <BE3C3092-9C44-442F-AFC8-2415B9182894@ll.mit.edu>
From: Shay Gueron <shay.gueron@gmail.com>
Date: Tue, 31 May 2022 20:15:22 +0300
Message-ID: <CAHP81y9rkZ+swjR4DiTji786YtCCBt5Z1edY9LAJTmnZonisZA@mail.gmail.com>
To: "Blumenthal, Uri - 0553 - MITLL" <uri@ll.mit.edu>
Cc: Dan Harkins <dharkins@lounge.org>, "cfrg@irtf.org" <cfrg@irtf.org>, Shay Gueron <shay.gueron@gmail.com>
Content-Type: multipart/alternative; boundary="000000000000a91f2e05e051eb2b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/CHZ_TQZbz0QsmdE16vynvEIZZL8>
Subject: Re: [CFRG] HPKE and Key Wrapping
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.34
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: Tue, 31 May 2022 17:15:39 -0000

The thread was brought to my attention.

I am not sure what other schemes were compared to AES-SIV, in a way that
the latter had advantage over them.

However, I point out that that AES-GCM-SIV (RFC8452) handles inputs of
different lengths, AAD's, and one can choose to use it with a fixed nonce
(for wrapping keys).

I think Uri had commented about the key wrapping performance.

Regards, Shay

On Tue, May 31, 2022 at 7:51 PM Blumenthal, Uri - 0553 - MITLL <
uri@ll.mit.edu> wrote:

> I support advancement of this draft, as I think that standardizing a SIV
> mode is necessary for cryptographic protocols.
>
>
>
> Having said that, I prefer the way AES-GCM-SIV deals with keys to what
> you’re doing, but that’s secondary.
>
>
>
> Thanks!
>
> --
>
> V/R,
>
> Uri
>
>
>
> *There are two ways to design a system. One is to make it so simple there
> are obviously no deficiencies.*
>
> *The other is to make it so complex there are no obvious deficiencies.*
>
> *
>                                                                                                                    -
> C. A. R. Hoare*
>
>
>
>
>
> *From: *CFRG <cfrg-bounces@irtf.org> on behalf of Dan Harkins <
> dharkins@lounge.org>
> *Date: *Tuesday, May 31, 2022 at 12:43
> *To: *CFRG <cfrg@irtf.org>
> *Subject: *Re: [CFRG] HPKE and Key Wrapping
>
>
>
>
>   Hi,
>
>   I'd like to resurrect this thread. There seemed to be some support for
> adding an MRAE cipher to HPKE for key wrapping and also some support for
> AES-SIV being the cipher to add do to its advantages over other key
> wrapping
> schemes-- it accepts any length input without required padding out to some
> particular block size, and it accepts associated data.
>
>   At the last IETF I asked for a consensus call on
> draft-harkins-cfrg-dnhpke,
> which proposes adding AES-SIV to the HKDF AEAD registry. If we advanced
> that
> draft we'd have the permanent and readily available specification that is
> required. Can we do that? Then all we'd need is the designated expert
> to review and approve.
>
>   I guess alternatively we could point to RFC 5297 as the permanent and
> readily available specification. Then all we'd need is a designated expert.
> Still, I'd like to see if there's support to advance my draft.
>
>   regards,
>
>   Dan.
>
> On 3/31/22 4:50 AM, Neil Madden wrote:
>
>
>
> On 31 Mar 2022, at 11:34, Ilari Liusvaara <ilariliusvaara@welho.com>
> wrote:
>
>
>
> On Wed, Mar 30, 2022 at 04:15:44PM -0400, Russ Housley wrote:
>
> Martin:
>
>
> On Tue, Mar 29, 2022, at 20:05, John Mattsson wrote:
>
> Would it make sense to standardize AES-KWP for HPKE or do CFRG believe
> that AES-SIV is the future of key wrapping? Irrespectively I think the
> CFRF should produce a good recommendation on how to use HPKE for key
> wrapping.
>
>
> What is wrong with the existing HPKE cipher suites for protecting
> keying materials?  That is, aside from not carrying a NIST
> approval stamp.
>
>
> If you try to apply HPKE to the COSE or JOSE structures, it just does
> not quite fit.  However, by using HPKE to deliver a key-encryption key
> (KEK) to the recipient, the structures fit.  So, it would be really
> nice to use a Key-Wrap algorithm in HPKE to encrypt the KEK.
>
>
> Not sure about JOSE, but in COSE, the structures do fit even for direct
> encryption. COSE-HPKE does not use receipients itself, so it can go into
> cose_encrypt0, resulting in direct encryption.
>
>
>
> I’m not sure if this point is directly related to what is being proposed
> here, but I think it is worth mentioning:
>
>
>
> JOSE and COSE allow sending the same message to multiple recipients using
> key-wrapping. In the case of an authenticated KEM (AKEM), this usage
> undermines the authenticity guarantees due to the lack of Insider-Auth
> security (as per section 5.4 of https://eprint.iacr.org/2020/1499.pdf) in
> HPKE AKEM. In short, any recipient of the original message can simply take
> the unwrapped content encryption key and use it to produce a new message
> that appears to come from the original sender.
>
>
>
> This is why
> https://datatracker.ietf.org/doc/html/draft-madden-jose-ecdh-1pu-04 requires
> a compactly-committing AEAD for symmetric content encryption (DEM) and
> includes the AEAD tag in the KEM KDF computation to ensure the KEM
> encapsulation for each recipient is bound to the whole message. This
> current design was arrived at after previous discussion on the CFRG list (
> https://mailarchive.ietf.org/arch/msg/cfrg/iNoSj9g2cQ0JvDbHs4I70bfhrRc/)
> and some offline discussions.
>
>
>
> (An alternative approach is to include the AEAD tag in associated data of
> the key-wrapping process, which is another advantage of SIV-AES over AES-KW
> - the latter not supporting associated data).
>
>
>
> Kind regards,
>
>
>
> Neil
>
>
>
> _______________________________________________
>
> CFRG mailing list
>
> CFRG@irtf.org
>
> https://www.irtf.org/mailman/listinfo/cfrg
>
>
>
> --
>
> "The object of life is not to be on the side of the majority, but to
>
> escape finding oneself in the ranks of the insane." -- Marcus Aurelius
>
> _______________________________________________
> CFRG mailing list
> CFRG@irtf.org
> https://www.irtf.org/mailman/listinfo/cfrg
>