Re: [COSE] Version -03 of COSE-HPKE

AJITOMI Daisuke <ajitomi@gmail.com> Thu, 02 March 2023 13:39 UTC

Return-Path: <ajitomi@gmail.com>
X-Original-To: cose@ietfa.amsl.com
Delivered-To: cose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D8735C14F724 for <cose@ietfa.amsl.com>; Thu, 2 Mar 2023 05:39:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.095
X-Spam-Level:
X-Spam-Status: No, score=-7.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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-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 gbafhA197q87 for <cose@ietfa.amsl.com>; Thu, 2 Mar 2023 05:38:58 -0800 (PST)
Received: from mail-yw1-x112f.google.com (mail-yw1-x112f.google.com [IPv6:2607:f8b0:4864:20::112f]) (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 1A72BC151551 for <cose@ietf.org>; Thu, 2 Mar 2023 05:38:58 -0800 (PST)
Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-536bbe5f888so427416477b3.8 for <cose@ietf.org>; Thu, 02 Mar 2023 05:38:58 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677764337; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=2/vM7qwVD0+gDG9kTI41ouNKbk0yI6PBJvNrCVbCjg4=; b=a5vkQvn4g9phJeEwkLvTjB3cksEX07gngh/f764qV2znDeydxee4pmtDkiwfbnR8SE uGw5NYyBe0HyceWigXOmZS1HeSkpzwQLZP2UGTNB0HMnMX8Fyn20zkTcPlGZNGxOtcu6 ssSgJUjNQOfVy+t7oa0i04DnRlkl7+mY9ivv8mhKI5iMxNplrPqwhYo+MiAJEih2nOv7 C8vej3gFLEZ4oMGvDhDmctHtkTbHY+FSGII8Ymq8Z4R01iKxBNK2P91zuklPRk85z6LG VE5AIAxox8OY8/A733cxjVQWOEMcLIJDC3TPX76t6M+CxiUVGA+NBnRzooAYJHLd+Eyb Mpsw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677764337; 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=2/vM7qwVD0+gDG9kTI41ouNKbk0yI6PBJvNrCVbCjg4=; b=5uKn9ODbXP8OBJ3knqXjGyNAoc42KzgYgNBzZrxTBMgu+O4D4miCWuIjj2HOtktLPY kDrFEWWi570CphcJgvAxNRs0fuS+K2UwKZQPBk/zA1UiB8cgeOnJJmlKJIbl6EWarA3z I/RgiinhDO84f9Rf9QaiExJ6rDtIZfQpcyp7mWZoK/x4SOdWeLuC9IYQ/hKrVq70tLzo JJ7OMysWACaPgi37s0V+zYzrCLrHGql0U0t2kBwiBlVdmoR9T4ZrkhoSh4Mi1ymi2owi plUM3HvhhXNqdMYWmpoV9obPbYgAf8IwU62pVPmIIJCNu/WjbS3lM1w/rwCyixuglBoQ 3Eqw==
X-Gm-Message-State: AO0yUKWv9LfXUr/36kNjKWx/1Juca9ueEaAwTszi27T7xSpqkpgH6hbj 9q5bun/aWXptf9EkBD9sjCY3Na6/V/M72pkg4Q==
X-Google-Smtp-Source: AK7set9OMSETWGRaB3yJrt/guyl1sFXRJBi+QYSmLqecob4OP/OFxC7MBJo+9uTQRgmQBsPko4a91zDntm8xQDxoT0c=
X-Received: by 2002:a81:431c:0:b0:52e:b22b:f99 with SMTP id q28-20020a81431c000000b0052eb22b0f99mr6277530ywa.4.1677764337183; Thu, 02 Mar 2023 05:38:57 -0800 (PST)
MIME-Version: 1.0
References: <e2bf9be4-bd44-9643-f7d4-9dc9b08c027d@gmx.net> <A1873841-3112-4C0A-8E17-AD0A59A703E1@island-resort.com>
In-Reply-To: <A1873841-3112-4C0A-8E17-AD0A59A703E1@island-resort.com>
From: AJITOMI Daisuke <ajitomi@gmail.com>
Date: Thu, 02 Mar 2023 22:38:46 +0900
Message-ID: <CAFWvErVHZp2_cOO-ktt=o8wRKaGebS4wwmLrOgDXPSX0Bst_PQ@mail.gmail.com>
To: Laurence Lundblade <lgl@island-resort.com>
Cc: Hannes Tschofenig <hannes.tschofenig@gmx.net>, "cose@ietf.org" <cose@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000055b30205f5eaf34c"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/DyA5jbZemxiJELGQvIcVWj8T8rQ>
Subject: Re: [COSE] Version -03 of COSE-HPKE
X-BeenThere: cose@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/cose>, <mailto:cose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose/>
List-Post: <mailto:cose@ietf.org>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/cose>, <mailto:cose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Mar 2023 13:39:01 -0000

>
> *Rename encapsulated_key*
> The main CBOR structure being defined here is “encapsulated_key”. I think
> it should at least have “HPKE” in its name because it clearly is only for
> HPKE. It will sit in the COSE registry. It’s clearly not any general COSE
> mechanism for encapsulating keys.
>

+1


> *Inputs to SealBase in two-layer mode*
> I think an Enc_structure (5.3 in 9052) with context “Enc_Recipient” is
> what should be given to SealBase for the aad parameter. This is not super
> clear from 9052, but I think it is right. I’ve also been reading Jim’s code
> and I think that is what it does. (There’s a few layers and occurrences of
> AAD here — the external AAD input to COSE, the AAD input to the AEAD and
> the AAD input to SealBase — none of these are the same).
> Also, I think the info parameter to SealBase here should be “”.
>

I agree.  My implementation does the same.

Best,
AJITOMI Daisuke


2023年3月2日(木) 3:28 Laurence Lundblade <lgl@island-resort.com>:

> This is probably not quite ready for detailed comments, but I did look it
> over pretty carefully. I’ve sent comments to Hannes private, but here’s two
> that may be of general interest.
>
> *Rename encapsulated_key*
> The main CBOR structure being defined here is “encapsulated_key”. I think
> it should at least have “HPKE” in its name because it clearly is only for
> HPKE. It will sit in the COSE registry. It’s clearly not any general COSE
> mechanism for encapsulating keys.
>
> *Inputs to SealBase in two-layer mode*
> I think an Enc_structure (5.3 in 9052) with context “Enc_Recipient” is
> what should be given to SealBase for the aad parameter. This is not super
> clear from 9052, but I think it is right. I’ve also been reading Jim’s code
> and I think that is what it does. (There’s a few layers and occurrences of
> AAD here — the external AAD input to COSE, the AAD input to the AEAD and
> the AAD input to SealBase — none of these are the same).
> Also, I think the info parameter to SealBase here should be “”.
>
> LL
>
>
> On Feb 27, 2023, at 10:57 AM, Hannes Tschofenig <hannes.tschofenig@gmx.net>
> wrote:
>
> Hi all,
>
>
> I have just submitted version -03 of the COSE-HPKE draft capturing the
> feedback on the mailing list from the last 6 months:
>
> https://datatracker.ietf.org/doc/html/draft-ietf-cose-hpke
>
>
> Please let me know if you think that this version is heading into the
> right direction.
>
>
> Ciao
>
> Hannes
>
>
>
>
> _______________________________________________
> COSE mailing list
> COSE@ietf.org
> https://www.ietf.org/mailman/listinfo/cose
>
>
> _______________________________________________
> COSE mailing list
> COSE@ietf.org
> https://www.ietf.org/mailman/listinfo/cose
>