[COSE] Re: Call for adoption of draft-reddy-cose-jose-pqc-hybrid-hpke

Orie Steele <orie@transmute.industries> Wed, 11 December 2024 15:05 UTC

Return-Path: <orie@transmute.industries>
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 DD935C15152F for <cose@ietfa.amsl.com>; Wed, 11 Dec 2024 07:05:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.094
X-Spam-Level:
X-Spam-Status: No, score=-2.094 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_DNSWL_BLOCKED=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=ham 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 qIoE9N2x2HK2 for <cose@ietfa.amsl.com>; Wed, 11 Dec 2024 07:05:45 -0800 (PST)
Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A3A60C180B60 for <cose@ietf.org>; Wed, 11 Dec 2024 07:05:45 -0800 (PST)
Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-7fd526d4d9eso2646284a12.2 for <cose@ietf.org>; Wed, 11 Dec 2024 07:05:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=transmute.industries; s=google; t=1733929545; x=1734534345; 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=7I8+tpB0z+SkF85nXCDNTAd4SuySdhG64j3Fo+nS968=; b=AdhJrMmjmbLjhjt9VYq0YyQ4Y7d6i3jpDfJN3rwgwY2BX3U/mJ4pW0jhVzmX3FlhWW gOqtLOi/xCBygR/NJIocT1X4RJMfPtRcLyW0sQ6AdP6hbwbhXFg+STysVlSycCu2mNcI LMI04mlyol84zevuEEBHabQIotkzHImIX0HZbj9HuJ+2qkgunuQoL/ZJF5p+NGcze87R tmyVoenrayX+slYQ6UXwX/LprxiIUWxko0gn80N5gS0Llx3B19Zk5lu5RfP/cOiV6dvQ jrB/6rW2sVhL3QZaiCdxh85pFJhghxVJ0W8+0ZXCaWTizIO+ufpvO68n1wqeIL20KOtn 6cig==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733929545; x=1734534345; 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=7I8+tpB0z+SkF85nXCDNTAd4SuySdhG64j3Fo+nS968=; b=PbKZT0oCaxAgy+IseRVhwvTOthDuzFDbFkb4343iUlxm1abroNBqfiU+1ELTkmfziZ kBeWWOrv4XtWbRYkT4Q1wc8gS6x48zSlRaYoj8ws+jvNxUcMH3VgQsEAP1vfVW13u1Tm V+8pcK7s1RpnD6DfiQNe0ug+B6roICIg9f9OV5FAtSXIhRe6Bq9HVs9/t5JlelOM9sad 6nSALgogG/8EstVnmSYKVDTIKP2/nJM0UJXODoW7rwxKDwspQljTa6z633qP+ASwHCQ8 L+foqPuN9wLgsbIBTO3FsIW6ZcNjX5Gaish1Lbm9GM9HI4Q46ZQptyWbZWHjSDFztoug nqGw==
X-Forwarded-Encrypted: i=1; AJvYcCUNc3htPVxVzH1hto0flQ+vG2otTBtSXg+k2PiqlrqUR2z3VfJmz8k/4jm13NU6BJHRupt/@ietf.org
X-Gm-Message-State: AOJu0Yw7xMm37G3btiDSM60OKbvQJSkR5xkATdfV+gQ/np5XnkPcPHP+ HpX4Lwa3BLNATH8sMy0ikTPeWBfTkpunXCYd30FDyrkxwiwrrfy2Ayf4XlHs6xQWCwUvEcMw8cQ I4flD3Z3Q85jyAjr0iJ1RVKJQMZXcpaesQj9hNQ==
X-Gm-Gg: ASbGncsTNOl7mVSLhfhhW+yaPgiB6rUZJk+jghH2WbQViuwa3g3S75DFZNXoCN5FLQQ zSJuZjo3dNJscDlkgHF+f3+cBhlFnGDah+3jKIYBM92x2spOHCuTpbCikULbfObmFrULZ
X-Google-Smtp-Source: AGHT+IE/XCFCCnLtr2Bti3KhlCfSZcMLY8fQSaJ+paUU54D727DW7otcc30xzX4Tueck2IzP08PDN6d3DFryDIaEoMc=
X-Received: by 2002:a17:90b:4c84:b0:2ee:8427:4b02 with SMTP id 98e67ed59e1d1-2f13930c5afmr321956a91.28.1733929544721; Wed, 11 Dec 2024 07:05:44 -0800 (PST)
MIME-Version: 1.0
References: <BN6PR08MB349180570BA3D1CA2EB7EDC1B75D2@BN6PR08MB3491.namprd08.prod.outlook.com> <PH7PR02MB9292AA522AB0801BFE9F64E4B72B2@PH7PR02MB9292.namprd02.prod.outlook.com> <CAFpG3gf2ShpjgZ=be_EHWghbR7ufc9WgT1X5BVsfMWpUggRNEA@mail.gmail.com> <PH7PR02MB9292C512570A8768F794C8CAB7352@PH7PR02MB9292.namprd02.prod.outlook.com> <CAN8C-_K4H+A+sRGQRd1WA=K5+c4GnxWKN8GifC59403KpdNc_A@mail.gmail.com> <CAFpG3gfcrCniYrw_mdZ9X+_UA0m8fzfEzFu6QNMRwYDTpWBM9Q@mail.gmail.com> <CAN8C-_JLoPpWJgyi+PHhwWdLQ5nft2SY6V66xsJM3pLOo3x_Xg@mail.gmail.com> <CAFpG3gdX7r0_O-CMg=RvokjpNe4-LeYsRKbY5GDvxnA_RAuXaA@mail.gmail.com> <CAEEbLAZFE7vhUH5e4dWNwp+HOXmGc9G17E=3UN68iCqks3NUQg@mail.gmail.com> <CAN8C-_+tU2eBigZwQkEgFjOj0sukcXJ_Gjt=LDhO0ai698+bFQ@mail.gmail.com> <CAFpG3ge-ibk2tGyDStnE9avvr-V3wVvStKk0w_O=UnkTZS2pzg@mail.gmail.com> <CAFpG3gdLL7puWvQWdLwdpez2Zz5qSBmH0wditL76=aF+nEq3qg@mail.gmail.com> <CAFpG3gfXhYvGmAh+Qby93rnKprLOv5bMhY77LUVC4dg6kOZAMA@mail.gmail.com>
In-Reply-To: <CAFpG3gfXhYvGmAh+Qby93rnKprLOv5bMhY77LUVC4dg6kOZAMA@mail.gmail.com>
From: Orie Steele <orie@transmute.industries>
Date: Wed, 11 Dec 2024 09:05:33 -0600
Message-ID: <CAN8C-_+tY+UKx+Pj5vysVtzs8=-jQbiE1MZ+18F8g7nDnigJdA@mail.gmail.com>
To: tirumal reddy <kondtir@gmail.com>
Content-Type: multipart/alternative; boundary="00000000000094461d0628ffeec4"
Message-ID-Hash: IAHMWXW2ZEQOE4G4DQWGQM6GL4BIM3HB
X-Message-ID-Hash: IAHMWXW2ZEQOE4G4DQWGQM6GL4BIM3HB
X-MailFrom: orie@transmute.industries
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-cose.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Sophie Schmieg <sschmieg@google.com>, Michael Jones <michael_b_jones@hotmail.com>, "cose@ietf.org" <cose@ietf.org>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [COSE] Re: Call for adoption of draft-reddy-cose-jose-pqc-hybrid-hpke
List-Id: CBOR Object Signing and Encryption <cose.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/cose/RdOJm4pjIm9s9WpclhtUfWoF3YI>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cose>
List-Help: <mailto:cose-request@ietf.org?subject=help>
List-Owner: <mailto:cose-owner@ietf.org>
List-Post: <mailto:cose@ietf.org>
List-Subscribe: <mailto:cose-join@ietf.org>
List-Unsubscribe: <mailto:cose-leave@ietf.org>

Thanks for addressing my comments.

I am happy to contribute some data model examples for JWE and COSE Encrypt
if I can get some time to code them up.

Modulo the ongoing conversation regarding short names for HPKE algorithms,
this is looking ready to go from my side.

Regards,

OS


On Wed, Dec 11, 2024 at 12:30 AM tirumal reddy <kondtir@gmail.com> wrote:

> Illari, Orie, and Mike P, could you please confirm if your comments have
> been addressed in the latest version of the draft
> draft-reddy-cose-jose-pqc-hybrid-hpke
> <https://datatracker.ietf.org/doc/html/draft-reddy-cose-jose-pqc-hybrid-hpke>
>  ?
>
> -Tiru
>
> On Mon, 9 Dec 2024 at 15:53, tirumal reddy <kondtir@gmail.com> wrote:
>
>> Hi all,
>>
>> I have published a revised draft (
>> https://www.ietf.org/archive/id/draft-reddy-cose-jose-pqc-hybrid-hpke-05.html)
>> which addresses all comments raised, particularly from Orie and Ilari.  The
>> draft appears ready for adoption.
>>
>> Cheers,
>> -Tiru
>> On Fri, 6 Dec 2024 at 15:36, tirumal reddy <kondtir@gmail.com> wrote:
>>
>>> Hi Orie,
>>>
>>> I raised a PR
>>> https://github.com/tireddy2/Hybrid-KEM-with-COSE-JOSE/pulls to use
>>> "AKP".
>>>
>>> Cheers,
>>> -Tiru
>>>
>>> On Thu, 5 Dec 2024 at 04:05, Orie Steele <orie@transmute.industries>
>>> wrote:
>>>
>>>> Changing "crv" is indeed not possible at this point.... but we are not
>>>> required to use "crv" to express pqc or hybrid keys.
>>>>
>>>> The document that enables an "alg" to be used in a message can also
>>>> specify which "kty" and other parameters are required to be present when
>>>> that alg is expressed in a key.
>>>>
>>>> We are comparing:
>>>>
>>>> ### Option A
>>>>
>>>> const jwk = {
>>>>     kty: "AKP", // mandatory
>>>>     alg: "X-Wing", // mandatory
>>>>     pub: "4iNrNajCSz...tmrrIzQSQQO9lNA", // mandatory
>>>>     priv: "f5wrpOiP...rPpm7yY", // mandatory
>>>> };
>>>>
>>>> ### Option B
>>>>
>>>> const jwk = {
>>>>     kty: "OKP", // mandatory
>>>>     crv: "X-Wing", // mandatory
>>>>     alg: "X-Wing", // optional
>>>>     x: "4iNrNajCSz...tmrrIzQSQQO9lNA", // mandatory
>>>>     d: "f5wrpOiP...rPpm7yY" // mandatory
>>>> };
>>>>
>>>> I'm saying let's go with Option A.
>>>>
>>>>
>>>> On Wed, Dec 4, 2024 at 4:22 PM Sophie Schmieg <sschmieg@google.com>
>>>> wrote:
>>>>
>>>>> I would really like to avoid a reality where someone uses the separate
>>>>> parts of an X-Wing key in their own primitives, that way lies madness and
>>>>> vulnerabilities. COSE should treat hybrids just like any other algorithm,
>>>>> and pretend to not know anything about how the opaque blob of bytes
>>>>> operates.
>>>>> As for unfortunate naming decisions, there is some precedent here,
>>>>> with TLS calling everything a group. Kind of unfortunate and "algorithm
>>>>> parameter" or similar would have been the far better term for it, but I
>>>>> somewhat assume that changing this name at this point is infeasible. (An
>>>>> overly pendadic person might point out though, that Z[X]/(X^256+1)^3 is, as
>>>>> a module of a number field order, by definition still a group, and that
>>>>> Z[X](X^256+1) has Dedekind dimension one, which means that it would be fair
>>>>> to say that at least Spec Z[X]/(X^256+1) is a curve, so we are still
>>>>> talking about a vector bundle over a curve)
>>>>>
>>>>> On Wed, Dec 4, 2024 at 6:25 AM tirumal reddy <kondtir@gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Thanks Orie for valuable inputs, raise PRs for both the drafts, see
>>>>>> https://github.com/tireddy2/Hybrid-KEM-with-COSE-JOSE/pull/4
>>>>>> and
>>>>>> https://github.com/ietf-wg-jose/draft-ietf-jose-hpke-encrypt/pull/11
>>>>>> .
>>>>>>
>>>>>> On Tue, 3 Dec 2024 at 20:08, Orie Steele <orie@transmute.industries>
>>>>>> wrote:
>>>>>>
>>>>>>> Sure, but that is a problem for:
>>>>>>>
>>>>>>> https://datatracker.ietf.org/doc/draft-ietf-cose-hpke/
>>>>>>> https://datatracker.ietf.org/doc/draft-ietf-jose-hpke-encrypt/
>>>>>>>
>>>>>>> Consider what the example you gave above means in a pre-hpke world:
>>>>>>>
>>>>>>> {
>>>>>>>       "kty": "OKP",
>>>>>>>       "crv": "X25519",
>>>>>>>       "algorithms": ["ECDH-ES+A128KW", "ECDH-ES+A256KW"],
>>>>>>>       "x": "KIWi1p4buN7...N8zkhfF8pGs",
>>>>>>> }
>>>>>>>
>>>>>>> The algorithms in the key are for key establishment / key
>>>>>>> wrapping... not content encryption.
>>>>>>>
>>>>>>> HPKE is adding the idea of enabling "direct integrated encryption".
>>>>>>> ... and in doing so, enabling you to use a key wrapping algorithm
>>>>>>> which is also a content encryption algorithm and which is an hpke aead.
>>>>>>> If that's a bad idea, we are not making it better by adding PQ/T
>>>>>>> hybrids to it, or enabling multiple HPKE suites to be used for the same KEM
>>>>>>> key.
>>>>>>>
>>>>>>> https://datatracker.ietf.org/doc/html/rfc9180#name-kem-key-reuse
>>>>>>>
>>>>>>> So while HPKE might allow the same kem key to be used with multiple
>>>>>>> AEADs, there is no reason that JOSE and COSE should allow it...
>>>>>>> *Because this use case is solved for in the 2 layer constructions in
>>>>>>> JOSE and COSE.*
>>>>>>>
>>>>>>> I consider it to be a bad idea to advertise multiple key encryption
>>>>>>> / key wrapping algorithms for a single kem key pair.
>>>>>>>
>>>>>>> Let's look at a complete example of X-Wing in JOSE starting with the
>>>>>>> recipient public key:
>>>>>>>
>>>>>>> {
>>>>>>>     "kty": "AKP",
>>>>>>>     "kid":
>>>>>>> "urn:ietf:params:oauth:jwk-thumbprint:sha-256:S6AXfdU_6Yfzvu0KDDJb0sFuwnIWPk6LMTErYhPb32s",
>>>>>>>     "alg": "HPKE-XWING-SHA256-A256GCM",
>>>>>>>     "pub": "KIWi1p4buN7...N8zkhfF8pGs",
>>>>>>>     "priv": "i20zlCBQr0...JsShVkf3q4qUc"
>>>>>>> }
>>>>>>>
>>>>>>> ^ such a key can be used for both integrated encryption and 2 key
>>>>>>> encryption in both JOSE and COSE.
>>>>>>>
>>>>>>> You can encrypt directly to this key using A256GCM,
>>>>>>> and indirectly by using HPKE-XWING-SHA256-A256GCM to encrypt a
>>>>>>> content encryption key, and then using any of the algorithms registered
>>>>>>> here:
>>>>>>>
>>>>>>>
>>>>>>> https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms
>>>>>>> ... that support "enc" ... (ChaCha20Poly1305 is not in this registry btw).
>>>>>>>
>>>>>>> ## Integrated Encryption (X-Wing HPKE JWT)
>>>>>>>
>>>>>>> {
>>>>>>>   "protectedHeader": {
>>>>>>>     "alg": "HPKE-XWING-SHA256-A256GCM",
>>>>>>>     "enc": "dir",
>>>>>>>     "kid": "
>>>>>>> urn:ietf:params:oauth:jwk-thumbprint:sha-256:S6AXfdU_6Yfzvu0KDDJb0sFuwnIWPk6LMTErYhPb32s
>>>>>>> "
>>>>>>>   },
>>>>>>>   "payload": {
>>>>>>>     "urn:example:claim": true,
>>>>>>>     "iss": "urn:example:issuer",
>>>>>>>     "aud": "urn:example:audience",
>>>>>>>     "iat": 1729785491,
>>>>>>>     "exp": 1729792691
>>>>>>>   }
>>>>>>> }
>>>>>>>
>>>>>>> ## Key Encryption (Multiple recipients, using the same content
>>>>>>> encryption algorithm)
>>>>>>>
>>>>>>> {
>>>>>>>   "protected": "eyJlbmMiOiJBMTI4R0NNIn0", // { "enc" : "A128GCM" }
>>>>>>>   "iv": "ZL0HDvZJizA6vyTV",
>>>>>>>   "ciphertext": "Oq26x9vppULrGNzCn2j...BgQpgJPchg0eWNmgv4Ozi5I",
>>>>>>>   "tag": "ULnlOiJRYfCzM_r5j9sLEQ",
>>>>>>>   "aad": "cGF1bCBhdHJlaWRlcw",
>>>>>>>   "recipients": [
>>>>>>>     {
>>>>>>>       "encrypted_key": "G3HmlpOgA4H...w7svDwUqvNR",
>>>>>>>       "header": {
>>>>>>>         "kid": "urn:ietf:params:oauth:jwk-thumbprint:sha-256:
>>>>>>> cxQC_lWt22BIjH5AWSLHCZk_f-mU3-W4Ztcu5-ZbwTk",
>>>>>>>         "alg": "ECDH-ES+A128KW",
>>>>>>>         "epk": {
>>>>>>>           "kty": "OKP",
>>>>>>>           "crv": "X25519",
>>>>>>>           "x": "JnGWSQ90hlt0H7..._Dn_CkLzE",
>>>>>>>         }
>>>>>>>       }
>>>>>>>     },
>>>>>>>     {
>>>>>>>       "encrypted_key": "pn6ED0ijngCiWF8...mRF7QarTVfuWj6dw",
>>>>>>>       "header": {
>>>>>>>         "alg": "HPKE-XWING-SHA256-A256GCM",
>>>>>>>         "kid":
>>>>>>> "urn:ietf:params:oauth:jwk-thumbprint:sha-256:S6AXfdU_6Yfzvu0KDDJb0sFuwnIWPk6LMTErYhPb32s",
>>>>>>>         "ek":
>>>>>>> "BI41YDnhTTI6jSd7T62rLwzC...X9UXDw_3ylbXTiYWmPXl2fNmr4BeQ"
>>>>>>>       }
>>>>>>>     }
>>>>>>>   ]
>>>>>>> }
>>>>>>>
>>>>>>> Some comments on kem key reuse:
>>>>>>>
>>>>>>> In the example above, assume the X25519 ECDH-ES+A128KW part is to
>>>>>>> the x25519 component of the X-Wing key.
>>>>>>> When a CRQC breaks ECDH-ES, the encrypted content encryption key is
>>>>>>> broken, and the attacker can ignore x-wing completely, and still recover
>>>>>>> the plaintext.
>>>>>>> This remains true when any recipient in a 2 layer uses any of the
>>>>>>> traditional 2 layer algorithms in the JOSE and COSE registries today
>>>>>>> (except for psk stuff mixed into kdfs).
>>>>>>>
>>>>>>> In the case of direct encryption to the x25519 component of an
>>>>>>> x-wing key, the plaintext is also recovered.
>>>>>>>
>>>>>>> The only way to protect against both modes is to use X-Wing for both
>>>>>>> integrated encryption and key encryption and to always use the full x-wing
>>>>>>> algorithm with a given x-wing key, and in the case of multiple recipients,
>>>>>>> to ensure that each recipient is using a PQ key encryption / key wrapping
>>>>>>> algorithm.... because in 2 layer breaking a single recipient encrypted
>>>>>>> content encryption key recovers plaintext.
>>>>>>>
>>>>>>> OS
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Dec 3, 2024 at 6:57 AM tirumal reddy <kondtir@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Thanks Orie for the detailed explanation. I understand your
>>>>>>>> suggestion to use "AKP" instead of "OKP," but "AKP" has limitations,
>>>>>>>> particularly with the HPKE PQ/T scheme. For example, in the HPKE, a single
>>>>>>>> key agreement mechanism can be paired with multiple AEAD algorithms,
>>>>>>>> resulting in unique cryptographic algorithm identifiers. For instance:
>>>>>>>>
>>>>>>>>    - HPKE-XWING-SHA256-ChaCha20Poly1305
>>>>>>>>    - HPKE-XWING-SHA256-AES256GCM
>>>>>>>>
>>>>>>>> To address this, the key type "AKP" would need to be extended to
>>>>>>>> accommodate multiple algorithms. A possible JSON representation could look
>>>>>>>> like this:
>>>>>>>>
>>>>>>>> {
>>>>>>>>     "kty": "AKP",
>>>>>>>>     "kid": "01",
>>>>>>>>     "algorithms": [
>>>>>>>>         "HPKE-XWING-SHA256-ChaCha20Poly1305",
>>>>>>>>         "HPKE-XWING-SHA256-AES256GCM"
>>>>>>>>     ],
>>>>>>>>     "key_ops": [
>>>>>>>>         "deriveBits",
>>>>>>>>         "wrapKey"
>>>>>>>>     ]}
>>>>>>>>
>>>>>>>> -Tiru
>>>>>>>>
>>>>>>>> On Tue, 3 Dec 2024 at 02:25, Orie Steele <orie@transmute.industries>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://author-tools.ietf.org/iddiff?url1=draft-reddy-cose-jose-pqc-hybrid-hpke-03&url2=draft-reddy-cose-jose-pqc-hybrid-hpke-04&difftype=--hwdiff
>>>>>>>>>
>>>>>>>>> Further comments:
>>>>>>>>>
>>>>>>>>> X-Wing is not an Elliptic Curve.
>>>>>>>>>
>>>>>>>>> X-Wing keys using OKP and (ab)using the "crv" parameter to mean
>>>>>>>>> "curve with parameters + lattice with parameters"... is something I
>>>>>>>>> really hope we can decide not to do.
>>>>>>>>>
>>>>>>>>> As I said in
>>>>>>>>> https://mailarchive.ietf.org/arch/msg/cose/LMh6LpT5aqF5m47dmQ_roWU18eM/
>>>>>>>>>
>>>>>>>>> It would be nice to agree to use keys for algorithms, and to use
>>>>>>>>> AKP for ML-KEM and ML-DSA, and X-Wing with HPKE, and X-Wing without HPKE...
>>>>>>>>> and all of this is possible with the use of the AKP key type with fully
>>>>>>>>> specified algorithms.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://datatracker.ietf.org/doc/html/draft-ietf-cose-dilithium-04#name-algorithm-key-pair-type
>>>>>>>>>
>>>>>>>>> Obviously I disagree with Ilari on this point.
>>>>>>>>> .... however, I hope we can agree that whatever we do for ML-DSA,
>>>>>>>>> it will work for ML-KEM and X-Wing, and HPKE... or whatever CRFG comes up
>>>>>>>>> with next.
>>>>>>>>>
>>>>>>>>> *In summary, it's nice that the HPKE algorithms have been added,
>>>>>>>>> but I object to the key representation using OKP.*
>>>>>>>>>
>>>>>>>>> Motivation for my objection to the use of OKP for ML-KEM keys:
>>>>>>>>>
>>>>>>>>> Consider that OKP is commonly considered reserved for "elliptic
>>>>>>>>> curve points", as noted in
>>>>>>>>> https://datatracker.ietf.org/doc/html/rfc8152#section-12.4.2
>>>>>>>>>
>>>>>>>>> https://www.rfc-editor.org/rfc/rfc8037.html#section-2
>>>>>>>>>
>>>>>>>>>    Note: Do not assume that there is an underlying elliptic curve,
>>>>>>>>>    despite the existence of the "crv" and "x" parameters.  (For
>>>>>>>>>    instance, this key type could be extended to represent
>>>>>>>>> Diffie-Hellman
>>>>>>>>>    (DH) algorithms based on hyperelliptic surfaces.)
>>>>>>>>>
>>>>>>>>> It does not matter how many times I read the note above, the
>>>>>>>>> normative MUST says:
>>>>>>>>>
>>>>>>>>>   o  The parameter "crv" MUST be present and contain the subtype
>>>>>>>>> of the
>>>>>>>>>       key (from the "JSON Web Elliptic Curve" registry).
>>>>>>>>>
>>>>>>>>> This means we are required to put things that are not curves in a
>>>>>>>>> registry for curves....
>>>>>>>>>
>>>>>>>>> If the algorithm param "alg" is not mandatory for an X-Wing key,
>>>>>>>>> can I use the same key for ML-KEM and X25519 and X-Wing?
>>>>>>>>> Do I have to put "alg" in the key, even though it's optional (in
>>>>>>>>> OKP) to signal a safer use pattern?
>>>>>>>>> If I encrypt with X25519 to an X-Wing key that has no "alg"
>>>>>>>>> parameter, what happens?... is it ok, if I use the X25519 component to
>>>>>>>>> decrypt? it works... is this legal?
>>>>>>>>>
>>>>>>>>> {
>>>>>>>>>       "kty": "OKP",
>>>>>>>>>       "crv": "X-Wing", // not a curve... just means x and d cannot
>>>>>>>>> be validated... unless you know the intended algorithm
>>>>>>>>>       "alg": "ECDH-ES+A128KW", // HPKE-XWING-SHA256-AES256GCM
>>>>>>>>> // HPKE-X25519-SHA256-CHACHA20POLY1305
>>>>>>>>>       "x": "KIWi1p4buN7...N8zkhfF8pGs", // 2 public keys
>>>>>>>>>       "d": "i20zlCBQr0...JsShVkf3q4qUc" // 2 private keys or a
>>>>>>>>> single seed for both private keys
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> The thumbprints will be different ...
>>>>>>>>> https://datatracker.ietf.org/doc/html/draft-ietf-cose-key-thumbprint-06#name-octet-key-pair-okp
>>>>>>>>>
>>>>>>>>> Even if the same private key can decrypt messages to each public
>>>>>>>>> key that contains "somewhere (no validation)" the necessary components....
>>>>>>>>> The thumbprint for a hybrid public key should include the
>>>>>>>>> algorithm used to construct the hybrid, not just the public keys used with
>>>>>>>>> any component algorithms or the hybrid.
>>>>>>>>>
>>>>>>>>> Either we should scrap the AKP concept and use OKP as Ilari
>>>>>>>>> suggested.
>>>>>>>>> ... or we should not use OKP for new "subtype"s... and especially
>>>>>>>>> not for hybrids.
>>>>>>>>>
>>>>>>>>> I don't know if this comment should gate working group adoption,
>>>>>>>>> but it certainly seems it should gate a WGLC for either document that
>>>>>>>>> references ML-KEM / ML-DSA .
>>>>>>>>> Thanks to Russ, Neil and others who gave WGLC feedback on AKP and
>>>>>>>>> ML-DSA for JOSE and COSE, I am tracking your comments here:
>>>>>>>>> https://github.com/cose-wg/draft-ietf-cose-dilithium/issues but
>>>>>>>>> have not yet addressed them.
>>>>>>>>>
>>>>>>>>> Ilari, Hannes and Tiru, please feel free to file a WGLC comment on
>>>>>>>>> the use of AKP in ML-DSA.
>>>>>>>>>
>>>>>>>>> Whatever the outcome, there should be alignment on seeds, private
>>>>>>>>> keys, public keys and algorithms for lattice and hybrid PQC (ML-DSA /
>>>>>>>>> ML-KEM / X-Wing)
>>>>>>>>>
>>>>>>>>> "pub" is better than "x"
>>>>>>>>>
>>>>>>>>> "priv" is better than "d"
>>>>>>>>>
>>>>>>>>> "alg" should have been mandatory in keys,
>>>>>>>>> ... and forbidden in headers ( a ship that has sailed, and can't
>>>>>>>>> be fixed for EC2 / OKP keys, or JWE / COSE Encrypt envelopes )...
>>>>>>>>>
>>>>>>>>> *...things that are not elliptic curves do not belong in a
>>>>>>>>> registry for elliptic curves...*
>>>>>>>>>
>>>>>>>>> I will die on these hills. If I'm in the rough, it would be good
>>>>>>>>> to know.
>>>>>>>>>
>>>>>>>>> OS
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Mon, Dec 2, 2024 at 11:11 AM Michael Jones <
>>>>>>>>> michael_b_jones@hotmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Ilari, Orie, and Mike P., do you believe that your comments on
>>>>>>>>>> the previous draft have been addressed in this one?  If not, what further
>>>>>>>>>> changes would you suggest?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thanks all,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- Mike
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *From:* tirumal reddy <kondtir@gmail.com>
>>>>>>>>>> *Sent:* Monday, December 2, 2024 5:29 AM
>>>>>>>>>> *To:* Michael Jones <michael_b_jones@hotmail.com>
>>>>>>>>>> *Cc:* cose@ietf.org
>>>>>>>>>> *Subject:* Re: [COSE] Re: Call for adoption of
>>>>>>>>>> draft-reddy-cose-jose-pqc-hybrid-hpke
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> The revised draft
>>>>>>>>>> https://www.ietf.org/archive/id/draft-reddy-cose-jose-pqc-hybrid-hpke-04.html
>>>>>>>>>> addresses all the comments raised during the WG adoption call. Regarding
>>>>>>>>>> Michael's comment on the terms 'traditional' and 'Post-Quantum,' this issue
>>>>>>>>>> has been discussed in the PQUIP WG. However, no decision has been made to
>>>>>>>>>> change the terminology, and this issue is beyond the scope of this
>>>>>>>>>> document
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -Tiru
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Sat, 30 Nov 2024 at 22:42, Michael Jones <
>>>>>>>>>> michael_b_jones@hotmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>> Only two replies to the call for adoption clearly stated that
>>>>>>>>>> they favored adoption.  Whereas more messages were sent than that with
>>>>>>>>>> critiques of the draft.  Therefore, the draft is not adopted in its present
>>>>>>>>>> form.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> The chairs suggest that the authors update the specification to
>>>>>>>>>> address the feedback from Ilari, Orie, Mike P., and Michael R. and publish
>>>>>>>>>> a new draft, and then ask for feedback on the revised draft on the mailing
>>>>>>>>>> list.  Following that, we can consider a call for adoption of the revised
>>>>>>>>>> draft.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> For the chairs,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- Mike
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> *From:* Michael Jones
>>>>>>>>>> *Sent:* Friday, November 8, 2024 7:04 AM
>>>>>>>>>> *To:* cose@ietf.org
>>>>>>>>>> *Subject:* Call for adoption of
>>>>>>>>>> draft-reddy-cose-jose-pqc-hybrid-hpke
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Per discussions at the IETF 121 COSE working group meeting, this
>>>>>>>>>> note starts a two-week call for adoption of the PQ/T Hybrid KEM: HPKE with
>>>>>>>>>> JOSE/COSE specification.  Please let us know whether you are in favor of
>>>>>>>>>> adoption or not by Friday, November 22, 2024.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Thank you,
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -- Mike & Ivo
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> COSE mailing list -- cose@ietf.org
>>>>>>>>>> To unsubscribe send an email to cose-leave@ietf.org
>>>>>>>>>>
>>>>>>>>>> _______________________________________________
>>>>>>>>>> COSE mailing list -- cose@ietf.org
>>>>>>>>>> To unsubscribe send an email to cose-leave@ietf.org
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ORIE STEELE
>>>>>>>>> Chief Technology Officer
>>>>>>>>> www.transmute.industries
>>>>>>>>>
>>>>>>>>> <https://transmute.industries>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>>
>>>>>>> ORIE STEELE
>>>>>>> Chief Technology Officer
>>>>>>> www.transmute.industries
>>>>>>>
>>>>>>> <https://transmute.industries>
>>>>>>>
>>>>>> _______________________________________________
>>>>>> COSE mailing list -- cose@ietf.org
>>>>>> To unsubscribe send an email to cose-leave@ietf.org
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Sophie Schmieg | Information Security Engineer | ISE Crypto |
>>>>> sschmieg@google.com
>>>>>
>>>>>
>>>>
>>>> --
>>>>
>>>>
>>>> ORIE STEELE
>>>> Chief Technology Officer
>>>> www.transmute.industries
>>>>
>>>> <https://transmute.industries>
>>>>
>>>

-- 


ORIE STEELE
Chief Technology Officer
www.transmute.industries

<https://transmute.industries>